A payment service promises 99.9% availability over a 30-day month.
Bank Software Engineer Practice Test
What a bank asks of its code: a ledger's rules, one duplicate payment incident, and a pull request to review.
BY MICHAEL SHANG · SIXTEEN YEARS IN COMMERCIAL BANKING · UPDATED
// THE SHORT ANSWER
A bank software engineer practice test asks whether you know what a bank demands of its code: money that adds up, payments that happen once, and changes you can undo. This paper has three parts: ledgers, retries, money arithmetic and change control; one duplicate payment incident, set on an exhibit; and a short payment function to review. You read code here and do not write it, so it does not replace your own technical round. Every question is original, and none comes from any bank's test. Sit it against a thirty-minute clock, or take it as practice.
BASIS Practitioner judgment from sixteen years in commercial banking, set out in How Bankers Think (Highbank Press, 2026). Every borrower on this site is a composite constructed for teaching, not a client. The market is mid-market commercial lending as practised in New Zealand and Australia; where a convention differs elsewhere, the page says so.
// HOW TO SIT IT
Answer below as practice, and each read opens as you go. Or sit it as a test: 30 minutes, with every read held back until you finish.
PART A
What a bank asks of its code
What makes bank software different from most software.
In a double-entry ledger every transaction posts equal debits and credits. A report shows that total debits and credits across the ledger differ by US$40.
What does that tell you?
A client sends 'pay US$500 to this account', and the connection drops before any reply. The client does not know if it worked, and sends it again.
What makes this safe?
The core banking system and the card system disagree about a customer's balance by US$200. A developer says: 'Core is the master. Just overwrite the card system.'
What is wrong with that?
A fix to a payment limit check is ready at 4pm on Friday. It has passed its tests. The product owner wants it live tonight, because a client is asking.
What do you do?
A nightly job adds interest using binary floating point, where 0.1 + 0.2 comes out as 0.30000000000000004. It runs over 40 million accounts.
What do you change?
A customer in Auckland schedules a payment for 1 March. The system stores midnight local time, which is 11:00 on 28 February in UTC. The nightly job works in UTC, and pays it on 28 February.
What is the real defect?
A tester asks for a copy of production customer data, because the test data does not reproduce a bug. It is urgent, and they promise to delete it afterwards.
What do you do?
PART B
The incident
One afternoon, nine questions. Read the timeline as if you had just been handed it.
EXHIBIT L · THE INCIDENT
A bank's payment service, one Tuesday afternoon, from the incident timeline.
| Time | What happened |
|---|---|
| 14:02 | A salary batch of 412 payments, US$3.2m, is sent to the payment rail. |
| 14:03 | The gateway times out after 60 seconds, waiting for the rail's acknowledgement. |
| 14:05 | The service retries automatically, and gives the retry a new message ID. |
| 14:06 | The rail accepts the retry. It had received the first batch after all. |
| 14:40 | A reconciliation job flags debits of US$6.4m against US$3.2m expected. |
| 14:55 | The contact centre reports customers being paid twice. |
| 15:10 | An engineer offers to fix the ledger database directly with a script. |
From Exhibit L.
What made the batch go out twice?
It is 14:40 in Exhibit L, and reconciliation has just flagged debits of US$6.4m against US$3.2m expected.
What is the first thing to do?
At 15:10 in Exhibit L, an engineer offers to run a script directly on the ledger database to reverse the second batch. 'It is quick, and I have access.'
What do you say?
In Exhibit L, the second batch has been accepted by the rail. A manager asks: 'Can we just pull the money back tonight?'
What is the accurate answer?
It is 14:45 in Exhibit L. The engineers are working on it. You are the incident lead.
Who needs to know now?
In Exhibit L, nothing in the payment service noticed the duplicate. A scheduled reconciliation job found it 38 minutes after the batch went in, because of when it happened to run.
What does that tell you?
After Exhibit L, an engineer proposes raising the gateway timeout from 60 seconds to five minutes. 'That stops it happening again.'
What do you say?
The retry fix from Exhibit L is ready. A colleague has tested that a normal batch still goes through.
What test proves the fix?
At the Exhibit L review, a senior manager asks: 'Who wrote the retry code? I want that person off the payments team.'
What do you say as the incident lead?
PART C
The pull request
Seven lines, seven questions. You read this code rather than write it; your own technical round will test the writing.
EXHIBIT P · THE PULL REQUEST
A short payment function up for review, in no particular language. getBalance and debit each run as their own database transaction. sendToRail calls the payment network. req.card is the full card number.
| Code | |
|---|---|
| 1 | function pay(req): |
| 2 | balance = getBalance(req.account) |
| 3 | if balance >= req.amount: |
| 4 | debit(req.account, req.amount) |
| 5 | sendToRail(req.payee, req.amount) |
| 6 | log("paid", req.account, req.card) |
| 7 | return "ok" |
In Exhibit P, two requests for the same account arrive at the same moment. The balance covers one of them.
What can happen?
In Exhibit P, the process dies between line 4 and line 5.
What has happened to the customer?
In Exhibit P, line 5 times out, and the client sends the same request again.
What happens on the second call?
Look at line 6 of Exhibit P.
What should a reviewer say about it?
In Exhibit P, the balance is too low at line 3.
What does the caller get back?
The author of Exhibit P says: 'Tests pass, and the happy path has 100% coverage. Please approve. The release is tomorrow.'
What do you do?
The fix for Exhibit P is written and reviewed, and it touches live payments.
How do you release it?
0 OF 24 ANSWERED · 0 WITH THE SENIOR READ · 0 STANDS UP · 0 OFF THE LINE
// THE REST OF THE ROUND
Every question here is original; none is any bank's real test. Written for: Software engineer.
- Software engineer: the interview questions, against a two-minute clock.
- Situational judgement, for any seat.
- The assessment centre: a whole case in forty-five minutes.
// SUBSCRIBE
The Lab.
One case file and one question, in your inbox every Tuesday morning, New Zealand time. The senior banker's read opens only after you answer.
FREE WITH IT · 10-PAGE PDF
Case 01 of the interview case pack — Northmark Engineering, in full.
No spam. Unsubscribe anytime. Educational content only.
