System Design Masterclass
Paymentspaymentsbankingdistributed-transactionssaga-patternidempotencyadvanced

Design Wire Transfer API

Design a wire transfer API for banking with strong consistency guarantees

Millions of transfers per day, trillions in volume|Similar to Wise, Stripe, Square, Western Union, JPMorgan, Goldman Sachs|45 min read

Summary

A wire transfer API moves money between bank accounts with absolute correctness guarantees - money cannot be created, destroyed, or stuck in limbo. The core challenges are ensuring exactly-once semantics in a distributed system, handling partial failures gracefully, maintaining complete audit trails for compliance, and integrating with legacy banking systems. This is asked at Stripe, Wise, Square, traditional banks, and any fintech company.

Key Takeaways

Core Problem

This is fundamentally a distributed transaction problem where the invariant (money conservation) must NEVER be violated, even during failures.

The Hard Part

Ensuring exactly-once semantics when network failures, timeouts, and retries are inevitable. Money cannot disappear or be duplicated.

Scaling Axis

Scale by partitioning accounts across database shards. Cross-shard transfers require distributed coordination.

The Question: Design an API for wire transfers between bank accounts that handles millions of transfers daily with absolute correctness guarantees.

Wire transfers are critical infrastructure for: - Moving money between accounts (internal and external) - Business payments like payroll, vendor payments, invoices - International remittances across currencies and jurisdictions - Settlement systems between financial institutions

What to say first

Before I design this, I need to understand the consistency requirements. In payments, we typically need strong consistency - eventual consistency is not acceptable when money is involved.

Hidden requirements interviewers are testing: - Do you understand why payments need stronger guarantees than typical systems? - Can you design for exactly-once semantics? - Do you know the Saga pattern for distributed transactions? - Can you handle compliance and audit requirements? - Do you understand idempotency in payment systems?

Premium Content

Sign in to access this content or upgrade for full access.