Design Idempotent Loan Payment Processing for ACH and Debit Card

Last updated: November 29, 2026

Quick Overview

Design the system that lets OneMain customers make one-time and autopay loan payments by debit card or ACH, posts them to the servicing ledger, and handles later ACH returns and card disputes, without ever double charging a customer or losing a payment.

OneMain Financial
System Design
Software Engineer
OneMain Financial
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the system that lets OneMain customers make one-time and autopay loan payments by debit card or ACH, posts them to the servicing ledger, and handles later ACH returns and card disputes, without ever double charging a customer or losing a payment.

Most OneMain customers pay monthly through the app, website, phone or autopay, and nonprime borrowers are especially hurt by duplicate debits or overdraft fees. The interviewer checks idempotency, the difference between card authorization and ACH settlement timelines, ledger correctness, and reconciliation with processor files.

What the Interviewer Expects
  • Explain card (near real-time authorization) versus ACH (batch, returns up to days later) flows
  • Use idempotency keys at the API and at the processor call
  • Model payment state: pending, submitted, settled, returned, reversed
  • Post to the loan ledger with the correct effective date and reverse cleanly on return
  • Run daily reconciliation against processor and bank files
Key Topics to Cover
idempotency
payment state machine
ACH returns
reconciliation
ledger posting
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
  • An ACH payment returns NSF after it was already applied. What happens to interest, late fees and the customer's delinquency status?
  • How do you schedule autopay around weekends and bank holidays?
  • How would you prevent a customer from authorizing the same payment twice from two tabs?
  • What do you store for card data, and how do you keep the system out of PCI scope as much as possible?
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

Customers schedule one-time or recurring payments by debit card or bank account. Payments must post to the loan with the right effective date so simple interest is correct. Handle ACH returns (NSF, cl...

High-Level Design

Payment API (with client idempotency key) writes a payment intent to a Payments DB. A Scheduler emits due autopay intents daily. Processor Adapters: a card adapter calls a tokenizing processor (card d...


Submit Your Answer
Markdown supported

Related Questions