Retries and replay
When BetterFans Link retries a webhook delivery, when it gives up and how to replay one.
A delivery succeeds when your endpoint answers with a 2xx status within 15 seconds. Anything else counts as a failure: another status, a timeout, a TLS error or a refused connection. BetterFans Link then tries again on this schedule, up to 9 attempts over about 38 hours.
Schedule
| Attempt | Wait before it | Time since the first attempt |
|---|---|---|
| 1 | Right away | None |
| 2 | 5 seconds | 5 seconds |
| 3 | 5 minutes | 5 minutes 5 seconds |
| 4 | 30 minutes | 35 minutes 5 seconds |
| 5 | 2 hours | 2 hours 35 minutes 5 seconds |
| 6 | 5 hours | 7 hours 35 minutes 5 seconds |
| 7 | 10 hours | 17 hours 35 minutes 5 seconds |
| 8 | 10 hours | 27 hours 35 minutes 5 seconds |
| 9 | 10 hours | 37 hours 35 minutes 5 seconds |
After the last attempt the delivery is marked failed. Each attempt is signed again with a fresh webhook-timestamp; webhook-id stays the same.
Respond fast
Return 2xx as soon as you have verified and stored the event, then do the work. A handler that runs longer than 15 seconds times out and the event is sent again.
Duplicates and order
A retry can reach you after you already handled the event, and events can arrive out of order. Store webhook-id and skip ids you have seen. Use the event createdAt when order matters.
Disabled endpoints
An endpoint that fails every delivery for 5 days is disabled. The dashboard shows it as disabled, with the reason. Fix the endpoint, then turn it back on from its page.
Replay
Every delivery is listed on the endpoint page in the dashboard with its attempts, status codes and the start of each response. Replay sends one delivery again, for example after you fixed a bug in your handler.