Number of HTTP call sent
Webhook consumers may receive multiple HTTP calls multiple times for the same event, depending on the event. Whenever a transaction gets in a final state such asfailed
or success
, the related webhooks should happen only once.
However for intermediate state such as pending
or action_required
, webhooks may be sent more than once. This can happen if the provider data section changed, meaning the HUB2 API got an update from the provider side, but not the kind of update which can help determine the final status of a transaction.
In case of HTTP failure
In case the target URL is not reachable for any reason (network failure, unavailability of the remote server, …), the HTTP call will fail. To overcome this possibility, the HUB2 API has a replay strategy.Replay strategy
Whenever a HTTP failure happen, a webhook is replayed after an initial delay of60
seconds.
Each attempt extends this time exponentially following that piece of code:
- Wait 1 minute
- Wait 3 minutes
- Wait 7 minutes
- Wait 15 minutes
- Wait 31 minutes
- Wait 63 minutes
- Wait 127 minutes
- …
The replay strategy won’t last forever. After
10
attempts, the webhook will consider the target URL dead and will stop retrying. This will happen roughly after ~34 hours.Timeout
Any target URL of a webhook taking longer than 5 seconds to response will trigger a timeout in HUB2 API and will be considered a failure.