Delivery Attempts and Retries
Every event that receives a non-2xx response is considered an event delivery failure by Razorpay’s system. If there is a delivery failure, we retry the delivery in exponential backoff policy for 24 hours after event creation timestamp.Disable Logic
A webhook is retried at progressive intervals of time on failure, defined in the exponential backoff policy, for 24 hours. If the webhooks continue to fail for 24 hours, the webhook is disabled. You need to enable the webhook from the Dashboard after fixing the errors at your end. Whenever a webhook is disabled, you are notified on your Alert Email Address as configured during webhook setup. In case you have not provided an Alert Email Address during webhook set up, we send a mail to the email address configured under Account & Settings on the Dashboard.Event Handling
Correct handling of webhook events is crucial to ensuring your integration’s business logic works as expected.Handle Duplicate Events
There could be scenarios where your endpoint might receive the same webhook event multiple times. This is an expected behaviour based on the webhook design. In such a scenario, we recommend you to follow idempotency. You could be receiving the same events multiple times as Razorpay follows at-least-once delivery semantics. In this approach, if we do not receive a successful response from your server, we resend the webhook. There could be situations where your server accepts the event but fails to respond in 5 seconds. In such cases, the session is marked timeout. It is assumed that the webhook was not processed and is sent again.Handy Tips
- Ensure you configure your server to handle or receive the same event details multiple times.
-
Check the value of the
x-razorpay-event-idin the webhook request header. The value for this header is unique per event and can help you determine the duplicity of a webhook event.