Skip to content

Payments

Nine questions that reveal whether your ledger is actually correct

Ledgers that fail an audit usually failed quietly for years. These are the questions we ask first.

HemaisPayments practice3 min read

A ledger rarely announces that it is wrong. It drifts. Balances get recomputed nightly, a repair job absorbs the difference, and nobody with authority hears about it.

We open payments reviews with these nine questions. None need access to your code. Anyone who has run the system for a quarter can answer them.

1. Is a balance recorded, or reconstructed?

If you sum transactions at read time, you have a query that returns money, not a ledger. Reconstruction hides ordering bugs, because the recomputation applies its own order. Record balances as entries, with the running position verifiable against the entry log.

2. What happens if the same request arrives twice?

Networks retry. Clients retry. Your queue consumer will redeliver at least once, whatever the documentation claims.

Every money-moving operation needs an idempotency key with a defined retention window. The second request must return the first result, not repeat the work.

3. Can an entry be modified after it is written?

If an UPDATE can touch a posted entry, the audit trail is advisory. Corrections belong in compensating entries that reference the original. That is the difference between a history and an opinion about history.

4. Where do rounding remainders go?

Split a $10.00 fee three ways and one cent has to land somewhere. Leave that undefined and you accumulate a small, persistent imbalance. The allocation rule should be explicit, deterministic and recorded, usually in a designated remainder account.

5. Are holds and captures modeled separately from settlement?

An authorization is a claim on funds. A capture is a movement. Settlement is when the money is actually somewhere else.

Collapse those into one state and the ledger cannot say what a customer can spend right now. That is the question customers ask most.

6. What is the reconciliation window, and who watches it?

Reconciliation is three-way: your ledger, your processor, your bank statement. Run it continuously, with breaks classified and aged. A daily batch that produces a spreadsheet nobody opens is theater.

7. Can you replay a day?

From the event log, can you rebuild the ledger exactly as it stood at any past moment? If not, you cannot answer a dispute, a regulator, or your own engineers at 03:14 on a Tuesday.

8. What is the behavior when the downstream is unavailable?

Processors have outages. Failing the customer outright is rarely correct, and recording a movement that did not happen never is. Pending states with explicit timeouts and a reconciliation sweep are unglamorous and right.

9. Who is allowed to write a manual entry?

Every ledger eventually needs a manual adjustment. The question is whether that path has dual authorization, a mandatory reason code and an immutable record. The alternative is a database console at 2am.

What to do with the answers

Uncomfortable answers to two or three of these are normal. Uncomfortable answers to one, three and seven together mean you cannot prove your balances. Stop other work for that.

Proving a balance is harder than computing one, and proof is what an audit asks for.

Remediation is rarely a rewrite. A shadow ledger fed from the same event stream, run quietly alongside the incumbent for six to eight weeks, shows you exactly how wrong you are. It also gives you a migration path that needs no maintenance window.

From the practice

Payments practice at Hemais

Written by the practitioners who do this work.

Questions about anything here? Write to hello@hemais.org. It reaches the practice, not a marketing inbox.

Next step

Tell us what is not working.

A thirty-minute call with a principal, not a salesperson. If we are not right for the problem, we will say so.