Stripe email: Your webhook endpoint is failing and will be disabled. How to fix and re-enable it
Published
The error
Email from Stripe: 'Your webhook endpoint is failing' / 'Fix it or we will disable it by <date>' / Dashboard shows the endpoint Disabled, Event deliveries Failed with 4xx, 5xx, timeout, Unable to connect, or 3xx redirect / paid customers stop getting upgraded
Why it happens
Stripe delivers each webhook event to your HTTPS URL and expects a fast 2xx response. In live mode it retries failed deliveries for up to about 3 days with exponential backoff, emails you that the endpoint is failing, and if failures keep coming it disables the endpoint so Stripe stops calling it. Vibe-coded apps hit this often: the URL 404s after a redeploy (route renamed, preview URL left in the Dashboard, Hobby project deleted), signature verification fails and the handler returns 400 (wrong whsec_ secret, test secret in live, or the body was parsed as JSON before constructEvent), the handler times out because it does slow work (DB writes, emails, AI calls) before returning 200, a Supabase Edge Function still has JWT verification on so Stripe's unsigned POST gets 401, auth or CSRF middleware blocks POST /webhook, the URL redirects (3xx counts as a failure), TLS is broken, or a cold start on a free host takes too long. Once the endpoint is disabled, new events are not delivered and paying users stop unlocking until you fix the root cause, re-enable the endpoint, and backfill missed events.
How to fix it
- Open the Stripe email and note the endpoint URL and the disable date. In Stripe Dashboard (or Workbench) go to Developers → Webhooks (or the Webhooks tab), open that endpoint, and read Event deliveries. Note the HTTP status for recent Failed/Pending attempts: 404, 401/403, 400, 500, Timed out, Unable to connect, TLS error, or 3xx.
- If the endpoint already shows Disabled, plan to re-enable it only after the URL returns 2xx. Re-enabling alone does not replay events Stripe already gave up on.
- 404 or Unable to connect: confirm the production URL still exists. Redeploy so the webhook route is live, update the endpoint URL in the Dashboard to the exact production path (no trailing slash mismatch, no leftover preview URL, https only), and make sure the host accepts POST.
- 401, 403 or 405: exclude the webhook path from auth, JWT and CSRF middleware. If the handler is a Supabase Edge Function, set verify_jwt = false for that function (or deploy with --no-verify-jwt) and verify the Stripe-Signature inside the function instead.
- 400 with signature errors: use the raw request body (req.text() / express.raw), the whsec_ secret for this exact endpoint and mode (CLI secret is different from the Dashboard secret; test differs from live), and return 400 only when verification fails. See the related signature-failed fix.
- 500 or Timed out: wrap the handler so it verifies the signature, records the event id, returns 200 immediately, then does slow work (fulfilment, email, AI) afterwards or in a queue. Stripe treats timeouts and 5xx as failures and will keep retrying.
- 3xx redirects: Stripe counts redirects as failures. Point the endpoint at the final URL with no redirect.
- Fix the code, deploy, then test: from the endpoint's Event deliveries use Resend on a recent event, or run stripe trigger checkout.session.completed (and stripe listen --forward-to localhost:... while developing). Confirm a Delivered attempt with status 200.
- Re-enable the endpoint in the Dashboard (or set status to enabled via the Webhook Endpoints API). Watch new deliveries go green.
- Backfill what you missed: list events with delivery_success=false for the event types you care about (Stripe keeps them for 30 days), process each event id idempotently (same as your live handler), and return 200 if Stripe's automatic retries deliver one you already handled. Check recent Checkout Sessions or subscriptions against your database for users who paid but were never upgraded.
Fix prompt (paste into Lovable, Bolt, Cursor, Replit or v0)
Stripe emailed me that my webhook endpoint is failing and may be (or already was) disabled. The endpoint URL is <URL>. Recent delivery statuses from the Dashboard are: <PASTE, e.g. 404 / 401 / 400 signature / 500 / Timed out>. Do not rewrite the whole payments feature. 1) Make the webhook route publicly reachable over HTTPS POST with no auth/JWT/CSRF in front of it (if this is a Supabase Edge Function, turn verify_jwt off for this function only and verify Stripe-Signature inside). 2) Verify the signature with the raw body and STRIPE_WEBHOOK_SECRET from server env, return 400 on bad signatures. 3) After a valid event, insert event.id into an idempotency table, return 200 immediately, then fulfil (upgrade the user from client_reference_id / metadata) asynchronously or after the response. 4) Tell me exactly what to set in Stripe Dashboard → Webhooks (URL, events, how to re-enable) and how to backfill failed events with the Events API (delivery_success=false) without double-granting. Use test mode until deliveries show 200.
Error codes this fixes
Your webhook endpoint is failing(Stripe email)
FAQ
Will Stripe disable my endpoint?
If live deliveries keep failing, Stripe emails you a warning with a date and can disable the endpoint so it stops receiving events. Fix the failures before that date, or re-enable after you fix them.
Does re-enabling replay missed events?
No. Re-enabling only starts delivery of new events. Backfill failed ones with the Events API (delivery_success=false, last 30 days) or by using Resend on individual events, and make your handler idempotent.
How long does Stripe keep retrying?
In live mode Stripe retries for up to about 3 days with exponential backoff. In a sandbox it retries a few times over a few hours. You still get the failing-endpoint email when responses stay outside 2xx.
Why did it work in test and fail in live?
Live mode needs its own endpoint URL and its own whsec_ secret. A test-mode secret, a localhost URL, or a preview deploy URL will fail once real payments start.
Is returning 200 for every request safe?
Return 2xx only after you have accepted the event (signature checked, event id recorded). Returning 200 for a bad signature hides attacks; returning non-2xx for a valid event you already processed causes endless retries. Skip duplicates and still return 200.
Sources
Based on the official documentation:
- Stripe: Receive webhook events
- Stripe: Manage webhook endpoints
- Stripe: Update a webhook endpoint
- Stripe: Webhooks and subscriptions (retries and failing-endpoint email)
- Stripe CLI: listen
Related fixes
- Stripe webhook: No signatures found matching the expected signature
- Payment succeeds but the user isn't upgraded
- Stripe webhook runs twice: duplicate orders, credits or double charges
- Visiting the success page unlocks Pro without paying: grant access from the Stripe webhook, not the redirect
- Supabase: Edge Function returned a non-2xx status code (how to find the real error and fix it)
- Stripe webhook returns 401 from a Supabase Edge Function (Missing authorization header / Invalid JWT)
Get one new fix a week
Free newsletter: the newest breakages in Lovable, Bolt, Cursor, Replit and v0 apps, with paste-in fixes.
We only use your email to send the newsletter. Unsubscribe any time. See privacy.