Stripe Webhook Handler Processes the Same Event Twice: Idempotency With a Postgres Unique Constraint - DEV Community
Stripe retries webhooks, so duplicates are normal. Make the handler idempotent with one Postgres unique constraint and a single transaction.