By Hanzalah Seikhai, Stripe developer. 1 December 2026
Stripe webhook signature verification failed in Laravel: 6 causes and the fix for each
The error looks like this:
Stripe\Exception\SignatureVerificationException:
No signatures found matching the expected signature for payload
Stripe signs every webhook with a secret. Your app rebuilds that signature from the request body and compares. If one byte of the body or the secret differs, the check fails. These are the causes I see most, in the order I check them.
1. Wrong signing secret
Each webhook endpoint has its own secret that starts with whsec_. Three common mix-ups:
- The secret from the Stripe CLI (
stripe listen) is in production.env. The CLI secret only works for events forwarded by the CLI. - The test mode secret is used with live mode events, or the other way round.
- Two endpoints exist in the Dashboard and the secret belongs to the other one.
Fix: Dashboard, Developers, Webhooks, open the exact endpoint URL that is failing, reveal its signing secret and copy it to STRIPE_WEBHOOK_SECRET.
2. Config is cached
You changed .env but Laravel still reads the old value.
php artisan config:clear
Then restart queue workers and Octane or Horizon if you use them.
3. The body was parsed before verification
The signature is built on the raw body. Do not pass $request->all() or a re-encoded JSON string.
public function handle(Request $request)
{
$payload = $request->getContent(); // raw body
$sig = $request->header('Stripe-Signature');
try {
$event = \Stripe\Webhook::constructEvent(
$payload, $sig, config('services.stripe.webhook_secret')
);
} catch (\Stripe\Exception\SignatureVerificationException $e) {
return response('Invalid signature', 400);
}
// handle $event
return response('ok', 200);
}
4. Middleware or a proxy changes the body
Middleware that trims strings, converts empty strings to null, or rewrites JSON runs before your controller. So can a WAF or a proxy that re-encodes the request. Put the webhook route in routes/api.php, keep it out of custom body-changing middleware, and check that your CDN or firewall passes the request through unchanged.
5. It is a 419, not a signature problem
If the Stripe Dashboard shows HTTP 419 for the delivery, the request never reached your code. Laravel's CSRF check blocked it. Exclude the webhook route from CSRF verification or move it to routes/api.php.
6. Timestamp outside tolerance
Stripe rejects signatures older than 5 minutes by default. If the server clock is wrong, valid events fail. Check date on the server and turn on NTP time sync. Replaying an old payload by hand fails for the same reason.
Quick test
stripe listen --forward-to localhost:8000/api/stripe/webhook
stripe trigger payment_intent.succeeded
Use the whsec_ secret the CLI prints, only for this local test.
After the signature passes
Two more things stop most "customer paid but order is pending" cases:
- Idempotency: store each
event.idand skip it if you have seen it. Stripe sends the same event again when your endpoint is slow or returns an error. - Return 200 fast and do slow work in a queued job.
If your webhook still fails after these checks, I fix this as a fixed-price job on Upwork: Stripe webhook or payment bug fix.
Written by Hanzalah Seikhai, Stripe developer. Hire me on Upwork.