System Design Prompt
You are designing an online donation service for a 3-day charity campaign.
Requirements
-
Donors can:
-
Select a charity campaign (single campaign lasting 3 days).
-
Enter donation amount and basic donor info.
-
Pay using a
third-party payment provider
(e.g., card processor).
-
Receive a confirmation (and optionally a receipt).
-
The system must handle:
-
Payment failures
(declines, timeouts, provider errors).
-
Retries
and
idempotency
(avoid double-charging/double-recording).
-
High traffic spikes
(campaign launches and closing hours).
-
Accurate reporting of total funds raised.
Out of scope (optional, clarify with interviewer)
-
Fraud detection, tax receipts, multiple charities, recurring donations, chargebacks.
Deliverables
Describe:
-
APIs and high-level architecture.
-
Data model and key flows (happy path + failure paths).
-
How you ensure correctness (no duplicates) and scalability.
-
Observability and operational considerations.