Designing idempotent payment webhooks that survive retries
Processors retry. Banks duplicate files. Your handlers must not double-pay or double-post — patterns that work in production.
Rise Engineering
Platform & infrastructure
Webhooks are at-least-once delivery systems pretending to be events. Engineer for duplicates by default.
Store external IDs with unique constraints and return 200 on replays when state already matches intent. Log mismatches loudly.
Separate ingestion from side effects. Queue ledger commands only after durable dedupe.
Chaos-test with intentional duplicate bursts before Black Friday payroll week.
Work with Rise
Building something in production?
We ship the same rails we write about — B2B infrastructure and consumer apps in market.
Book a discovery call