Scenario

Idempotent payment capture under a retry storm

You own the capture service. Merchants call you; you call the PSP. A customer must never be charged twice. Steady traffic is 200 rps, bursting to 2,000 during a flash sale. The PSP times out on about 0.5% of calls, and a timeout tells you nothing about whether the charge happened.

capturededup + ledgerchargeMerchantlockedCapture API2 decisionsLedger3 decisionsPSPlocked