Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

Help for owners

Stripe says my webhook signature verification failed

Short answer

Stripe signs each event with a secret that belongs to one endpoint, and your website rejects the event when its check does not match. Typical causes are a wrong or mixed-up secret, a framework that changed the raw request body, and a server clock that is off. The fix is in your website's code, not in Stripe.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • Payments succeed in Stripe but my site does nothing afterwards.
  • Stripe shows failed deliveries for my webhook with an error code.
  • My developer mentions no signatures found matching the expected signature.
  • It broke after a hosting move, a secret change or a framework update.
  • Test mode works and live mode does not, or the other way round.

Why does this happen?

  1. The secret does not match the endpoint

    Stripe generates a unique signing secret for each endpoint, and the secret is different for test and live keys when the same endpoint is used for both. Using the secret from another endpoint, the Stripe CLI or the wrong mode makes every check fail.

  2. The body was changed before it was checked

    Stripe requires the raw body of the request for signature verification, and says any manipulation by a framework causes the check to fail. A parser that reads the JSON first is the classic cause.

  3. The server clock is wrong

    Stripe's libraries default to a tolerance of five minutes between the signature time and the current time, and Stripe advises keeping the server clock synchronised with NTP. A drifting clock makes valid events look old.

  4. A secret was rolled but the site still has the old one

    Stripe lets you keep the previous secret active for up to 7 days after rolling. After that period, anything still using the old secret fails.

What can I do about it today?

  1. Open the delivery list in StripeIn the Dashboard, open Workbench, Webhooks, pick the endpoint and read the Event deliveries tab. It shows Delivered, Pending or Failed and the response code.
  2. Do not turn verification offIt is what stops anyone from sending your site fake payment events. A site without it can be tricked into marking orders paid.
  3. Do not paste the secret into a chat or emailThe whsec value is a secret. Share it only with the person who maintains your site, through a safe channel.
  4. Find out what changed recentlyA new host, a new plugin, a framework or SDK upgrade, a regenerated secret or a switch between test and live.
  5. List the payments that were missedCompare Stripe payments with your orders for the affected hours, so they can be fixed once the check works.

When should I bring someone in?

  • Real payments are succeeding and the site is not reacting to them.
  • Your developer has tried the secret and the body and it still fails.
  • You do not know which server or plugin receives the webhook.

How do I handle it?

  1. Find which of the four causes it isOne log line before verification shows whether the body is raw, whether the secret matches, and how old the signature is.
  2. Fix it at the sourceI set the route to receive the raw body and the correct secret per endpoint and mode, without weakening the check.
  3. Replay the missed eventsStripe lets you resend events from the Dashboard for up to 15 days, or from the CLI for up to 30 days, so missed orders are processed.
  4. Add a safety netA scheduled check that compares Stripe payments to your orders catches the next failure before customers do.

The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.

What do owners ask about this?

Is my money safe?

The payments themselves are already made in Stripe. This error means your website refused Stripe's message about them, so the orders on your side may be missing.

Will Stripe keep retrying?

In live mode Stripe tries to deliver an event for up to three days with exponential back off. A fix after that window needs a manual resend or a reconciliation.

Can I fix it myself?

A non-technical owner can read the delivery list and note what changed. The fix itself is in your site's code or plugin settings.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.

For your developer: the technical fixes

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.