What it is
A double entry ledger records every financial event as at least two entries: a debit to one account and an equal credit to another. The sum of all entries for one transaction is always zero, so money is never created or destroyed, only moved.
Why payments use it
- It gives a single source of truth for every balance.
- It makes errors visible because the books must always balance.
- It supports an immutable append only history that auditors can replay.
How a charge looks
When a customer pays ten dollars, you credit the customer account and debit the merchant account. The two entries belong to one transaction and commit together.
Practical rules
- Never mutate a posted entry. To fix a mistake, post a reversing entry.
- Derive balances by summing entries, or keep a running total updated inside the same transaction.
- Store an amount, a currency, and an account on every entry.
Key idea
A double entry ledger turns every payment into balanced debits and credits, making the books a trustworthy and auditable source of truth.