Last verified 2026-07-08
stripe webhook local nextjs without forwarding
The actual problem
Webhooks fail in local Next.js because Stripe cannot reach localhost.
Do this
- Install Stripe CLI and run `stripe listen --forward-to localhost:PORT/api/webhook`.
- Copy the whsec_ secret into STRIPE_WEBHOOK_SECRET.
- Keep a demo unlock path for when CLI is not running.
- Verify checkout.session.completed updates your store.
Tools for this job
- Stripe CLI
Forwards webhooks to local apps
Related intents
Deep-dive report — $29
Self-serve checklist expansion for this query family. PayPal Checkout. No call.