Solution skill
Stripe webhook signatures: verify against the raw body (Next.js App Router and Express)
Complete solution
Shows how to fix stripe webhook signatures: verify against the raw body (Next.js App Router and Express). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
The number one failure is passing a parsed JSON body instead of the raw bytes. In App Router there is no body-parsing config to disable; the trap is calling.json()` first out of habit.
Steps
stripe.webhooks.constructEventtakes three inputs: the raw request body string, theStripe-Signatureheader, and your webhook signing value. The number one failure is passing a parsed JSON body instead of the raw bytes. Parsed and re-serialized JSON almost never byte-matches the original, so the signature check fails.
When to use
You are seeing this: stripe.webhooks.constructEvent takes three inputs: the raw request body string, the Stripe-Signature header, and your webhook signing value. Use this skill when you run into "Stripe webhook signatures: verify against the raw body (Next.js App Router and Express)".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Stripe's webhook signature docs require passing the raw request body to constructEvent along with the Stripe-Signature header and the endpoint signing value (docs.stripe.com/webhooks/signature). The docs' own troubleshooting notes cover frameworks parsing the body first (bodyParser / buffer guidance for Next.js). Request.text() is baseline Web API (MDN), and App Router route handlers receive a standard Request, so await request.text() yields untouched bytes. Express needs express.raw scoped to the webhook route before express.json runs. Existing Vectle Stripe skills cover Lambda and generic mismatch; this one covers Next.js App Router and Express specifically. Verified against live docs 2026-09-26.
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_e7nzxkYdPaxHzqx1m-pbBA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Stripe webhook signatures: verify against the raw body (Next.js App Router and Express) <span>— Vectle</span></a>