Just imagine this for a second.
You scan a QR code, enter your PIN, and within 2–3 seconds the money reaches another bank account.
No account number. No IFSC code. No waiting hours.
It feels so normal today that we rarely stop and think about the engineering behind it.
But the reality is - UPI is one of the biggest financial technology revolutions India has ever built. It completely changed how people transfer money, from roadside tea stalls to large businesses. And during COVID, when contactless payments became necessary, UPI adoption exploded even faster.
So how does this entire infrastructure actually work? How does money move from one bank account to another in seconds? And what happens internally when we scan a QR code?
Let’s understand it step by step.
#Before UPI: How Money Transfers Worked
Before UPI became popular, digital money transfers were much more complicated.
Suppose you wanted to send money to someone. You needed details like:
-
Bank account number
-
Account holder name
-
IFSC code
-
Bank name
And both people needed valid bank accounts.
Only after entering all this information correctly could the transfer happen. If even one detail was wrong, the transaction could fail or get reversed.

At that time, banks themselves handled most of the money transfer systems. Banks like ICICI, HDFC, SBI, Kotak, and others operated under regulations defined by the RBI (Reserve Bank of India).
Different transfer mechanisms existed for different use cases.
1. IMPS (Immediate Payment Service)
Used for smaller transfers that needed to happen instantly.
Money usually gets credited immediately.
2. NEFT (National Electronic Funds Transfer)
Used for slightly larger transfers.
Transactions were processed in batches, so money could take some time to reflect in the receiver’s account.
3. RTGS (Real Time Gross Settlement)
Used for very large transactions like lakhs of rupees.
Transfers happen in real time and are generally used for high-value payments.
If you look closely, the old system worked - but it was not simple.
It required too many details. Too many steps. And that’s where UPI changed everything.
#What Exactly Did UPI Change?
UPI simplified the entire payment experience.
Instead of remembering long account numbers and IFSC codes, you now only need something called a VPA (Virtual Payment Address).
Example:
rohit@oksbi
rahul@paytmThat’s it.
Enter the VPA, verify the person, enter your PIN, and the payment is done.
But behind this simple experience lies a very powerful infrastructure.
#The Real Backbone of UPI: NPCI
UPI runs on top of a central infrastructure called NPCI.
NPCI stands for: National Payments Corporation of India
You can think of NPCI as the backbone that connects all participating banks together.
It provides the infrastructure that makes real-time UPI payments possible.
But here’s something important:
NPCI APIs are not publicly accessible.
Normal users or companies cannot directly connect to the NPCI network. It is a highly secure private network that only trusted banks can access.
Banks like:
-
SBI
-
HDFC
-
ICICI
-
Axis Bank
-
Kotak
are connected to this infrastructure.

This security layer is one of the biggest reasons why UPI remains reliable at massive scale.
#Then Where Do Apps Like Google Pay and PhonePe Fit?
This is where many people get confused.
Apps like:
-
Google Pay
-
PhonePe
-
Paytm
do not directly move your money.
These apps mainly act as a CPSP (Customer Payment Service Provider).
Their job is to provide a smooth user experience:
-
QR code scanning
-
Contact management
-
Payment interface
-
Notifications
-
Transaction history
But to actually process payments, they need a banking partner because only banks can communicate with NPCI.
So internally, these apps partner with banks to access the UPI infrastructure.
#What Happens When You Scan a QR Code?
Now let’s finally understand the actual flow.
Suppose you scan a QR code to send money to your friend.
Here’s what happens internally:
Step 1: QR Code Gives the VPA
The QR code usually contains the receiver’s VPA.
So instead of manually typing something like:
rahul@oksbiyou simply scan the QR code.
The QR code is basically a faster and easier way to fetch the VPA.
Step 2: The UPI App Sends the Request
Let’s say you are using GPay.
GPay itself cannot directly communicate with NPCI.
So GPay forwards the request through its partner bank.
Example:
GPay > SBI Bank > NPCIStep 3: NPCI Validates the Transaction
NPCI now coordinates the payment flow.
It checks:
-
Is the sender account valid?
-
Is the receiver valid?
-
Is the request authentic?
If everything looks correct, the sender is asked to enter the UPI PIN.
Step 4: User Authentication
Once you enter the UPI PIN, the bank verifies it securely.
This acts as the authorization step.
Without the correct PIN, the transaction cannot proceed.
Step 5: Money Gets Transferred
After successful authentication:
-
Sender bank gets debited
-
Receiver bank gets credited
-
NPCI confirms the transaction to both sides
And all of this usually happens within a few seconds.
That’s the magic of UPI.
#Why UPI Feels So Fast
The reason UPI feels seamless is because it hides all the banking complexity behind a very simple interface.
Instead of users dealing with:
-
account numbers
-
IFSC codes
-
settlement systems
-
banking protocols
UPI abstracts everything into:
-
QR codes
-
VPAs
-
instant authentication
The complexity still exists internally - users just don’t see it anymore.
And that is what great engineering often looks like.
#The Engineering Behind UPI Is Insane
Think about the scale for a moment.
Millions of transactions happen every single minute.
And the system still needs to be:
-
secure
-
fault tolerant
-
highly available
-
real time
-
scalable
Even a few minutes of downtime can impact millions of people and businesses across the country.
Building a system like this requires incredible engineering, distributed systems knowledge, banking integrations, and operational reliability.
UPI is not just a payment feature. It is one of the most impactful digital infrastructures India has ever built.
Of course, this is still a very high-level explanation of how UPI works behind the scenes.
I tried exploring the the internal architecture of NPCI, but there is very limited public information available. Since the entire system operates on a highly secure private network, most of the low-level implementation details are not openly exposed.
#Conclusion
Today, scanning a QR code feels effortless.
But behind that “Payment Successful” message, there is a big ecosystem working in milliseconds:
-
Banks
-
NPCI
-
Money apps
-
Authentication systems
-
Secure networks
-
Real-time transaction processing
UPI made digital payments simple for users by hiding one of the most complex financial infrastructures underneath.
And, that’s what makes it such an incredible piece of engineering.
References :
https://razorpay.com/blog/what-is-upi-and-how-it-works/
https://razorpay.com/blog/what-is-a-payment-service-provider/