# Design an invoicing system: system design interview question

> Correct invoice balances under concurrent payments and credits, fixed issued documents, and a complete audit history.

Source: https://sysround.com/questions/design-invoicing-system
Updated: 2026-11-05


Difficulty: hard. Levels: Senior, Staff+.

## 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."

## 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

## 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 probe

### 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:** Defines allocation invariants and handles concurrent commands. Returns excess funds after credits. Explains durable idempotency, external reference checks, and past balance reconstruction.
- **Staff+:** Separates legal requirements from product rules. Defines audit access controls, reconciliation, and recovery tests. Adapts large allocations and tenant isolation without weakening financial guarantees.

Practice this question with an AI interviewer: https://sysround.com/practice/new?problem=invoicing


---
SysRound (https://sysround.com) is an AI practice tool for system design interviews. It has a voice or typed AI interviewer and a shared whiteboard. At the end, you get feedback on each skill and a model answer. The AI feedback can be wrong.
