The scale
UPI processed 23.66 billion transactions in July 2026. Spread over the month, that is roughly 8,800 transactions every second on average, with much higher peaks. Your own volume is smaller, but the failure modes are the same: timeouts, duplicate callbacks and delayed settlements.
Idempotency everywhere
Every request that creates or changes money must carry an idempotency key, and the server must return the same result for repeated keys. That makes retries safe, which in turn makes timeouts survivable.
Apply the same rule to webhook handlers: payment providers will deliver the same event more than once.
A ledger and events
Record money movements in an append-only, double-entry ledger rather than updating balances in place. Publish state changes as events so fulfilment, notifications and analytics react without coupling to the payment service.
Reconciliation as a first-class job
Match every settlement file to ledger entries daily, flag mismatches automatically and give finance a queue to resolve them. Reconciliation is where most payment bugs surface; make it a product, not a spreadsheet.
Have a project like this in mind?
Talk To Our Team →


