Get your boarding pass

A payments ledger you can trust: a system design interview question

Balances live in one column that gets overwritten. Design a ledger that survives retries, failures and audits. It is a senior-level question of about 45 minutes, and it starts from a system that already works, which is how many real design interviews begin.

How do I approach the a payments ledger you can trust question?

To design a payments ledger, record every transfer as balanced double-entry rows in an append-only table and derive balances from them. Make requests idempotent with client keys, commit each transfer in one transaction, and reconcile with the external bank using an explicit state machine for unknown outcomes.

Practise this design interview

The situation

A wallet app keeps each user's balance in a column on the users table. Sending money subtracts from one row and adds to another in the same request. When a request times out the app retries, and support cannot say why some balances are wrong.

What you are asked to design

Design the money-movement system: transfers between wallets, top-ups and withdrawals through an external bank, at 5,000 transfers a second. It must never create or destroy money, must be safe when a client retries, must be auditable, and must keep working when parts of it fail.

Questions worth asking first

Do we need strict consistency on every transfer, or can some flows settle later?

What are the audit and regulatory requirements: history, immutability, retention?

Is there more than one currency, and do we hold funds in external accounts?

What happens when the bank accepts a request but our system never hears back?

Where interviewers dig

An append-only double-entry ledger, with balances as derived values.

Idempotency keys and exactly-once effects across retries.

Reconciling with the external bank and handling unknown outcomes.

What a strong answer covers

Uses a double-entry, append-only ledger where every transfer is a set of entries that sum to zero; balances are computed or materialised from it and can be rebuilt.

Makes every request idempotent with a client key stored with the result, so a retry returns the original outcome.

Wraps each transfer in one database transaction, locks or orders accounts consistently to avoid deadlocks, and discusses hot accounts and sharding by account.

Treats the external bank as unreliable: records intent first, uses a state machine and a reconciliation job for unknown outcomes, and produces an audit trail.

Traps that cost points

Overwriting a balance instead of appending entries, which loses the history.

A debit and a credit in separate transactions, so a crash between them creates or destroys money.

Retrying a bank call without an idempotency key.

How the practice works here

It works on a laptop or desktop, not on a phone: the canvas and the interviewer's view of your drawing need the screen space.

You talk with the interviewer by voice, and the canvas already shows the company's system as it is today. You extend it, and the interviewer sees what you draw. A button pauses your microphone when you want to think or sketch in silence; the interviewer waits.

When the time is up you get a report: a hire or no-hire call for the level, ratings for problem navigation, solution design, technical depth and communication with a quote from your own answer for each, what to fix, and the points a strong answer covered that yours did not. Your first interview on giveinterview, of any kind, is free, and every interview report is free. After that a design interview costs credits at the same per-minute rate as a role interview, and playing duels earns credits you can spend on it.

Frequently asked questions

How long is this design interview?

About 45 minutes, the length of a typical senior-level design round.

Can I do it on my phone?

No. System design practice needs a computer screen for the canvas, so it is for laptops and desktops only.

Do I have to draw?

Yes. The canvas starts with the current system and the interviewer sees what you add, as at a whiteboard. You can pause your microphone to sketch and explain afterwards.

Is it free?

Your first interview on giveinterview, of any kind, is free, and every interview report is free. After that a design interview costs credits at the same per-minute rate as a role interview, and playing duels earns credits you can spend on it.

Keep reading