Design a global payment platform similar to Stripe that can process credit-card payments, handle refunds, and support multiple currencies and payment methods. The system must be able to scale to millions of merchants and billions of transactions per day while guaranteeing exactly-once money movement, sub-second authorization latency, and 99.99 % availability. You need to expose RESTful APIs that let a merchant create a payment intent, confirm it, receive webhooks on state changes, and fetch settlement reports. Internally the platform must route each charge to the best payment processor (acquirer) based on card type, issuer country, cost, success-rate history, and real-time health, while automatically failing over if an acquirer is down. You must store an immutable financial ledger that records every authorization, capture, refund, and fee in double-entry form so that daily reconciliation with each processor’s settlement file balances to the cent. Provide high-level designs for: (1) the stateful payment-intent service that guarantees idempotent charge creation and at-least-once delivery of webhooks, (2) the acquirer-routing service that chooses and switches processors without duplicate charges, (3) the ledger service that keeps an append-only book of accounts and detects discrepancies, (4) the settlement & reconciliation pipeline that matches internal records to external bank files and raises alerts for any mismatch. Discuss how you would achieve PCI compliance, encrypt PANs, tokenize cards for repeat use, and still keep the system observable for debugging. Assume 50 k requests per second at peak, $50 B total payment volume per month, and a global deployment across AWS regions.