How the interviewer opens it
“Design a service that issues invoices, tracks amounts due, and applies partial payments and credit notes. The service must preserve an audit history as each invoice moves through its lifecycle.”
The prompt is vague on purpose. The first minutes are for you. Reduce the prompt to the core features and agree on the numbers before you draw.
What to clarify first
- Scale
- Read and write mix
- Latency
- Consistency and availability
- Durability and retention
- Invoice lifecycle and numbers
- Currency and tax
- Payments
- Credit notes
- Audit requirements
The interviewer has the answers. In a SysRound round, Alex gives these answers, as a real interviewer does.
Scope of a strong answer
Core requirements
- Create drafts and issue invoices
- Record payments and apply them to invoices
- Issue credit notes and calculate amounts due
- View invoice state and audit history
Usually out of scope
- Process payments through banks or card networks
- Calculate taxes or convert currencies
- Execute refunds
- Provide a full general ledger
- Implement country-specific legal rules
What interviewers ask about
- Concurrent financial changes
- Payments and credits can arrive together. Their combined effect must preserve both the invoice balance and the customer's money.
- Balance correctness and reconstruction
- An issued invoice must retain its original meaning. Later corrections must explain every change to the amount due.
- Repeated payment reports and requests
- A lost response can cause a duplicate financial action. Repeated reports can use different request identifiers for the same payment.
Common mistakes
- The service stores only the current amount due and loses the financial history.
- The service changes issued invoice details instead of recording a correction.
- The design treats a credit note as a cash refund.
- The service ignores excess money when a credit follows payment.
- The service trusts cached balances or separate writes for financial decisions.
- The design requires a full event-sourcing platform or general ledger without a stated need.
The bar by level
- Senior (L5/E5)
- Defines allocation invariants and handles concurrent commands. Returns excess funds after credits. Explains durable idempotency, external reference checks, and past balance reconstruction.
- Staff (L6+/E6+)
- Separates legal requirements from product rules. Defines audit access controls, reconciliation, and recovery tests. Adapts large allocations and tenant isolation without weakening financial guarantees.