← All Problems
HardFintech45 min
Design a Payment System
Design a payment system like Stripe or PayPal that handles transactions, supports multiple payment methods, and ensures financial consistency.
StripePayPalSquareAmazon
Functional Requirements
- Process credit card, debit card, and bank transfer payments
- Handle refunds and chargebacks
- Exactly-once payment processing (no double charges)
- PCI DSS compliance for card data
- Multi-currency support
Steps (0/6)
Step 1: Clarify Requirements
Scale: 1M transactions/day. Payment methods: cards, bank transfers, digital wallets. Features: pay-in, pay-out, refunds. Consistency is critical: no double charges, no lost payments. What about recurring payments?
Key Points
- 1M transactions/day → ~12 TPS average, 100+ TPS peak
- Consistency > availability for financial systems
- Must handle partial failures gracefully
- PCI DSS compliance is mandatory for card data
1 / 6