Quick Answer
- Raw body: Per Stripe docs, Sept 2026, signature verification fails if the body is parsed or changed before `constructEvent()`.
- App Router: Per Next.js docs, Sept 2026, Route Handlers use named HTTP method exports, so Stripe needs `export async function POST(request)`.
- Timeouts: Per Vercel docs, Sept 2026, functions that exceed max duration are terminated; acknowledge Stripe first, then do slow work.
Vercel + Stripe Webhook Not Working
I'm PJ โ I'm in Encinitas and I help operators ship payment integrations that don't break at 2 AM. The Vercel + Stripe webhook combo usually fails at the route boundary: raw body handling, named POST exports, environment secret mismatch, or slow work before Stripe gets a response.
Quick diagnostic โ which one is it?
- Vercel logs show "Webhook signature verification failed"? Read the raw body with `request.text()` before parsing JSON.
- Stripe shows 405 Method Not Allowed? Export a named `POST` handler from the App Router `route.ts` file.
- Webhook works locally but fails on Vercel deploy? Compare the deployed `STRIPE_WEBHOOK_SECRET` to the endpoint or CLI secret that sent the event.
- Stripe retries after slow responses? Return 2xx first, then queue email, CRM, fulfillment, or other downstream work.
Questions Vercel + Stripe operators keep asking
- Is the webhook route reading the raw request text before Stripe verification?
- Does the App Router file export `POST`, not a default handler?
- Does the deployed secret match the exact endpoint or Stripe CLI listener?
- Does the handler return 2xx before slow downstream work?
Real Answers
Raw Body Verification
Per Stripe webhook docs, Sept 2026, signature verification requires the original request body without parsing or mutation. In Next.js Route Handlers, per Next.js docs, Sept 2026, read it with await request.text() before calling Stripe verification.
Function Timeout
Per Vercel timeout docs, Sept 2026, a function that takes too long is terminated. Stripe also expects a timely 2xx. Acknowledge the webhook first, then run fulfillment, email, CRM, or queue work after the response.
405 Method Not Allowed
Per Next.js Route Handler docs, Sept 2026, unsupported methods return 405. In the App Router, put the route in route.ts and export async function POST(request) for Stripe deliveries.
FAQ: Signature Failure
Why does Stripe signature verification fail on Vercel? Per Stripe webhook docs, Sept 2026, verification requires the raw request body, `Stripe-Signature` header, and endpoint secret. If the body is parsed first, the signature can fail.
FAQ: 405 Errors
Why does my Vercel Stripe webhook return 405? Per Next.js docs, Sept 2026, unsupported methods return 405. Export a named `POST` handler for the webhook route.
FAQ: Timeouts
What if the Vercel function times out? Per Vercel docs, Sept 2026, functions that exceed max duration are terminated. Return 2xx quickly and move slow work after acknowledgement.
Vercel Stripe Webhook Body Parser Fix
Next.js parses the request body before Stripe's signature check runs โ and that breaks verification. Add export const config = { api: { bodyParser: false } } to your webhook route, then read the raw body with getRawBody(). One line, done.
Related Guides
Not sure which one to pick โ or stuck on a webhook?
Text me the situation. I'll tell you exactly what to do. No sales pitch, no discovery call. Just a straight answer from someone who sets these up every week in North County San Diego.
๐ฌ Text PJ Now โ 858-461-8054 $150 Same-Day HourFree. No obligation. I reply same day.