KatInterview

Build a Payment Processing System for Short-Term Campaigns

System DesignModel answer
HardModel answerSystem Designpaymentsasync-processingdistributed-systems

Last updated

Design a scalable payment platform handling donation submissions with async processing, idempotency guarantees, and burst traffic support.

You're building a payment processing system for a short-lived fundraising campaign lasting several days. The platform allows donors to contribute money by entering their information and selecting contribution amounts.

Your system needs to:

  • Accept donor submissions containing personal details and payment information
  • Process charges through a payment service provider
  • Handle traffic spikes that may exceed payment processor capacity
  • Prevent duplicate charges even during network failures
  • Maintain security and compliance standards for payment data
  • Provide confirmation and status tracking to donors

Your task: Design the complete system architecture. Explain when and why you would choose asynchronous payment processing over synchronous. If using async, detail the full workflow including API design, queue infrastructure, worker processes, retry logic, failure handling, and how you ensure exactly-once charging semantics. Address data modeling, security considerations, rate limiting, monitoring, and strategies for handling partial failures.

The interviewer will expect you to discuss tradeoffs, provide concrete schemas and API contracts, and demonstrate understanding of distributed systems challenges in payment processing.

Hints

Hint 1

Consider what happens when request volume exceeds your payment provider's throughput limits

Hint 2

Think about the difference between network timeouts and actual payment failures

Hint 3

Design your idempotency strategy across multiple layers: client-to-API, queue-to-worker, and worker-to-payment-provider