A customer intent says what the buyer meant to pay. A processor operation identifies the external request. A ledger transfer records the economic movement. Keeping those identities linked lets the service recover a payment whose response was lost without treating every retry as another purchase.
Follow one $25 payment intent
A single transfer for intent P7 moves $25 out of the buyer account and into the merchant account. The entries balance to zero.
Why it exists
A balanced transfer moves an amount between accounts within a single asset ledger. For a 25-dollar sale, the paired entries explain where the 25 dollars came from and where they went. Balancing entries can still describe the wrong purchase twice, so balancing and deduplication solve separate problems.
View diagram · Payment recordsA stable identity and payload check make the retry safe. Full size
Words to know
Idempotency key
A stable identifier grouping retries of the same logical operation.
Reconciliation
Comparison of independently recorded facts to find unexplained discrepancies.
How it works
Step through the idea, or press Play.
Step 1 of 3
Identify the intent. Store an operation key with a fingerprint of the intended amount, currency and parties. Reuse the key for retries. Reject a changed payload under the same key.
Post a balanced transfer. Represent the movement as matching debit and credit entries in the same asset ledger. Give the transfer a durable ID. A refund is a new linked movement so the history remains explainable.
Reconcile boundaries. A local ledger and an external processor have separate commit points. Record pending work and reconcile provider events by identity. A unique local row alone cannot prove the provider charged exactly once.
Understand it
Start here
The buyer taps Pay twice
A customer sees a spinner after tapping Pay. Follow the purchase through the processor and merchant ledger before deciding what a second tap should do.
The buyer taps Pay twice
Compare provider settlement to the local ledger.
Structure
Payment records
Payment records
A stable identity and payload check make the retry safe.
A split-brain customer receipt
Imagine a processor approved a 25-dollar payment but the local service crashed before issuing a receipt. Recover using the same payment identity and reconcile with provider state. Verify the ledger has exactly one balanced 25-dollar movement and the receipt refers to it.
If two requests share an idempotency key but disagree on amount, silently replaying the first result can hide a client bug. Check the identity against the intended payload. Document the provider’s retention window for keys. A retry after that window needs reconciliation against existing provider records before issuing a fresh operation.
Read the reconciliation report
A balanced local ledger proves an internal accounting property. It cannot prove that every approved external charge reached local storage. Compare independently recorded settlements to internal transfers by provider identity and amount. Surface missing, duplicate and mismatched entries separately so recovery can replay only the missing work.
Reconcile independently
Compare provider settlement to the local ledger.
Trust balance alone
Posting a duplicate movement can still balance.
Summary
The whole topic in one minute.
Keep intent, external outcome and internal movement traceable across retries. Corrections add an auditable movement and reconciliation checks the boundary between systems.