← Questions
Design a merchant lending system
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A system design interview question asked at Stripe. It tests payments, underwriting and ledger.
Design a system that offers business loans to merchants of a payments platform based on their payment history, then collects repayment automatically by keeping a fixed share of each day's sales until the loan and its fee are paid off.
Requirements
- Functional: decide which merchants are eligible and for how much, from their processing history; present offers; accept an offer and disburse the funds; withhold a percentage of each payout until the balance is paid; show merchants their balance and history; handle refunds, disputes, missed periods and early repayment.
- Non-functional: money is never lost, double counted or double withheld; every repayment ties to the payments it came from; eligibility models are explainable and auditable; the system complies with lending rules in each country.
Clarifying questions
- Is the fee fixed at the start, or does it grow with time like interest?
- Is there a minimum repayment if sales drop?
- What happens if a merchant moves volume off the platform or stops processing?
- How often are offers recomputed, and how many merchants are eligible?
- Who funds the loans: the platform's balance sheet or a partner bank?
What a strong answer covers
- A data model: offers, loans, the repayment schedule, withholdings tied to each payout, and a ledger with double-entry postings for disbursement, repayment and write-off.
- Underwriting as a batch pipeline over payment history (volume, growth, refund and dispute rates) producing offers, with model versions recorded for audits.
- Repayment in the payout flow: computing the withholding exactly once per payout, idempotently, without delaying payouts.
- Edge cases: refunds after withholding, disputes, negative balances, early payoff, a merchant with several loans.
- Monitoring of repayment progress and risk signals (sales dropping), collections, and reconciliation between the loan ledger and the payments ledger.
Follow-ups
- A bug withheld twice from some payouts for a day. How do you detect and correct it?
- Add a second, refinanced loan that pays off the first.
- Support a country where the lender of record must be a partner bank.
- Merchants want to see predicted payoff dates.
Where it's asked
What it tests
payments · underwriting · ledger
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. New accounts get 5 credits: each one unlocks a question for good.
What the labs asked this week
A weekly email of what OpenAI, Anthropic and the other top AI labs asked engineers, round by round.
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing
