To avoid an event being missed, RazorpayX follows at-least-once delivery semantics. In this approach, we resend the Webhook if we do not receive a successful response from your server.
There could be situations where your server accepts the event but fails to return a response in 5 seconds. In such cases, the session is marked timeout. It is assumed that the Webhook has not been processed and is sent again. Ensure your server is configured to handle or receive the same event details multiple times.
You can identify duplicate events by checking the value of
x-razorpay-event-id in the webhook request header. The value for this header is unique per event and can help you determine the duplicity of a webhook event.