Menu

1 / 2

I open-sourced the Stripe webhook verifier I built for Next.js 15

DEV Community·Build Wright·6 months ago
#5eX3HzqA
#nextjs#opensource#showdev#typescript#stripe
Reading 0:00
15s threshold

The problem

I shipped my first SaaS a few weeks ago. Stripe webhooks were one of the things that took longer than they should have, because the official Stripe documentation example breaks in Next.js 15 App Router.

The issue is how App Router reads request bodies: The standard pattern in older Next.js used req.body directly. App Router uses request.text() and the body can only be consumed once, which trips up the standard Stripe verification flow if you read the body for any reason before passing it to the verifier.

I solved it for myself, then realized other people were probably hitting the same wall.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.