Error guide
Stripe webhook: 400, "No signatures found matching the expected signature for payload"
What it means
Stripe sent your app the payment event, and your app rejected it because the signature check failed. Either the secret your app checks against isn't the one for this endpoint, or the request body was changed before the check.
Check these, in order
- Look at the deliveries. In the Stripe Dashboard, open Workbench, go to Webhooks, select your endpoint, then the Event deliveries tab. Click a failed event to see the status code. A
400 on every event points at the signature check.
- The signing secret. In the same place, open the endpoint and click Reveal secret. It starts with
whsec_. Your live app must use this endpoint's secret, with no extra spaces. The secret printed by stripe listen on your computer is a different one, and so is a test-mode endpoint's.
- The raw body. The check needs the exact text Stripe sent. If your code parses the body as JSON first and then checks the signature against that, the check fails every time. Read the raw body, check the signature on it, and only then parse it.
Still stuck? Send me the app
I'll show you what's wrong, on video, within 24 hours. Free.
Please don't put passwords or keys in the form.