Prompt
How do I make webhook deliveries retry automatically?
Latest observation
Oct 5, 2026
OpenAI APIWeb search: off
To make webhook deliveries retry automatically, you generally need to do three things:
-
Return a failure status when delivery fails
- If your webhook consumer can’t process the event, respond with a non-2xx HTTP status code:
500,502,503,504for server issues400/422only if the payload is invalid and should not be retried
- Most webhook providers interpret non-2xx as “retry later.”
- If your webhook consumer can’t process the event, respond with a non-2xx HTTP status code:
-
Have the sender implement a retry policy
- Configure the webhook producer (the service sending the webhook) to retry on transient failures.
- Common retry pattern:
- exponential backoff
- jitter
- max retry count or max time window
- Example:
- retry after 1 min
- then 5 min
- then 15 min
- then 1 hr
- stop after N attempts
-
Make your handler idempotent
- Retries can cause duplicate deliveries.
- Include and store a unique event ID, and ignore repeats if already processed.
Typical setup
On the receiver side
- Process quickly
- If processing is long, acknowledge first and queue work
- Return
200 OKonly when you’ve safely accepted the event
On the sender side
- Retry on timeouts and 5xx responses
- Do not retry on most 4xx responses
- Include a delivery attempt counter if possible
Example retry behavior
If the webhook endpoint returns 503, the sender should:
- wait a short interval
- resend the same payload
- keep retrying until success or retry limit is reached
If you’re using a specific platform
The exact steps depend on the system:
- Stripe / GitHub / Shopify / Slack / Twilio, etc. each has its own retry rules and settings
- Some platforms retry automatically and let you configure only the endpoint behavior
- Others provide dead-letter queues or manual redelivery tools
If you tell me which webhook provider or framework you’re using, I can give the exact configuration steps.