Debugging Payment Races
How to reason about duplicate charges, concurrent refunds, and payment workflow compensation.
Pattern
Money-moving workflows mix retries, external side effects, and concurrent state changes without a durable boundary.
warningSymptoms
- arrow_rightRetry creates duplicate charge
- arrow_rightConcurrent refunds exceed captured amount
- arrow_rightFailed workflow leaves reserved resources
searchWhere to look
- arrow_rightGateway idempotency keys
- arrow_rightRefund transaction boundaries
- arrow_rightWorkflow compensation steps
- arrow_rightReconciliation jobs
buildCommon fixes
- arrow_rightDeduplicate before external calls
- arrow_rightLock or compare-and-swap refund balances
- arrow_rightRecord durable workflow state
- arrow_rightCompensate completed steps on later failure
Practice challenges
No ready practice incident is mapped yet.