Paste an incoming signature header to run constant-time verification.
Replay-Window & Clock-Skew Gate
42s age vs 300s max
PASS: WITHIN REPLAY WINDOW
Event age 42s is within <=300s tolerance window (258s remaining). Pair with Idempotency/Delivery ID cache. (126 UTF-8 bytes · Stripe signs `${t}.${rawBody}` with HMAC-SHA256 hex and enforces a 300-second default replay window.)
Run a live webhook endpoint & SLA audit on WebhookSLA Guard (webhook.runglab.dev), grab the turnkey $29 WebhookSLA Guard Kit (WebCrypto HMAC verifiers, replay-window store, RFC RateLimit-* middleware & DLQ runbooks) on Creem, or audit webhook OpenAPI specs on SpecDiff (spec.runglab.dev). Need a PayPal invoice? Email [email protected].
Run a live webhook endpoint & SLA audit on WebhookSLA Guard (webhook.runglab.dev), grab the turnkey $29 WebhookSLA Guard Kit (WebCrypto HMAC verifiers, replay-window store, RFC RateLimit-* middleware & DLQ runbooks) on Creem, or audit webhook OpenAPI specs on SpecDiff (spec.runglab.dev). Need a PayPal invoice? Email [email protected].
Run a live webhook endpoint & SLA audit on WebhookSLA Guard (webhook.runglab.dev), grab the turnkey $29 WebhookSLA Guard Kit (WebCrypto HMAC verifiers, replay-window store, RFC RateLimit-* middleware & DLQ runbooks) on Creem, or audit webhook OpenAPI specs on SpecDiff (spec.runglab.dev). Need a PayPal invoice? Email [email protected].
Read `await request.text()` once at the Worker entrypoint so exact raw UTF-8 bytes are preserved.
Validate timestamp replay tolerance and `crypto.subtle` HMAC-SHA256 in < 2ms at the Cloudflare edge.
Push the verified envelope onto `WEBHOOK_QUEUE` with `max_retries` + `dead_letter_queue` configured.
Monitor `webhook-ingest-dlq` depth and expose `Retry-After` on any edge rate-limit gates.
Cloudflare Workers native `crypto.subtle` runs natively at V8 isolate speed with zero npm dependencies (`stripe` SDK Node polyfills unnecessary on hot path).
Decoupling edge signature verification from origin Postgres writes turns 3-second p99 database tail latencies into deterministic 5ms webhook ACKs.
Use the Cluster 14 DLQ Schedule Calculator above to size `max_retries` and exponential backoff windows against your enterprise SLA.
Common Production Pitfalls
Calling `await request.json()` and re-stringifying before verifying the HMAC signature.
Configuring `max_retries` on a Queue without binding a `dead_letter_queue`, silently dropping permanently failing events.
Forgetting to check clock skew (`ts - now > 30`) when rejecting replayed timestamps.
Validate GitHub Apps & repository webhooks with `X-Hub-Signature-256`, deduplicate using `X-GitHub-Delivery`, and obey GitHub's 10-second response SLA and rate-limit headers.