opyebWebhookLab

Stripe · payment_intent

Verify Stripe webhook signatures (Stripe-Signature)

One-line answer

A Stripe webhook signature has the form t=<unix seconds>,v1=<hex> and is the HMAC-SHA256 of t + '.' + raw body. The default tolerance is 300 seconds.

Stripe binds the timestamp into the signed payload. This page separates t and v1, verifies multiple v1 values during a secret rollover, and reports the 300-second window.

Sign & verify

e.g. GitHub webhook Secret, Stripe whsec_…, Slack Signing Secret

Generated signature header

X-Hub-Signature-256

Enter a secret and body, then press Generate signature.

Verify a received signature

Original vs re-encoded body

Any proxy or framework that re-serializes JSON breaks the signature. Compare the body you received with the one your server rebuilt.

How to verify

  1. Enter the Signing secret (whsec_…) from Stripe Dashboard → Developers → Webhooks.
  2. Paste the raw body exactly as received and check the t value.
  3. Paste the whole Stripe-Signature (t=…,v1=…) into the verify field to see the match and the request age.

Verify a signature in your browser right now.

Guides

Frequently asked questions

Why are there multiple v1 values?

During a secret rollover Stripe signs with both the old and the new key. Any one matching value means the request is valid.

What separates t and the body?

A single dot. The HMAC message is the whole t + '.' + body string, not the timestamp alone.

Should I reject everything older than 300 seconds?

Stripe recommends a 300-second default tolerance. You can raise it if you see legitimate late deliveries, but a wider window means more replay exposure.

Do Stripe CLI test events verify the same way?

Yes. Requests forwarded by stripe listen are signed the same way, though the secret the CLI prints can change per session.

Verifier by platform

WebhookVerify GitHub webhook signatures (X-Hub-Signature-256)Compute and verify push / pull_request signatures.WebhookVerify Slack request signatures (X-Slack-Signature)Compute the v0:timestamp:body signature.WebhookVerify Shopify webhook HMAC (X-Shopify-Hmac-Sha256)Compute and verify the base64 HMAC.WebhookVerify Toss Payments webhook signatures (v1)Compute and verify the body:time signature.