SaaS Webhook Reliability: Retries, Idempotency and Delivery Guarantees

Webhook delivery is at-least-once, never exactly-once. Learn how retries, idempotency, signature checks, and reconciliation keep SaaS webhooks reliable.

By Galactic News Editorial · Published 2026-11-21T07:43:11+00:00 · Updated 2026-11-21T07:43:11+00:00

SaaS webhook reliability retries idempotency delivery guarantees

SaaS Webhook Reliability: Retries, Idempotency and Delivery Guarantees

Webhooks are how SaaS products tell each other what happened. A payment succeeds, a subscription renews, a file finishes processing, and a webhook carries that event to the systems that need it. When delivery fails, orders stay unpaid, accounts stay locked, and customers blame your product. This guide explains how SaaS webhook reliability works: retries, idempotency, and the delivery guarantees you can actually promise.

The core fact to design around is simple. Webhook delivery is at-least-once, not exactly-once. The same event can arrive twice. Events can arrive out of order. Retries stop after a few days, so a long outage needs reconciliation, not more retries.

What Webhook Providers Actually Guarantee

Start with the real contract, not the one you wish existed. Stripe's documentation states that webhook endpoints might occasionally receive the same event more than once. It also states that Stripe does not guarantee delivery in the order events were generated. A subscription creation can fire several events, and you can receive them in any order.

Retries have a limit. Stripe retries failed deliveries with exponential backoff for up to three days in live mode. After that, the event is gone unless you replay it from the dashboard or fetch it through the API. Svix, a dedicated webhook delivery service, makes 8 attempts over roughly 27 hours, then marks the message failed. Its schedule runs immediately, then after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, and 10 hours.

Endpoints that keep failing get disabled. Svix disables an endpoint after repeated failures spanning 5 days and fires an event to tell you. Stripe has also disabled endpoints that fail for days. Treat a failing endpoint as urgent, not as background noise.

Receiving Webhooks Reliably: Retries and Idempotency

A reliable receiver follows four rules. Each one protects against a specific failure.

  1. Verify the signature on the raw body. Every Stripe event carries a Stripe-Signature header with a timestamp and an HMAC-SHA256 signature. Verify it with the official library and the endpoint secret, which starts with whsec_. Verification needs the exact raw bytes. If your framework parses the JSON and re-serializes it, the signature check fails. Svix signs the same way, with the message ID and timestamp included in the signed content. Libraries reject events whose timestamp is more than 5 minutes old, which blocks replay attacks.
  2. Answer fast, then do the work. Return a 2xx status code before any heavy processing. Stripe's documentation is direct: return a successful status code quickly, before complex logic that might cause a timeout. Queue the real work for a background worker. A slow endpoint looks like a failing one and gets retried, even when the work already succeeded.
  3. Deduplicate on the event ID. Store every event ID you process, with a unique constraint in your database. When a duplicate arrives, the insert fails and you return 200 without doing anything. Stripe advises logging the event IDs you have processed and skipping ones you have already handled. In some cases Stripe generates two separate Event objects for the same thing, so also check the ID of the object in data.object together with the event type. Svix includes a webhook-id header that is unique per message and reused across retries, so receivers can store it and skip repeats.
  4. Make the effect idempotent. Deduplication alone is not enough, because a worker can crash halfway through. Write handlers so running them twice gives the same result as running them once. Set a subscription status to active instead of adding a month. Use upserts keyed on the object ID. Put a unique constraint on any record you create, such as a fulfillment row. Never trust the order of events. Compare the state in the payload with the state you hold, and apply only the newer one.

Sending Webhooks Reliably: What Your Customers Expect

If your product sends webhooks to customers, the reliability burden flips to you. Your customers will judge your webhooks by three things: whether events arrive, whether they arrive once, and whether they can see what happened.

Use a retry schedule with exponential backoff and a defined give-up point. Svix's published schedule of 8 attempts over about 27 hours is a solid model. Do not retry 4xx responses other than 429 and 408. A 400 means your payload or the endpoint is wrong, and retrying it eight times helps no one.

Sign every payload. Svix implements the Standard Webhooks scheme: an HMAC-SHA256 signature over the message ID, timestamp, and body, sent in svix-id, svix-timestamp, and svix-signature headers. Customers can verify with any Standard Webhooks library. Keep the payload small and carry IDs, not full records. Consumers fetch details through your API when they need them.

Give customers a delivery log they can inspect themselves. The most requested webhook feature is not retries. It is a log that shows each attempt, its status code, and its timing. Add a self-service portal where customers manage endpoints, rotate secrets, and replay failed messages. Svix provides this as a hosted app portal. When retries are exhausted, tell the customer through the same channel: Svix sends a message.attempt.exhausted webhook when a message fails all attempts.

Use idempotency keys on your own API calls too. When your code calls an external API and the network drops, you do not know whether the call landed. Svix supports an Idempotency-Key header on mutating requests. It stores the status code and body of the first request for up to 12 hours and returns the same result for repeats. Send the key with every retry, and a network blip cannot create two events.

When Retries End: Reconciliation

Retries end. Reconciliation does not. After Stripe stops retrying at three days, or Svix marks a message failed at 27 hours, the event still happened. Your system needs another way to learn about it.

Run a regular reconciliation job. Poll the provider's API for events since your last successful sync. Compare the results with your local records. Fill the gaps. This job is what keeps a weekend outage from becoming permanent data loss. Schedule it daily at minimum, and hourly for payment-critical flows.

Design your handlers so reconciliation is safe. Because your handlers are idempotent, replaying an old event changes nothing. Because you store event IDs, a replayed event is a no-op. Reconciliation only works when the rest of the system is built for it.

Monitor delivery like a product feature, not a log file. Alert on delivery failure rates, endpoint disablement, and retry exhaustion. Track the share of events delivered on the first attempt. A slow decline in first-attempt delivery usually means a customer endpoint is degrading, and an early warning saves a support ticket later.

Bottom Line

Reliable webhooks rest on four habits. Verify every signature on the raw body. Answer 2xx fast and process asynchronously. Deduplicate on a stable event ID and make every handler idempotent. And when retries run out, reconcile from the API. No provider promises exactly-once delivery. Build as though every event arrives twice and out of order, and your system will stay correct when it does.