Blog

Why Webhook Signatures Fail After Retries and Replays (and How Re-signing Fixes It)

Stripe signs each of its own retries with a fresh timestamp. A proxy, queue or replay tool that forwards the original request after the 5-minute window breaks verification. Verify on arrival, then re-sign each delivery attempt as you send it.

6 min read
Karolis Rusenas
On this page

A webhook signature that was valid when it arrived can fail when it's delivered, because Stripe, Standard Webhooks (Svix, Clerk, Resend) and Slack sign a timestamp and their SDKs reject anything older than five minutes.

Here's how it happens. At 14:00, Stripe sends a webhook and your gateway verifies it. Your server is mid-deploy, so the gateway holds the webhook and retries. At 14:12 your server is back. If the gateway forwards the original request, your server rejects the 12-minute-old timestamp, even though the webhook is authentic. If the gateway re-signs the verified webhook as it sends it, your server checks a fresh timestamp and keeps its five-minute tolerance.

The fix: keep the receiver's five-minute tolerance, and have the gateway that verified the original request re-sign each delivery attempt. Stripe already signs its own retries fresh, so the provider isn't the problem. For raw-body, signing-secret or header errors, see the Stripe webhook signature verification guide.

Which webhook signatures have a timestamp limit?

ProviderSigned messageTimestamp limitSDK error when late
Stripet.body5 minTimestamp outside the tolerance zone
Standard Webhooks / Svix (Clerk, Resend, …)id.timestamp.body5 minMessage timestamp too old
Slackv0:timestamp:body5 minBolt's stale-request error, below
Shopifybody onlyNo signed timestamp—
GitHubbody onlyNo signed timestamp—

The timestamp travels in the t= part of Stripe-Signature, in webhook-timestamp or svix-timestamp, and in X-Slack-Request-Timestamp. Slack recommends the 5-minute window, and Bolt JS rejects late requests with x-slack-request-timestamp must differ from system time by no more than 5 minutes or request is stale

Standard Webhooks libraries reject a mismatched signature with No matching signature found, and Stripe with No signatures found matching the expected signature for payload. A late webhook gets the timestamp error instead, which is how you can tell the two problems apart.

The timestamp is there for a good reason. Without it, anyone who captures one real webhook from a log, a proxy or a misconfigured debug endpoint could send it again forever. With it, a captured request is useless after five minutes.

What delivers webhooks late

Anything that stores a request and sends the original later:

  • A gateway retrying your endpoint. Your API was down for 12 minutes during a deploy. The gateway kept the webhooks and retries them when you're back, and every one fails verification.
  • Replays. You fix a handler bug and replay yesterday's failed events from your webhook logs. All of them are a day old.
  • Agents and tunnels. Webhooks for localhost or a server in a private network are queued while the agent is disconnected (a laptop asleep, a VM restarting) and delivered when it reconnects.
  • Throttling and queues. A rate limit spreads a burst of 2,000 events over ten minutes, and the second half of the burst expires.
  • Recorded fixtures. Integration tests that replay captured requests fail the day after they're recorded.

Re-signing on delivery

Re-signing keeps the receiver's timestamp tolerance exactly as strict as before. In Webhook Relay it's two settings on the input (setup below). The mechanism:

  1. The gateway verifies the provider's signature when the webhook arrives, including the timestamp window. Forged requests, and ones that were already stale on arrival, are rejected there. Re-signing never rescues them.
  2. It stores the verified webhook.
  3. On every delivery attempt, whether the first try, a retry or a replay, it signs again with the same secret, the current time and the body it's about to send.
  4. The receiver verifies with its unchanged code, its existing secret and the default 5-minute tolerance.

Because only verified webhooks are re-signed, the gateway can't turn a forged request into a valid one. And because the signature covers the body that is actually delivered, re-signing also fixes the other common break: transforms. If a function strips fields, redacts personal data or reshapes the payload, Shopify's and GitHub's body-only signatures no longer match. Re-signing over the delivered body makes them valid again.

Re-sign on delivery in Webhook Relay

Webhook Relay's inputs have this built in for Stripe, Standard Webhooks/Svix, Slack, Shopify and GitHub:

  1. In the input's settings, open Signature verification, pick the provider and paste the signing secret.
  2. Turn on Re-sign on delivery.

Webhook Relay then signs each verified delivery attempt, to a public URL or through the outbound-only relay agent, including durable retries for up to 30 days, replays and throttled deliveries. If signing ever fails, it logs the error and sends the original headers. It's included on every plan. The signature verification docs cover the API and MCP fields.

For other providers, such as PagerDuty, Square, Twilio or your own services, a function on the input can verify the HMAC before forwarding.

The workarounds that weaken security

Raising the tolerance. constructEvent(body, sig, secret, 86400) makes the errors go away. It also makes every webhook you received in the last day replayable against your endpoint.

Skipping verification behind the proxy. "Only our gateway can reach this service" holds until it doesn't: a misrouted ingress, a debug port, an SSRF elsewhere in the network. Then unsigned requests are trusted.

Verifying only at the proxy and stripping the header. That's better, but your application now trusts whatever reaches it. Your SDK-based handler, local tests and docs examples no longer match production.

If you build the gateway yourself

The same design works in your own code:

  • Verify first, re-sign second. Never sign anything you didn't verify.
  • Sign at send time, not when the webhook is enqueued. Otherwise a long queue expires again.
  • Sign the bytes you send. Compute the HMAC over the final body after any transform, and set the header from that.
  • Keep provider-specific details. Standard Webhooks signs id.timestamp.body, so keep the original webhook-id and update webhook-timestamp together with the signature. Slack needs X-Slack-Request-Timestamp updated with X-Slack-Signature.
  • Store secrets encrypted, apart from the webhook data, and never log them.

Test both ends with the free verifiers for Stripe, Standard Webhooks, Slack, Shopify and GitHub. For the Stripe-specific errors, including raw-body parsing and the wrong whsec_ secret, see Stripe webhook signature verification.

How much traffic carries a signed timestamp?

In a 36-hour sample of webhooks reaching Webhook Relay (26–28 November 2026), about 1 in 45 (2.2%) carried a timestamped Stripe, Svix, Standard Webhooks or Slack signature, and the five providers above made up 34.5% of all traffic, mostly GitHub. Live figures are on the State of Webhooks.

Frequently asked questions

Why does my webhook signature verification fail when the webhook is retried or replayed?

Providers such as Stripe, Svix (Standard Webhooks), Clerk, Resend and Slack sign a timestamp together with the body, and their SDKs reject signatures more than 5 minutes old. If a proxy, queue or replay tool delivers the original request later, the signature is still authentic but too old, so verification fails with errors such as 'Timestamp outside the tolerance zone' (Stripe) or 'Message timestamp too old' (Svix).

What does re-signing a webhook mean?

Re-signing means the system that delivers the webhook computes a new signature for each delivery attempt, with the same signing secret, the current time and the exact body it sends. The receiver's existing verification code then passes on retries and replays. It is only safe if that system verified the original signature first.

Is it safe to increase the webhook timestamp tolerance instead?

It weakens your defence against replay attacks: a captured webhook stays valid for as long as the tolerance. Keep the default 5 minutes and re-sign late deliveries instead.

Do Shopify and GitHub webhook signatures expire?

No. Shopify's X-Shopify-Hmac-Sha256 and GitHub's X-Hub-Signature-256 sign only the body, so late deliveries still verify. They break when something changes the body in transit, for example a transform function, which re-signing over the delivered body also fixes.

Which webhook gateway re-signs deliveries?

Webhook Relay verifies Stripe, Standard Webhooks/Svix, Slack, Shopify and GitHub signatures on its input and, with re-sign on delivery turned on, signs every delivery attempt again with the same secret and the current time, including retries, replays from logs and deliveries to agents on localhost or private networks.