LLDHub
Problems·Payment Gateway
L8 · Hard

Payment Gateway

Problem

Design a payment processing system that handles transactions across multiple payment methods and providers.

Requirements

  • Support payment methods: Credit Card, UPI, Net Banking, Wallet
  • Process, refund, and capture transactions
  • Idempotency for duplicate request protection
  • Webhook notifications for payment status
  • Fraud detection hooks
  • Transaction history and reconciliation

Constraints

  • Each transaction must have unique idempotency key
  • Refund only possible within 30 days
  • PCI compliance: never store raw card data
✓ Saved