Design a merchant settlement and reconciliation system

Last updated: August 6, 2025

Quick Overview

Design a system that tracks BNPL purchases across merchants, calculates settlement amounts after fees and refunds, batches payouts, and provides reconciliation reports for financial auditing.

Affirm
System Design
Software Engineer
Affirm
August 6, 2025
Software Engineer
System Design Round
System Design
Hard

7

3

4,755 solved


Design a system that tracks BNPL purchases across merchants, calculates settlement amounts after fees and refunds, batches payouts, and provides reconciliation reports for financial auditing.

Merchant settlement is a critical financial operation at Affirm. This question appears in onsite system design rounds to assess your ability to design systems where financial accuracy is paramount and eventual consistency must be carefully managed.

What the Interviewer Expects
  • Design a ledger system that tracks every financial movement with double-entry bookkeeping
  • Handle the timing difference between consumer payment collection and merchant settlement
  • Support configurable settlement schedules (daily, weekly) per merchant
  • Design reconciliation jobs that detect and flag discrepancies
  • Address partial refunds and how they affect settlement calculations
Key Topics to Cover
Double-entry bookkeeping in software
Batch processing for financial settlements
Reconciliation and auditing
Idempotency in payment operations
Handling refunds and chargebacks
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How would you handle a scenario where a consumer disputes a charge after the merchant has been settled?
  • How do you ensure idempotency in the settlement batch job?
  • What happens if the bank transfer for settlement fails?
  • How would you support real-time settlement for high-priority merchants?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements
  • Functional Requirements:
    • Track BNPL purchases for each merchant with unique identifiers.
    • Calculate total settlement amounts after applying fees, refunds, and chargebacks for each transac...
Capacity Estimation
  • Assuming Affirm processes 1 million BNPL transactions per day with an average transaction value of $100:
    • Daily Transaction Volume: 1,000,000 transactions
    • Total Daily Value: $100,000,...

Submit Your Answer
Markdown supported

Related Questions