hard

Design a Payment Gateway System

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...

About this problem

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.

What your design needs to cover

  • Process Payments via Multiple Methods

  • Support the Full Transaction Lifecycle

  • Evaluate Transactions for Fraud

  • Manage Merchant Onboarding and API Keys

  • Dispatch Webhook Notifications

Key challenges the editorial covers

Learn from other designs

Related problems

Guides