The holiday season is upon us, and what better way to spread cheer and goodwill than by using the Unified Payments Interface (UPI) to send gifts and holiday bonuses to your loved ones?
What is UPI?
The Unified Payments Interface (UPI) is a real-time payment system developed by the National Payments Corporation of India (NPCI) that allows for the seamless transfer of funds between bank accounts. It's like the ultimate wingman for your money - it helps you transfer funds to your friends and family without any hassle, just like a good wingman helps you get the girl (or guy) of your dreams.
One of the key features of the UPI system is its interoperability, which means that it can be used to transfer funds between accounts belonging to different banks. It's like the United Nations of payment systems - it brings people from different countries (or in this case, banks) together and helps them communicate and exchange funds with ease.
The UPI system is built on top of the Immediate Payment Service (IMPS) (a real-time interbank electronic fund transfer system). You may have used this method when making bank transfers.
What are UPI addresses?
In order to use the UPI system, users need to download a UPI-enabled app, such as Google Pay or Paytm, onto their smartphone. Once they have set up their account, they can link their bank account to the app and create a Virtual Payment Address (VPA). It's like giving your money its own email address - it's a unique identifier that allows you to send and receive payments easily.
One of the objectives of UPI was to take the payments from banks and unify them (standardised payments). Transactions can be made from one address to another address, regardless of the sender and receiver banks.
In this way, UPI addresses are similar to IP addresses. They are virtual addresses tagged as the identity of its users.
A named server (NPCI) has a list of all the virtual addresses mapped to bank accounts. NPCI (National Payments Corporation of India) is the specialized division of the Reserve Bank of India which is under the jurisdiction of the Ministry of Finance, Government of India. It acts as a DNS for UPI payments.
Authentication Process
Payment requests need to be authenticated. When the sender makes a payment request, their bank verifies the transaction details and creates a signature. This signature is attached to the request (similar to a private key sign). The private key ensures that this request can only come from the sender's bank.
In this way, the receiving bank knows if a payment request is authentic.
How does UPI handle billions of transactions daily?
The users connect to their bank through the payment interface which is authenticated through a PIN. This request is then forwarded by NPCI to the receiver's bank.
We can see that NPCI is a single point of failure. If NPCI fails all the online transactions will pause.
Another issue is the bottleneck on NPCI for every transaction. During peak loads, all transactions will wait on NPCI for routing directions. This would be a bottleneck in our architecture.
If the banks could talk to one another with involving the NPCI, routing would be faster.
The flow of UPI
If we need a collect request: Assume A is the sender. Let's say A makes a transaction through HDFC bank to B.
HDFC checks the request credentials and A's balance. HDFC then asks NPCI to forward the request to B. If B exists, NPCI will send the request to B.
Once the transaction is completed a notification needs to be sent to both A and B regarding the transaction.
A payment successful message is sent to A.
A money received message is sent to B.
So how does the UPI system work exactly?
Let's take a closer look at the system design.
The UPI system consists of four main components: the issuing bank, the acquiring bank, the NPCI, and the UPI app.
- The issuing bank is the bank that holds the user's account and issues their debit or credit card.
- When a user initiates a payment using their UPI app, the issuing bank processes the payment request and transfers the funds to the recipient's bank account.
- The acquiring bank is the bank that holds the recipient's account and receives the payment from the issuing bank.
- It then credits the funds to the recipient's account.
- The NPCI acts as the clearinghouse for all UPI transactions.
- It receives the payment request from the issuing bank and routes it to the acquiring bank.
- It also handles the settlement of funds between the banks and ensures that the transaction is completed successfully.
- The UPI app is the interface that users interact with to initiate and complete payments.
UPI allows users to link their bank accounts, create a VPA, and send and receive payments. It also provides users with a transaction history and other features such as setting up recurring payments or requesting payments from other users. It's like the bouncer at a nightclub - it only lets authorized people in, keeping your money safe and secure.
Advantages of UPI:
The UPI system is designed to be fast, secure, and convenient for users. Its interoperability means that users can make payments to anyone, regardless of the bank they are with. Its real-time transfer capabilities mean that payments are processed almost instantly, making it a fast and efficient way to transfer funds. And its authentication system ensures that transactions are secure and protected from fraud.
In summary, the UPI system is a state-of-the-art payment solution that has revolutionized digital payments in India. Its ease of use and strong security measures make it a popular choice for individuals and businesses alike.
It's a system worth studying. Cheers!
You can practice system design questions like this one with the AI Mock Interviewer.