Stripe webhook · Stripe Dashboard
404 Not Found (wrong path)
Webhook delivery failed: HTTP status code 404 (Not Found)What it means
Nothing answers at the URL Stripe calls. In the App Router, the URL comes from the folder path of route.ts, and only exported HTTP method names are handlers.
Common causes
- Endpoint is /api/webhooks/stripe but the file is app/api/stripe/webhook/route.ts
- The file is named webhook.ts or page.tsx instead of route.ts
- The handler isn't exported as POST (e.g. export default)
- A typo, or a missing /api prefix, or a basePath
How to fix it
- Map the URL to the file: /api/stripe/webhook → src/app/api/stripe/webhook/route.ts
- Export a named function: export async function POST(req: Request)
- Test with curl -i -X POST: you should get 400 (missing signature), not 404
curl -i -X POST https://<your-domain>/api/stripe/webhook
# expect 400 (missing signature) from your handler, not 3xx, 401, 403, 404 or 405
stripe events resend evt_... --webhook-endpoint=we_...
# we_... is the endpoint id in the Dashboard; add --live for a live-mode event
pass if curl gets 400 from your own handler, and the resent event shows a 200 delivery on the endpoint in the Dashboard.
Prompt for Cursor or Claude Code
Stripe gets a 404 from my webhook URL. Find the actual webhook route file, tell me the URL it serves (including basePath), confirm it exports a named POST handler, and tell me what to put in the Stripe Dashboard.Not quite your error? Paste yours into the free VibeBoot Doctor or browse the Stripe webhook fixer.
next: skip the next one
Skip the setup. The VibeBoot SaaS Starter ships Stripe Checkout, the billing portal and a signature-verified webhook already wired, plus auth and a database on Next.js 16.4.3. $49, one-time.
14-day money-back guarantee · lifetime updates
Other Stripe webhook errors
$ fixed it? get the next one first
New fixes for what AI agents break, by email.
When we add a fix or a Cursor rule for a new Next.js, Auth.js, Prisma or Stripe break, it goes out in the VibeBoot newsletter. Free, occasional, unsubscribe in one click.