Stripe webhook failing: 404, 307/308 redirect, timeout or 500
Stripe shows webhook deliveries Failed with 3xx, 4xx, 5xx or timed out? Point it at the exact final URL and respond 200 fast.
Last edited October 17, 2026
On this page
What it means in plain English
Stripe tried to tell your app about a payment but your server didn't answer with success, so things like 'mark order as paid' never happen.
Stripe Payments That Work Pack
Webhook setup, signature checks, test and live mode, and customer portal setup.
Secure checkout by Stripe
One-time payment through Stripe. Priced in USD. Local taxes such as UK VAT may be added at checkout.
Likely causes
- The endpoint URL is wrong (404) or still points at a preview/old domain.
- The URL redirects (e.g.
yourapp.com→www.yourapp.com, or trailing slash); Stripe treats any 3xx as a failure. - The route doesn't accept POST (405), or is behind password protection/auth (401/403).
- Your code crashes (500) or does slow work before replying (timeout).
How to fix it, step by step
- Stripe Workbench → Webhooks → your endpoint → Event deliveries; note the status code.
- 3xx: change the endpoint URL to the final address after redirects (exact domain,
wwwor not, slash or not). - 404/405: confirm the route exists in production (e.g.
/api/stripe/webhook) and handles POST. - 401/403: Stripe can't send custom headers. If Vercel Deployment Protection is blocking the endpoint, append
?x-vercel-protection-bypass=<secret>to the webhook URL. A custom production domain stays public under Standard Protection, but*.vercel.appURLs stay protected, and All Deployments protects the production domain too. - 500: open your host's function logs to see the crash; often a missing env var.
- Timeout: return a 200 immediately, then do heavy work afterwards/asynchronously.
- Stripe retries for up to three days, so fixed endpoints will catch up; you can also resend events from the dashboard.
How to check it worked
- Resend a failed event in Event deliveries; it should turn Delivered (200).
- Make a test purchase and confirm your app records it.
A paid Checkout that never changes the user's plan is this webhook, not the success page. See Stripe paid, but the user was not upgraded.
Sources
- https://docs.stripe.com/webhooks/signature (opens in a new tab)
- https://vercel.com/docs/functions/limitations (opens in a new tab)
- https://vercel.com/docs/deployment-protection (opens in a new tab)
- https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection/protection-bypass-automation (opens in a new tab)
Related fixes
Tool to consider: Better Stack.
Stripe Payments That Work Pack
Webhook setup, signature checks, test and live mode, and customer portal setup.
Secure checkout by Stripe
One-time payment through Stripe. Priced in USD. Local taxes such as UK VAT may be added at checkout.