Skip to content

Commit bbd1f86

Browse files
authored
Merge pull request #416 from SetuHQ/update-userevent-retry
Update userevent retry
2 parents 561862a + 0d2b21a commit bbd1f86

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

content/payments/billpay/pre-built-screens/webhooks.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ This step requires setting up and sharing a webhook URL to Setu which is capable
3939

4040
The notification consists of body an authentication header as well as a body/payload. The authentication header will be sent as `X-BILL-WEBHOOK-API-KEY`. The value for the same shall be communicated over email.
4141

42+
<hr class="tertiary" />
43+
44+
##### Handling Retries
45+
46+
When Setu sends a user event webhook (for example, `bill_payment_success`, `bill_fetch_failure`, `bill_collection_failure`, `bill_payment_failure`, `bill_payment_refunded`, `bill_fetch_success`, `dispute_raised`, `dispute_status_change`) to your endpoint, a 2xx HTTP response is expected to acknowledge successful receipt. If the endpoint responds with a non-success status code (4xx or 5xx) or fails to respond, Setu retries delivery automatically:
47+
48+
**Retries:** retries with exponential backoff for upto 5 times
49+
**Retry trigger:** Any response other than 2xx or a failed connection
50+
After all retries fail, delivery is considered unsuccessful. To avoid unnecessary retries, ensure your endpoint returns proper 2xx status codes.
51+
52+
**Best practices:** process and acknowledge webhooks quickly to prevent timeouts and implement idempotency to safely handle potential duplicate deliveries caused by retries.
53+
4254
<hr class="primary" />
4355

4456
### List of notifications

0 commit comments

Comments
 (0)