DesignTheSystem/dev
HARD E-Commerce & Fintech Asked at Stripe, PayPal, Apple

Design Digital Wallet & Payment Ledger

Design an ACID-compliant digital wallet and double-entry ledger handling 10,000 checkout transfers/sec. Ensure zero data loss, strict idempotency, and sub-100ms p99 latency.

Category & DifficultyE-Commerce & Fintech · HARD
Traffic Profile10,000 RPS sustained, 14,000 RPS spike (20% reads / 80% writes)
Latency & Availability SLAp99 < 100 ms · 99.999% availability
Monthly Infra Budget$900/month
Commonly Asked AtStripe, PayPal, Apple, Square

Scale, traffic & SLA targets

To pass in the DesignTheSystem simulator, your architecture must hold all four targets simultaneously across a 60-second load run (spiking up to 14,000 RPS):

Peak traffic10,000 RPS20% reads / 80% writes
Latency (p99)< 100 ms99th percentile target
Availability99.999%Max error rate 0.00%
Monthly budget$900/moPriced per component

Functional & non-functional requirements

Functional scope

  • Serve Design Digital Wallet & Payment Ledger at the traffic below.

Non-functional goals

  • p99 latency under 100 ms at the spike.
  • At least 99.999% of requests answered.
  • Costs no more than $900 a month.

Core challenge: Money is never lost or doubled

Every transfer must happen exactly once, even if the user taps twice or a server dies halfway. Use transactions in a relational store with a synchronous standby, and give each request a key so retries are safe.

What breaks first?

Run the starting design first and look at what breaks. ACID Double-Entry DB reaches 412% of its capacity at the spike, and Ledger Transaction Service 89%. About 25% of requests fail. Open Full metrics to see which requests pile up there, and ask why that part gets so much traffic.

Key architectural trade-offs

  • Accepting an order before it is saved means telling the user 'processing' first, and every step must be safe to retry so nothing is charged twice.

Starting architecture & how to practise

The simulator starts you with a baseline setup: Checkout Ingress → Ledger Transaction Service → ACID Double-Entry DB. Run the baseline under 10,000 RPS to watch exactly which component saturates first, then add caching, queues, replicas, sharding or CDN until latency, availability and cost all turn green.

Common interview questions for Design Digital Wallet & Payment Ledger

What are the target SLA and scale numbers for Design Digital Wallet & Payment Ledger?

Design for 10,000 RPS sustained (spiking to 14,000 RPS) with a 20% read / 80% write mix, keeping p99 latency under 100 ms, availability at or above 99.999%, and infrastructure spend within $900/month.

What is the main architectural bottleneck in Design Digital Wallet & Payment Ledger?

Every transfer must happen exactly once, even if the user taps twice or a server dies halfway. Use transactions in a relational store with a synchronous standby, and give each request a key so retries are safe.

How can I verify my Design Digital Wallet & Payment Ledger architecture works under load?

Open the live simulator to wire up load balancers, caches, queues, replicas, or shards and run a 60-second traffic simulation that grades latency, error rate, and monthly cost automatically.

Pair with Low-Level Code Design

Want to design the internal classes and data structures too? Try the matching LLD coding problem: Design Digital Wallet.

Recommended lessons before you build

Related E-Commerce & Fintech problems