Verify Webhook Signatures on Arrival, Re-sign on Delivery
On arrival, Webhook Relay checks the provider's signature and answers missing, invalid or expired ones with a 401 before anything is logged or forwarded. On delivery, an optional switch gives verified webhooks a fresh signature for each attempt, so your receiver keeps its code, secret and timestamp tolerance.
In the input's Signature verification settings, choose a built-in provider and paste its signing secret. Set it up without writing code.
Built-in providers
| Provider | Header | Signature expires |
|---|---|---|
| Stripe | Stripe-Signature | After 5 min |
| Standard Webhooks / Svix (Clerk, Resend, …) | webhook-signature, svix-signature | After 5 min |
| Slack | X-Slack-Signature | After 5 min |
| Shopify | X-Shopify-Hmac-Sha256 | No |
| GitHub | X-Hub-Signature-256 | No |
Re-sign on delivery is an optional switch on the same screen. It gives each delivery attempt of a verified webhook a fresh signature, so retries, replays and late agent deliveries still pass your own constructEvent, verify() or Bolt check.
Verify Stripe, GitHub & Shopify Webhook Signatures at the Edge – and Re-sign Retries (Webhook Relay)Watch on YouTube
Why late deliveries fail
Stripe, Svix and Slack sign a timestamp, and their SDKs reject anything older than five minutes. A gateway retry after an outage, a replay, an offline agent or a rate limit can deliver the original request after that. For Shopify and GitHub, a function that rewrites the body breaks the signature instead. Why webhook signatures fail after retries goes deeper.
How it works
- The input verifies the signature over the raw body with your secret and, for timestamped providers, checks the 5-minute window. A failure gets a
401, and nothing is logged, run or forwarded. - A verified webhook is stored and delivered to public URLs or through an outbound-only agent into your private network, with durable retries.
- With re-sign on, each delivery attempt is signed again over the body actually sent, at the moment it is sent. Only verified webhooks are re-signed: a forged request can't be made to look authentic, and one that had already expired on arrival is rejected, not rescued.
Any other provider: a function
For PagerDuty, Square, Twilio, Zendesk, DocuSign or your own services, attach a function to the input. Adapt it to your provider's format: which bytes it signs, the header name and prefix, hex or base64, and whether a timestamp is included.
local crypto = require('crypto')
local secret = cfg:GetValue("WEBHOOK_SECRET")
local sig, err = crypto.hmac('sha256', r.RequestBody, secret)
if err then error(err) end
if "v1=" .. sig ~= r.RequestHeader["X-PagerDuty-Signature"] then
r:SetResponseStatusCode(401)
r:SetResponseBody("invalid signature")
r:StopForwarding()
return
end
The HMAC guide walks through it. JWT and basic auth cover senders that don't sign the body.
Why verify at the edge
- Requests that fail signature verification stop at the input. When webhooks reach you through an outbound-only agent, the check happens before the agent ever sees the request.
- Forged traffic leaves no trace. Rejected requests don't create logs or run functions, so they can't fill your log retention or leave payloads in your account.
- Your existing checks keep working. With re-sign on, your server verifies exactly as before, even on retries and replays.
- One place for secrets. Signing secrets are encrypted, write-only and set per input, from the dashboard, the API or the MCP server.
Add a source IP allowlist to block unknown networks as well. The signature verification docs have the setup steps, API fields and exact rejection messages. To test a payload first, use the free webhook signature verifier.

