Design a system that handles online payments, integrating with various payment methods like credit cards, debit cards, and digital wallets. The system should manage transactions, handle fraud detection, and provide APIs for merchants.
Suggested time: 45 minutes
Loading the workspace...
A payment gateway sits between a merchant's checkout page and the financial networks that actually move money. It looks simple from the outside: the customer clicks "Pay," money moves, and the merchant ships the order. But underneath, the gateway must support multiple payment methods with different validation rules, enforce a strict transaction lifecycle, detect fraud in real time, manage merchant credentials, and notify merchants asynchronously when things happen. Let's define these requirements precisely.
Process Payments via Multiple Methods
Support the Full Transaction Lifecycle
Evaluate Transactions for Fraud
Manage Merchant Onboarding and API Keys
Dispatch Webhook Notifications
Design a Voting System (medium)
Design a Task Scheduler (medium)
Design an Auction system (hard)
Company guides that list this problem among their sample questions.