This challenge builds on Payment Gateway 1 - Online Checkout. Complete it first for the best experience.
PayFlow has grown into a global payment platform processing 50 million transactions per day across 30 countries. New challenges:
- Real-time fraud detection - an ML pipeline must score every transaction in < 100 ms. It analyzes velocity (how many charges in the last hour), geolocation anomalies, device fingerprints, and behavioral patterns. Flagged transactions are held for manual review.•Multi-currency settlement - merchants receive payouts in their local currency. The system must handle FX conversion, ledger entries in multiple currencies, and end-of-day settlement batches.•Regulatory compliance - PSD2 / Strong Customer Authentication in Europe, different reserve requirements per country, and real-time reporting to financial regulators.•Disaster recovery - a payment system can never lose a transaction. RPO = 0, RTO < 60 seconds.•Ledger integrity - implement a double-entry accounting ledger that can be reconciled to the penny across billions of transactions.
This challenge tests distributed transactions, financial system design, and real-time ML at scale.
Scale to 50 M transactions/day across 30 countries with real-time fraud detection and multi-currency settlement. Build this architecture under realistic production constraints, then validate tradeoffs in the design lab simulation.
Request path: The solution keeps ingress, service logic, and stateful dependencies separated so each layer can scale independently.
Reference flow: Web Clients -> DNS -> Load Balancer -> Core Service -> Primary NoSQL DB -> Replica SQL DB -> Event Bus -> Background Workers