CrackOps
Interview PrepTracksLinuxAWS LabSoonInterview RoomSoon
Sign inStart free
CrackOps

Interview prep for the people who keep production up.

[email protected]
ProductInterview PrepTracksDashboardInterview Room
RolesDevOpsSREPlatformCloud
CompanyAboutContactPrivacyTerms
© CrackOps
Tracks/Infrastructure System Design
Expert 4 minSystem design

Design reconciliation so money is never lost or duplicated, even when services crash mid-payment

Scenario

An Indian UPI payments app also acts as a merchant acquirer through its sponsor PSP banks, so it owes merchants settlement and pays cashback from its own pool account. It processes about 900 million payments a month, and reconciliation today is a nightly batch of spreadsheets and SQL that finishes around 11 a.m. the next day. During the last sale, a consumer crash after a Kafka commit skipped 3,400 cashback credits, another bug paid 1,100 merchants twice, and nobody noticed for two days.

The interviewer asks

“Design the ledger and reconciliation system for this platform. I want to know how you guarantee that no payment is lost or counted twice, even when services crash or banks time out, and how you find and fix the ones that slip through.”

The 30-second answer

Every money movement is a balanced double-entry journal in an append-only ledger, written in the same database transaction as the payment state and an outbox row, so nothing is half-done. CDC publishes the outbox to Kafka, and every consumer is idempotent by recording the event ID in the same transaction as its effect, which turns at-least-once delivery into exactly-once effects. Reconciliation is three-way — our ledger, NPCI's settlement data and the bank statement — running continuously during the day and finally per settlement cycle and end of day. Pending, deemed and unmatched items become breaks with owners, ageing and auto-resolution rules, and invariants like 'every journal sums to zero' and 'suspense balance trends to zero' are alerted in real time.

Sign in to finish this question

A free account unlocks the rest of it, and saves your progress across every track.

  • The voiced mock interview (4 min)
  • The full senior answer, step by step
  • Animated architecture diagrams
  • The whole conversation, 14 turns
  • Deep dive: how it works, mistakes, risks and trade-offs
  • 2 copy-ready command snippets
  • 5 follow-up questions they'll ask next
  • A self-check of 8 things interviewers listen for
Create a free accountSign in

More Infrastructure System Design interview questions

  • How would you keep a trading platform up all through market hours and prove every change to an auditor?
  • Design disaster recovery for a trading platform with an RTO under 15 minutes and an RPO near zero.
  • You have two weeks to ship multi-region failover for live matches, and DNS failover is off the table. What do you build?
  • Design a UPI payments platform that rides a 10x festival peak without losing or double-charging a payment
  • Leadership wants active-active across two regions for payments. How do you keep transaction state strictly consistent?
  • Design the home-feed serving path for hundreds of millions of members, fast and degrading gracefully
All Infrastructure System Design questions