Generally, notifications are delivered with a small delay after the occurrence of an event, which can vary from a few seconds to several minutes. However, there are risks that at the time of delivery the webhook page may be temporarily unavailable for various reasons, such as network issues or problems with the server on which the page is hosted.
To ensure reliable delivery, the gateway includes a re-delivery mechanism. This mechanism ensures delivery by reattempting resending notifications over some time.
The gateway expects a response from the page receiving the notification. In order for the re-delivery mechanism to work correctly, every page used to consume webhook notifications is expected to provide confirmation once it has successfully processed the notification. By doing so it notifies the re-delivery mechanism that know subsequent delivery of this event is necessary.
Consequently, if the confirmation is not provided, the re-delivery mechanism will continue to resend this notification on the schedule defined below.
For the page to confirm delivery, it must respond to the gateway with the following information. Each notification that is delivered has a unique notification ID, which is included in the format of the notification message. The page that receives the notification should reply back to the gateway with the value of this notification ID in the format
{notificationId: value}. For instance, if you receive a notification with notificationId=12345, you will have to respond with
{“notificationId”: “12345”}.
The re-delivery mechanism ensures automatic redelivery of notifications in case the confirmation response was not received by the gateway.
Retry attempts are performed based on the schedule below.
If an event is not processed successfully on the first attempt:
- The second notification is sent 5 minutes after the first failed attempt.
- The third notification is sent 15 minutes after the second failed attempt.
- The fourth notification is sent 60 minutes after the third failed attempt.
- The fifth notification is sent 24 hours after the fourth failed attempt.
- If the fifth attempt fails, the notification status is changed to "Failed" and no further redelivery will take place.