Your billing service deploys a routine patch at 2:14 a.m., taking the webhook receiver offline for ninety seconds. By 2:16 a.m., the container is healthy again, logs are clean, and your status page stays green. Three hours later, support forwards two tickets: one customer was never provisioned, and another was billed twice for the same upgrade.
Both bugs come from the same blind spot. Engineering teams often treat webhook retry mechanics as a background feature the sender handles automatically, or they memorize a single rule of thumb ("retry 5xx, stop on 4xx") and copy it across every integration. Real webhook providers don't share one retry schedule, one status-code rule, or one definition of a failed delivery. Worse, network timeouts and dropped connections leave no HTTP status code at all, creating an ambiguity that no status-code table resolves on its own.
Reliable event delivery requires looking at both sides of the wire together. Provider schedules, HTTP response semantics, idempotency keys, replay windows, and signature checks belong in a single design rather than four separate checklists.
Table of Contents
- What a Webhook Retry Actually Does
- Which Failures Trigger a Retry
- Retry Schedules Across Major Providers
- Backoff, Jitter and Retry-After Headers
- How to Make Handlers Safe for Repeated Delivery
- Diagnosing Retries That Never Stop or Repeat
- Set Your Retry Window and Deduplication Key
What a Webhook Retry Actually Does
A customer completes checkout, the payment platform fires a webhook to your order service, and your server happens to be mid-restart. The HTTP POST hits a closed port or a brief overload error, and no 200 OK comes back. A webhook retry is the sender's mechanism for re-sending that same event payload later because the initial attempt didn't return a confirmation of receipt.
Think of a courier carrying a signature-required parcel. When nobody answers the front door, the courier doesn't throw the box on the lawn and walk away, nor do they stand on the porch ringing the bell every second forever. They leave, return after a longer interval, and stop trying once their delivery window closes.
Two Sides With Incomplete Visibility
Every webhook integration splits control across two independent systems, and neither side sees the complete picture:
- The sender owns the delivery schedule: It decides when to attempt delivery, how long to wait for a response, and when to give up on an undelivered event. It can't inspect your database to see whether your code finished running before a connection dropped.
- The receiver owns the handler: Your endpoint validates the request, persists the payload, and returns an HTTP status code. It can't see how many attempts remain in the sender's queue or when the next attempt will arrive.
Because of that split, every retry engine makes three core decisions: which failures qualify for another attempt, how long to wait between tries, and when to stop automatically re-sending.
The HTTP Standard Beneath Webhook Retries
Webhook delivery inherits its reliability semantics directly from RFC 9110, the HTTP Semantics standard. RFC 9110 defines 503 Service Unavailable as a temporary condition, usually overload or scheduled maintenance, where the server expects to recover after a delay. The same standard defines the Retry-After header, allowing a server to tell a client how long to wait before trying again on a 503 response or before following a redirect.
RFC 9110 also cautions that automatic retries after an underlying connection failure are only safe when repeating the request won't create unintended duplicate effects.
A webhook retry is an at-least-once delivery mechanism, not an exactly-once guarantee. Your receiving code must assume every event can arrive twice and produce the same outcome each time.
Which Failures Trigger a Retry
A sender posts an invoice event. Your handler commits the row, then a downstream call stalls past the socket limit. No status code leaves the load balancer. The sender treats that silence as a failed delivery and tries again. A 200 that left on time would have stopped the loop. The matrix below is the first filter. It is not a portable retry policy.
| Response or failure | Retry? | Why |
|---|---|---|
| 2xx success | No | The receiver has accepted the event and taken responsibility for it |
| 400 to 404 client error | Usually no | The same request fails again unless the payload or endpoint changes |
| 401 or 403 | No | Credentials are missing, invalid or revoked, so fix configuration first |
| 429 too many requests | Yes | The sender exceeded a rate limit, so wait before retrying |
| 5xx server error | Yes | The receiver is temporarily unavailable and expected to recover |
| Connection timeout or DNS failure | Yes | No status was received, so the event may or may not have been processed |
| 3xx redirect | Only if documented | Follow only if the provider documents redirect handling for its webhooks |
A 2xx closes that delivery. Client errors from 400 through 404 usually mean a broken payload, a mistyped path, or a route the receiver does not map. Repeating the same bytes spends attempts and leaves the result unchanged. 401 and 403 mean a signature, signing secret, or token is missing, invalid, or revoked, so fix configuration before any automatic loop runs. 429 Too Many Requests is temporary throttling: wait, then try again. A 5xx means the receiver is expected to recover, so another attempt is reasonable.
Why Status Codes Leave a Blind Spot
The matrix stops working the moment the request dies on the wire. As Svix's guide to webhook retry best practices shows, those policies do not travel: some senders retry only a short list of status codes, others retry every non-2xx, and several apply their own rule to 429. Connection timeouts, DNS failures, and network partitions return no HTTP status at all.
That silence is the ambiguity a status checklist never resolves. The handler may already have written the invoice. The sender only knows the socket expired, so it queues another attempt. Retry safety has to be one design, not three afterthoughts: an idempotency key so the second delivery does not create a second record, a replay window so an old signed body is rejected, and a signature check on every attempt, including the repeat. A working model of API timeout mechanics shows where the request can stall between the write and the 200.
Handling Redirects and Multi-Vendor Rules
Redirects (3xx) are their own case. Some platforms refuse to follow them, because forwarding a signed POST to an unregistered host can leak the secret or open an SSRF path. Follow one only when that provider's webhook documentation says so. Read those redirect and error rules in the provider's own docs before you ship. Lining up how several products publish their integrations, as in the PuppetVendors API feature overview, is a separate check and does not stand in for those webhook rules.
Practical rule: Return
5xxor429whenever your endpoint hits a transient failure you expect to fix, and reserve4xxresponses for permanent payload or credential errors that won't change on a repeat attempt.
Match the matrix to each sender's documentation before you deploy. Copying one vendor's status list onto another is how a timeout that already committed work shows up later as a duplicate, or how a permanent 4xx gets retried until the event is dropped.
Retry Schedules Across Major Providers
Automatic retries never run forever. Every production webhook sender enforces a bounded schedule built on exponential backoff, where each gap between attempts grows wider than the previous one, and delivery stops the moment either the attempt budget or the time limit is reached.
The visual timeline below illustrates how bounded exponential schedules expand wait intervals before hitting a hard stop across different provider profiles.

Comparing real vendor documentation shows how drastically those boundaries differ in production.
| Provider | Max attempts | Retry window | Schedule notes |
|---|---|---|---|
| Stripe (live mode) | Bounded by 3-day window | Up to 3 days | Exponential backoff; sandbox retries 3 times over a few hours |
| Svix | 8 | About 27 h 35 min total | Retries at 5 s, 5 min, 30 min, 2 h, 5 h, 10 h, then 10 h more |
| Formance | 15 | 10-hour maximum generation duration | Early retries at 1, 3, 7, 15, 31 minutes, then hourly; last at about 9 h 3 min |
| Hook0 | 24 | 8 days | Base delays from 3 s up to 10 h; 5 s connection timeout and 15 s total request timeout |
| Paxos | Bounded by 24-hour window | 24 hours from first invocation | Exponential backoff with jitter, first retry about 5 s |
Reading the Real Provider Numbers
In production, Stripe's webhook documentation specifies that live-mode events retry automatically for up to three days using exponential backoff. Its sandbox environment behaves completely differently, retrying only three times over a few hours. Developers who validate webhook error recovery solely in a test sandbox frequently underestimate both how long production retries linger and how large their duplicate-delivery window is.
Svix's retry documentation takes a fixed-attempt approach with eight delivery attempts: the initial request fires immediately, followed by retries at 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, and a final 10 hours. Trace a realistic outage against those numbers. If your receiver fails the first three attempts during a deployment rollback and comes back online, the fourth attempt arrives roughly 35 minutes and 5 seconds after the initial send.
Other platforms tighten or stretch that envelope dramatically. Formance's webhook delivery documentation pairs a default cap of 15 attempts with a 10-hour maximum retry-generation duration, stepping through early delays of 1, 3, 7, 15, and 31 minutes, then 1 hour 3 minutes, 2 hours 3 minutes, and hourly attempts through try 15 at roughly 9 hours and 3 minutes. At the opposite end of the spectrum, Hook0's webhook retry logic guide documents a default cap of 24 retry attempts across an eight-day retry window, climbing from 3 seconds to 10-hour stages, while also enforcing a 5-second connection timeout and a 15-second total HTTP request timeout.
For a walkthrough of how these retry schedules interact with endpoint availability in real architectures, watch this short technical overview.
Planning Around Outage Length
Notice how two limits compete inside every schedule: total elapsed time and attempt count. Hook0 gives an engineering team more than a week to recover from an expired TLS certificate, whereas Formance closes automatic delivery inside a single workday.
Map your expected maintenance and incident recovery times directly against each sender's documented schedule. Document live and sandbox schedules separately in your runbooks so nobody mistakes a three-attempt test cycle for a multi-day production tail.
Backoff, Jitter and Retry-After Headers
Increasing the wait time between attempts solves half the recovery problem. Exponential backoff gives an overloaded receiver progressively longer breathing room instead of hammering a struggling database every second. Left on its own, though, deterministic exponential backoff still creates a nasty failure mode during widespread incidents.
Suppose your webhook receiver loses its primary database for ten minutes while thousands of events pile up across a sender's queue. Without randomization, every failed event that timed out at 10:00:00 calculates the exact same backoff interval and fires again at 10:05:00 in lockstep. The receiver boots up, gets slammed by a wall of synchronized requests, and tips right back over. Engineers call this self-inflicted pileup a retry storm.
Breaking Up Synchronized Traffic With Jitter
Adding jitter breaks that lockstep pattern by applying a random offset to each calculated delay. Even when two events fail during the exact same millisecond, they come back at slightly staggered times, spreading load smoothly across the recovering servers.
In production, Paxos's webhook retries and limits guide implements exponential backoff with jitter, starting with an initial retry delay of roughly 5 seconds, expanding intervals afterward, and stopping after a 24-hour maximum retry duration from the event's first invocation. If you're implementing outbound retries on your own platform, the breakdown of adding jitter to API retries covers the math behind full jitter and equal jitter curves cleanly.
Honoring Retry-After and Throttling Signals
Backoff formulas are educated guesses made by the sender. When a receiving server sends back a Retry-After header, it's handing you explicit timing guidance directly from the system under load. On a 503 response, that header indicates how long the service expects to remain unavailable; on a 429 response, it tells you when rate-limit capacity clears.
Rate limiting works the same way on standard API calls. A 429 rate-limited response means you went over your allowed requests per second, and the recommended response is to retry after a short backoff rather than firing immediately. Understanding how API rate limits replenish prevents your retry loop from burning through fresh quota the instant a window resets.
Follow a strict two-step rule whenever a response includes timing headers:
- Honor the server's
Retry-Aftervalue first: Wait at least the number of seconds (or until the HTTP date) the receiver requested, capping extreme values only to protect your overall delivery deadline. - Fall back to your jittered backoff schedule: When no
Retry-Afterheader is present, compute the next exponential interval and apply jitter so concurrent retries don't collide.
How to Make Handlers Safe for Repeated Delivery
Because dropped acknowledgments and timeouts make it impossible for a receiver to know whether a sender believes delivery failed, the only durable defense is making repeated deliveries harmless. That means designing signature checks, idempotency storage, queue persistence, and replay windows as a single workflow rather than bolting them on separately.
The four-stage handler flow below shows the core sequence every resilient endpoint follows before doing slow downstream work.

To close the edge cases that cause double charges, dropped retries, and security replays, follow this seven-step implementation routine.
The Seven-Step Safe Handler Routine
- Extract the stable event ID from the incoming payload or header. Senders keep the event identifier identical across automatic retries and manual replays, even when timestamps and headers refresh on each attempt. Without a stable key, your handler can't tell a retry apart from a legitimately new transaction.
- Query your deduplication store before triggering any side effect. Checking a unique database constraint or durable key store first ensures that an event you've already committed short-circuits immediately with a
200 OK. Review core API idempotency patterns to see how unique constraints prevent race conditions when two identical retries land in parallel. - Record the event ID and execute the business write (or durable queue insert) inside one atomic transaction. If your handler records the key in Redis, crashes before updating PostgreSQL, and never cleans up, the next retry gets ignored permanently. Wrapping both writes in a single database transaction guarantees that either the key and the state change commit together, or neither happens.
- Return a
2xxstatus code only after that durable write commits. Acknowledging a webhook before saving the raw event to disk or a message broker trades speed for silent data loss whenever a worker container restarts mid-flight. Persist fast, acknowledge immediately, and push slow API calls or emails to background workers. - Size your deduplication key's TTL to cover both retries and manual replays. As Svix's FAQ on failed webhooks points out, one security-focused approach keeps deduplication keys for seven days so retention outlasts shorter retry windows, though that exact figure is a policy choice rather than a universal law. Set your key lifetime to the sender's maximum retry window plus your maximum operational replay window, and tie each key directly to the business action it protects.
- Delete the key or mark it retryable if enqueueing fails after deduplication. When a message broker rejects a job or a downstream queue times out right after you reserve an event ID, leaving that key locked as "processed" turns the next valid sender retry into a false duplicate. Rolling back or clearing the key on persistence failure lets the sender recover the event cleanly.
- Verify the cryptographic signature against the raw request body and reject stale timestamps. Deduplication protects against operational retries, while HMAC verification and timestamp freshness block attackers from replaying captured payloads or forging events.
Never treat signature validation, replay rejection, and idempotency storage as independent checklists. An event that passes signature verification can still be a duplicate, and a valid-looking retry with an expired timestamp might be a malicious replay.
Verify Your Handler Before Shipping
Before deploying any webhook consumer to production, run one mandatory integration test: capture a signed webhook request and send the exact same event payload twice, both sequentially and concurrently. Confirm your endpoint returns 2xx both times while your database records the underlying business effect exactly once.
Diagnosing Retries That Never Stop or Repeat
The most common webhook incident ticket lands in Slack with the same headline: "Why did this customer event run twice?" Nine times out of ten, the root cause isn't a bug in the sender's retry engine. Your handler completed its work, took too long on a downstream step, lost the HTTP connection before sending 200 OK, and had no stored event ID to catch the automatic repeat.
Once duplicate processing is ruled out, production webhook issues usually fall into five other distinct failure signatures.
| Symptom | Likely cause | Fix |
|---|---|---|
| Same event processed twice | Acknowledgment lost after processing, and no stored event ID | Store the event ID and check it before any side effect |
| Retries continue past the expected window | Sandbox schedule read as production, or limit misread | Confirm the live schedule and the provider's stated window |
| Events stop arriving after a transient failure | Handler returned 4xx for a problem that would clear | Return 5xx or 429 for transient failures |
| Duplicate after a manual replay | Deduplication key expired before the replay | Keep keys for the retry window plus the replay window |
| Retry storm after an outage | Synchronized retries with no jitter or concurrency cap | Add randomized delays and limit concurrent deliveries |
| Valid retry rejected | Key stored before enqueueing failed | Delete the key or mark it retryable when enqueueing fails |
Tracing Each Failure Pattern
- Unexpectedly long retry tails: When retries keep firing days after you expected them to stop, someone on the team likely copied a short sandbox retry count into monitoring alerts instead of checking the live-mode schedule.
- Abrupt event silence after a hiccup: Returning a
400or404when an upstream microservice briefly drops tells the sender the error is permanent, cutting off automatic retries immediately. Switch transient dependency failures to503or429. - Delayed duplicates during incident cleanup: If manual replays double-charge accounts or recreate records, your deduplication keys expired before operations triggered the replay batch. Extend key retention to cover your longest operational replay policy.
- Post-outage traffic spikes: Seeing CPU peg at 100% the second a receiver recovers points to synchronized retry queues lacking jitter or per-endpoint concurrency limits.
- Missing events flagged as duplicates: When logs show a valid retry skipped as "already seen" even though the job never ran, your handler saved the idempotency key before an enqueue step failed and never rolled it back.
Recovering Events After Retries Exhaust
When a receiver stays down past the sender's final attempt, automatic retries stop and events land in a dead-letter queue (DLQ) or a failed-delivery log. Treating that queue as a monitored recovery pipeline matters across asynchronous systems, as illustrated in DLQ recovery for video processing jobs, where failed tasks need clear inspection and controlled replay once the root cause clears.
Before editing a single line of handler code during an incident, pull your server logs and inspect three fields side by side: the event ID, the attempt number, and the exact HTTP status code your endpoint returned. Those three values tell you within two minutes whether you're fighting a lost acknowledgment, a misclassified 4xx, or an expired idempotency key.
Set Your Retry Window and Deduplication Key
Retry policy is not portable. A window you copy from one provider's documentation tells you nothing about how another sender behaves, and silent failures such as timeouts create an ambiguity that no status-code checklist resolves: the sender cannot tell a lost acknowledgment from a dead receiver, so it will retry either way. Designing for repeated delivery is one problem with three parts: idempotency, replay windows, and signature checks. Teams that lock down explicit numbers for all three stop losing or duplicating webhooks without rewriting their event architecture.
Your Production Hardening Checklist
Work through these five checks for every webhook sender feeding your product this week:
- Confirm the live-mode retry schedule and hard stop. Pull the vendor's production documentation, record both the attempt cap and total duration, and ignore sandbox numbers for capacity planning.
- Compare that window against your worst-case outage duration. Write down the longest maintenance window or incident your receiver might experience. Whenever your potential downtime exceeds the sender's retry window, build a scheduled API reconciliation job to fetch missed records once you recover.
- Set your deduplication key lifetime explicitly. Calculate the provider's maximum retry duration plus your team's manual replay window, then bind every stored event ID to the specific business write it guards. A key that expires inside the replay window is a duplicate waiting to happen.
- Audit your handler's HTTP status codes. Verify that database timeouts, queue backpressure, and temporary downstream failures return
503or429, while4xxcodes stay strictly reserved for bad signatures, invalid payloads, or permanently retired routes. A misclassified transient error tells the sender to stop retrying an event your system never processed. - Test against production-like timing, not just sandbox defaults. Simulate a slow handler timeout and a full multi-minute endpoint outage in staging so you observe real retry spacing and confirm your acknowledgment path stays fast.
Checking Outbound API Calls With the Same Discipline
The same logic runs in the other direction when your application calls a B2B data API such as Fetchin. On Fetchin, rate-limited requests (429) and server-side errors (5xx) are not billed, and retries after them stay free until a retry succeeds. Your retry workers can back off cleanly during traffic spikes without burning credits on transient errors. The responsibility split mirrors the webhook case exactly: the provider defines what happens on failure, and you still own the client-side window, backoff timing, and deduplication logic that decide whether a retried call applies its effect once or twice.
Stop treating webhook reliability as a vague best practice and turn it into three concrete numbers in your repository: one documented retry window, one matching deduplication TTL, and one automated duplicate-delivery test.
Start with your highest-impact webhook integration today. Write down its live retry window, set your idempotency key lifetime longer than that window plus your replay horizon, and add a CI test that posts the same signed event twice and asserts the business effect happens once. That single test covers the ambiguity a timeout creates, because it proves your handler treats the second delivery as a replay rather than a new event.
Building data-driven SaaS workflows or enrichment pipelines that depend on reliable, real-time responses? Fetchin is a B2B data API that turns professional profile and company URLs into structured JSON with a one-second median response time, synchronous or asynchronous delivery, and zero charges on rate-limited or server-side retries. Explore the API documentation and start testing with 1,000 free credits at Fetchin.



