← Back to Questions
ExpertFintechStripeSquarePayPalGoldman Sachs

Design a Payment System (Stripe/Square)

Design a payment processing system that handles card payments, bank transfers, and digital wallets with PCI compliance.

⏱️ Expected Duration: 60 minutes
View Senior Solution

Key Topics to Cover

IdempotencyDistributed TransactionsFraud DetectionPCI ComplianceLedger System

💡 Senior Engineer Focus Areas

  • Double-entry bookkeeping
  • Saga pattern for transactions
  • Reconciliation systems
  • Regulatory compliance

Recommended Approach

1. Requirements Clarification

  • Functional requirements: Core features users need
  • Non-functional requirements: Scale, latency, availability, consistency
  • Out of scope: What we won't design today
  • Constraints: Budget, timeline, existing systems

2. Capacity Estimation

  • Daily/Monthly Active Users
  • Read/Write ratio estimation
  • Storage requirements calculation
  • Bandwidth estimation
  • Peak load considerations

3. High-Level Design

  • Main components and their responsibilities
  • Data flow for primary use cases
  • API endpoints and contracts
  • Database schema overview

4. Detailed Component Design

  • Deep dive into critical components
  • Database design and scaling strategy
  • Caching layer architecture
  • Message queue implementation

5. Bottlenecks & Trade-offs

  • Identify single points of failure
  • Discuss CAP theorem trade-offs
  • Scaling challenges and solutions
  • Cost optimization opportunities

Clarifying Questions to Ask

Functional

  • • What are the core features we must support?
  • • What user actions are most critical?
  • • Are there any features we should exclude?

Non-Functional

  • • Expected number of users/scale?
  • • Latency requirements?
  • • Availability vs consistency preference?
  • • Any geographic distribution needs?
Senior Insight

Judgment > Diagrams

Candidates often fail by treating system design as "draw a diagram" instead of demonstrating judgment, trade-offs, and real-world reasoning.

How to avoid this

"Explain WHY you chose a specific database or strategy over alternatives."