School · Module 3 · Lesson 3 of 4
Handle retries and duplicate events
Stripe retries webhooks. Processing the same event twice double-fulfils.
Store processed event ids (or use an idempotency key table) and skip events you have already handled.
Return 2xx quickly after recording the event. Do heavy work in a queue if you can, so Stripe does not time out and retry.
Pair this with out-of-order handling: fetch the current Subscription or PaymentIntent from the API instead of trusting event order.