← All fixes
Stripe webhook signature verification fails in Next.js App Router
#10Error
StripeSignatureVerificationError: No signatures found matching the expected signature for payload.
Fix
constructEvent needs the raw, unparsed body. In an App Router route handler use const body = await req.text(); (not req.json()), then stripe.webhooks.constructEvent(body, req.headers.get('stripe-signature'), process.env.STRIPE_WEBHOOK_SECRET). Also make sure the secret matches the endpoint: the Stripe CLI (stripe listen) prints its own whsec_ secret that differs from the dashboard endpoint's.Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
Vercel: 404 NOT_FOUND when refreshing a page in a React Router / single-page app
#125404: NOT_FOUND Code: NOT_FOUND
npm publish of a new package fails with 404 Not Found on PUT, then 403 two-factor required
#21npm publish fails: 404 Not Found - PUT https://registry.npmjs.org/<package> - Not found. "could not be found or you do not have permission to access it" (first publish of a new package). After logging in again: 403 Forbidden - Two-factor authentication or granular access token with bypass 2fa enabled is required to publish packages.
TS18003: No inputs were found in config file
#43error TS18003: No inputs were found in config file '/app/tsconfig.json'. Specified 'include' paths were '["src"]' and 'exclude' paths were '[]'.
typescriptVerifiedNo reports yet