48-hour launch: 40% off with code LAUNCH40, Guide $5.40 / Kit $11.40

Stripe webhook "timed out": why deliveries fail and how to respond fast enough

Stripe's docs say your endpoint must quickly return a 2xx before any complex logic that could cause a timeout. The webhooks guide doesn't give an exact cutoff in seconds, so don't design around one. Acknowledge first, then do the work.

Typical causes

  1. Doing the work inline. Sending emails, calling other APIs, generating PDFs or running slow database writes before you send the response.
  2. Cold starts on serverless functions, stacked on top of that inline work.
  3. Synchronous handling during spikes. Stripe warns that big bursts (for example, monthly subscription renewals) can overwhelm endpoints that process events synchronously, and recommends an asynchronous queue.
  4. Waiting on locks or on a call back to the Stripe API inside the handler.

Fix: verify, enqueue, return 200

app.post('/webhook', express.raw({ type: 'application/json' }), async (req, res) => {
  let event;
  try { event = stripe.webhooks.constructEvent(req.body, req.get('stripe-signature'), secret); }
  catch (e) { return res.status(400).send(e.message); }
  await queue.add(event.type, { id: event.id });   // fast: store it, don't process it
  res.sendStatus(200);
});
// a separate worker processes the queue and de-duplicates on event.id

On serverless platforms you usually can't keep working after you've returned. Hand the event to a real queue (or your platform's background or after-response feature, within its time limits).

Don't want to build the queue yourself? The kit is a self-hosted Cloudflare Worker relay that verifies the Stripe signature, stores the event, answers right away, and retries delivery to your server with backoff. The guide covers every common Stripe webhook failure with copy-paste fixes.

Fix Your Stripe Webhooks guide · Self-Hosted Webhook Relay Kit. Code LAUNCH40 = 40% off until Sun Oct 11, 6:40 AM MT.

What happens to the events that timed out

In live mode, Stripe retries failed deliveries with exponential backoff for up to three days. Sandbox events are retried only three times over a few hours. Retries stop if the endpoint is disabled or deleted. To catch up faster, list missed events with GET /v1/events?delivery_success=false, process them idempotently, and return 2xx when the retries arrive. Manually resending an event doesn't cancel Stripe's automatic retries.

Retries mean duplicates, so see handling duplicate Stripe events.

Free download: Webhook debugging cheat sheet.

Don't want to build the queue yourself? The self-hosted relay kit ($19) is a Cloudflare Worker that verifies the Stripe signature, queues the event and replies right away, then retries, replays or dead-letters each delivery to your server.

All five common causes with copy-paste fixes: Fix Your Stripe Webhooks guide ($9). Retries, replay and a dead-letter list in front of your endpoint: the self-hosted relay kit ($19).