Cross-border payments: SWIFT and foreign exchange
How money moves between countries and currencies, what SWIFT actually is, and why international transfers are slow and costly.
On the roadmap:Interview Ready · step 6: Payments and money
Lesson 8 of 18 · 9 min read · quiz · exercise
The problem
Paying someone across borders or currencies is harder than paying next door. Different banks, rules, currencies and time zones are involved, and there is no single global bank.
Messages versus money
Two things happen and they are often confused:
- Messaging: telling the other bank what to do. SWIFT (the Society for Worldwide Interbank Financial Telecommunication) is a secure messaging network with standard message formats. It does not hold or move money.
- Settlement: actually moving the value, by adjusting balances in accounts that banks hold with each other, or at a central bank.
Figure SDA-RWS-08-1 · A payment message crossing a messaging network · © forcsguy.com
Correspondent banking
If your bank has no direct relationship with the recipient's bank, it uses correspondent banks. Banks hold accounts with each other:
- A nostro account: "our money held at your bank, in your currency".
- A vostro account: the mirror view, "your money held at our bank".
Figure SDA-RWS-08-2 · Correspondent banking chain · © forcsguy.com
Each additional hop can add fees, delay, and a chance of error or manual review, and the sender often cannot see where the payment is.
Foreign exchange
Paying in another currency needs currency conversion:
- Rates come from the FX market (banks and liquidity providers). A provider quotes you a rate that includes a spread (their margin) over the market rate.
- A quote can be locked for a short time, since rates move constantly, so the system must record the quoted rate and its expiry.
- The cost of a transfer is fees plus spread, so a "free" transfer may still be expensive.
- Hedging and netting (offsetting payments in opposite directions) reduce a provider's risk and cost.
Figure SDA-RWS-08-3 · A currency conversion inside a transfer · © forcsguy.com
The layers of the currency market
Behind a single conversion sit three layers. A payment company's own funding pool serves retail needs and is usually topped up in advance. When the pool runs low it trades with wholesale providers, who batch many such orders. Those wholesalers in turn trade with the large international banks at the top. Pre-buying currency in bulk is why a customer's conversion can feel instant even though the settlement happens later.
Compliance
Cross-border payments pass sanctions screening, anti-money-laundering (AML) monitoring and know-your-customer (KYC) checks. Suspicious payments are held for manual review, which causes much of the delay. A design must keep full audit trails and be able to stop and explain any payment.
Faster alternatives
- Local payment rails (for example SEPA in Europe, Faster Payments in the UK, UPI in India, Pix in Brazil) are cheap and quick domestically. Some services pre-fund local accounts in each country, so a transfer becomes two local payments with the FX done in between, without moving money across borders each time.
- Instant, standards-based schemes and new interbank initiatives aim to shorten the chain and improve tracking.
- Some systems use stablecoins or other digital rails for settlement, with their own regulatory and operational risks.
Designing a system that sends money abroad
- Treat each transfer as a long-running workflow with states (quoted, submitted, in review, settled, failed, returned).
- Store the quote (rate, fees, expiry) and show the customer the total up front.
- Use idempotency keys and a ledger (previous lesson), with separate accounts per currency.
- Handle returns and rejections: money can come back days later, and the workflow must refund and notify correctly.
- Reconcile with every partner bank or provider daily, in each currency.
Real-world reading
Related reading
- Nubank BlogNubank engineers · NubankBlogs
- Klarna BlogKlarna engineers · KlarnaBlogs
- Coinbase BlogCoinbase engineers · CoinbaseBlogs
- Kraken BlogKraken engineers · KrakenBlogs
Show 6 moreShow fewer
- Capital One BlogCapital One engineers · Capital OneBlogs
- Stripe Engineering BlogStripe engineers · StripeBlogs
- Monzo: How Peer-To-Peer Payments WorkMonzo engineers · MonzoBlogs
- Architectures of Finance, Banking, and Payment SystemsRedhat engineers · RedhatCase Studies
- Google Cloud BlogGoogle Cloud engineers · Google CloudBlogs
- Algolia Engineering BlogAlgolia engineers · AlgoliaBlogs
Check your understanding
Question 1 of 3
0 correct so far
What is SWIFT?
Go deeper
- Bank for International Settlements: cross-border payments by BIS: search the site for cross-border payments; reports on why they are slow and costly
Topics covered in this lesson
Practise it: A slow partner and a failed ledger
Everything below is already set up for this lesson: change the design, run the traffic, and see whether you meet the goal.
- 1The task
- 2Build and test
A downstream bank is unreachable and the ledger database fails. Payments in flight must neither be lost nor duplicated.
Goal: Under 5% errors during the outage.
Queue the work and make it safe to retry.
Try it yourself
A company in Europe pays a supplier in Japan. Describe the main steps and three reasons it may take a day or more and cost more than a domestic payment.
Click what a strong design here would need:
More in Real systems
© 2026 forcsguy.com. Original lesson text and diagrams. Books and sites linked above belong to their authors.