Stripe will send you the same webhook twice, and it isn't a bug. Delivery is at-least-once, so a ...Stripe will send you the same webhook twice, and it isn't a bug. Delivery is at-least-once, so a ...
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Stripe will send you the same webhook twice, and it isn't a bug.
Delivery is at-least-once, so a plain insert on checkout.session.completed double-provisions the account. I key the write on the event id and upsert, then let Supabase RLS decide who reads that row.
Post image
Maty's avatar
Idempotency is one of those details that saves a painful production incident later. Do you also keep the raw Stripe event payload for debugging failed retries?
Dusko's avatar
Good instinct. Yes — I log the raw event into a separate webhook_events table (event ID, type, full payload) rather than writing it straight into the subscriptions table. That way a failed retry is a diff against what Stripe actually sent, not a guess, and you catch cases where...
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started