Case study · Payments & banking · complexity 4/5
How India's Unified Payments Interface routes one payment through two apps, two banks and a national switch — with NPCI's and RBI's published rules as the documented example
This is an educational reference architecture. Where we cite NPCI's or RBI's own published material, or press reports of it, it is marked as documented. We do not describe the internal systems of NPCI or of any bank.
Asha types ravi@psp and ₹500 into her UPI app; she never needs Ravi's account number. The app sends one pay request to NPCI's switch, which links every bank.
Architecture evolution
Both accounts live in the same core banking database, so a transfer is one database transaction. The debit and the credit commit together or not at all.
Components
What breaks next
Reach, not load. Customers can pay only people at the same bank, and paying anyone else means account numbers, branch codes and a slower interbank system.
App server
transfer code
Database
accounts table
Write-ahead log
on disk
Swipe the diagram sideways to see every column →
Where the time goes
8 ms total
Move ₹500 from Asha (balance ₹2,000) to Ben (balance ₹1,000). The app server crashes after the first UPDATE, restarts, and retries the transfer. Timings are an illustrative model.
Illustrative timings. Real numbers vary with distance, network quality and server load.
The is India's real-time payment system: from a phone app, anyone with a bank account can pay any other account in seconds, at any hour. developed it and runs it, and in October 2026 it carried about 25.5 billion payments worth about ₹31.5 lakh crore, according to the Reserve Bank of India (RBI).
Documented UPI volume
One UPI payment takes money out of an account at one bank and puts it into an account at another, and the two banks' computers share no database. Every hop between them can be slow, down or silent, and every outcome must still leave the money in exactly one place.
One payment, five organizations, many ways to fail
A UPI payment can involve up to four parties plus the switch: the payer's and the payee's (PSPs), which run the apps, and the and , which hold the accounts. NPCI's switch in the middle routes every message between them, as NPCI's procedural guidelines describe.
The four-party model
Before the first payment, the app binds itself to the phone and to the bank account; after that, every payment is a short conversation through the switch. The switch resolves the UPI ID, the payer's bank checks the PIN and debits, the payee's bank credits, and the switch confirms. These steps follow the four-party pay flow in NPCI's procedural guidelines.
A four-party pay request, step by step
Each stage adds parties, not just traffic: one bank's ledger, then many banks behind a switch, then any app with any bank, then national peaks. The numbers in this section are an illustrative model, except the documented figures named in the Stage 4 text.
Each stage adds a new kind of failure
The hardest case is silence: the payer has been debited and the credit reply has not arrived. The safe response is to ask about the same transaction id, never to send a new payment, and documented NPCI rules now limit even how soon and how often that question may be asked.
After a timeout, ask; do not pay again
Customer accounts are debited and credited in real time, but banks do not send each other money for every payment. At each settlement cut-off NPCI nets every bank's payments into one amount owed or due, and settles those amounts through the banks' accounts at RBI; each bank must then reconcile its own records against NPCI's files.
Real-time accounts, batched bank-to-bank money
Five habits carry most of the reliability work: one id per payment, status checks instead of blind retries, limits on how often anyone retries or checks, a circuit breaker for each bank, and capacity planned for the peak second. The status-check limits and shorter response times are documented NPCI rules, as reported; the rest is a typical design, not a description of NPCI's or any bank's systems.
Each failure mode gets its own response
A breaker per bank keeps one slow bank contained
UPI went from its launch in 2016 to about 25 billion payments a month in 2026. Its documented rules moved with it, from a per-member benchmark of 150 payments a second to national limits on status checks and tighter response times.
Documented milestones
A national-scale UPI platform has a fast path measured in seconds, from the app through the PSP and the switch to two banks, and a slow path measured in settlement cycles, for settlement, reconciliation and complaints. This is a typical educational design that fits the documented roles, not a diagram of NPCI's or any bank's systems.
A fast path for payments, a slow path between banks
Every rule that makes UPI safer costs something: shorter timeouts leave more payments unknown, status checks add load, net settlement makes banks trust each other until the cut-off, and per-bank breakers turn some payments away. The documented rules settle some of these dials; the rest are design choices for each member.
Four dials every payment network sets
Five things typically go wrong in a payment network like UPI: a bank is down, a reply is lost after the debit, a request is sent twice, clients flood the switch with status checks, or a bank cannot pay its net debit at settlement. The status-check flood and the settlement rule are documented; the responses to the others are typical design.
A bad day in a payment network, five ways
These simulations are stand-ins for two UPI ideas: a transfer inside one bank, which a database transaction makes safe, and a switch that stops sending work to a failed bank, which health checks show in a load balancer. Their numbers are illustrative models, not UPI measurements.
What each simulation stands for
App server
transfer code
Database
accounts table
Write-ahead log
on disk
Swipe the diagram sideways to see every column →
Where the time goes
8 ms total
Move ₹500 from Asha (balance ₹2,000) to Ben (balance ₹1,000). The app server crashes after the first UPDATE, restarts, and retries the transfer. Timings are an illustrative model.
Illustrative timings. Real numbers vary with distance, network quality and server load.
Served
0/s
Errors
0%
p50 latency
0 ms
p95 latency
0 ms
Avg busy
0%
Cost / hour
$0.00
illustrative
Failures
Tip: you can also click a server in the diagram.
Four servers behind a load balancer, each 10,000 req/s, sharing 24,000 req/s. One of them is about to crash.
Illustrative model: rates, queues and latency follow simple queueing rules, not a production benchmark.
The roles, the PIN path, address resolution, pay and collect, net settlement through RBI accounts, RBI's reversal deadlines, the 2025 status-check and timer rules, and the volume figures are documented in the sources. The stages, the idempotency and breaker designs, the reconciliation method and all derived per-second numbers are our assumptions.
Where each part of this page comes from