KatInterview

Designing a High-Traffic Campaign Donation System

System DesignModel answer
HardModel answerSystem Designpaymentsscalabilitydistributed-systems

Last updated

Build a payment platform for a short-duration global fundraiser with real-time totals, idempotency, fraud prevention, and spike handling.

You need to architect a payment system for a worldwide charitable fundraiser running for exactly 72 hours. The platform must accept contributions from donors globally, process payments through third-party providers, display live aggregate statistics, and maintain strict financial correctness.

Your design should cover:

Core functionality:

  • Contribution creation and payment processing flow
  • Refund handling
  • Live aggregate metrics (total raised, contributor count)
  • Public rankings (top teams, top individual fundraisers)

Technical requirements:

  • Payment idempotency to prevent duplicate charges
  • Fraud detection and prevention
  • Traffic spike management (expect sudden surges from media coverage)
  • Multi-region deployment for global availability
  • Real-time or near-real-time metric updates
  • Handling payment provider webhook delays and ordering issues

Deliverables:

  • API endpoints specification
  • Data storage schema
  • System architecture diagram and component descriptions
  • Scalability approach with capacity planning
  • Trade-off discussions for consistency, availability, and performance
  • Failure mode analysis
  • Testing and deployment strategy

Make explicit assumptions about traffic patterns, volumes, and business constraints. Explain your reasoning for key architectural decisions.

Hints

Hint 1

Consider how to prevent a donor from being charged multiple times even if they retry or experience network issues

Hint 2

Think about what happens when metrics are read 100x more often than donations are written

Hint 3

Payment webhooks from providers can arrive out of order or be delayed by minutes—how does this affect your state management?