- Published on
UPI architecture and integrations
- Authors
- Name
- Srinjoy Santra
- @s_srinjoy
UPI (Unified Payment Interface) is an instant real-time payemnt switch system developed by NPCI (National Payments Corporation of India) that allows users to easily transfer money between bank accounts. In 2024, UPI processed 172 billion transactions, a 46% increase from 2023.
Architecture of UPI
- Payment initiation
- Sender / Payer initiates a transaction from a mobile app like PhonePe, Google Pay, Paytm, etc.
- She has to enter amount and VPA
- VPA or Virtual Payment Address is are human friendly unique IDs (inspired by email IDs) usually of the
<unique_identifier>@<address_provider>
format likesrinjoysantra@okbhim
- Other modes also exists such as mobile number or QR code)
- VPA or Virtual Payment Address is are human friendly unique IDs (inspired by email IDs) usually of the
- The app sends a request to the Payer PSP
- Payment Service Provider or PSP is the bank handling payer's UPI transactions
- For authentication, she has to enter MPIN i.e. Mobile Personal Identification Number
- Request is sent to NPCI switch (with encrypted transaction details)
- Address resolution and authorization
- NPCI validates the request and forwards it to the Payee / Receiver PSP
- Payee PSP confirms if the account is active and capable of receiving funds
- Payee Account details sent back to NPCI switch
- Debit request sent to the Remitter's account (i.e. Payer's bank)
- Funds are debited from the Remitter's account and debit status is returned
- Funds are credited to the Beneficiary's account (i.e. Payee's bank)
- Beneficiary's account responds NPCI switch with credit status
- Final settlements occurs through IMPS (Immediate Payment Service)
- Transaction status is communicated to Payer and Payee PSPs.
- Payer's UPI app receives status (success / failure) of the transaction
UPI integrations
1. Intent-Based Payments (Deep Linking)
- The payee (usually merchant) app / website launches a UPI-enabled app using an intent with necessary parameters.
- After the transaction, the result is sent back to the calling app via callback URI (deep link response)
Pros
- Easy to integrate
- Seamless App-to-App switch
- As a business, good visibility over the transaction funnel
Cons
- No control over UI/UX for merchants
- Payment failures maybe hard to debug for issues like redirection
The following form creates the deep link and is capable of accepting payment request on mobile devices.
Output will appear here
2. SDK Integration (Direct Integration with Bank APIs or TPAP SDKs)
The payee (usually a merchant app) can receive the payment without the payer (customer) having to open any third-party app. The NPCI common library opens in the merchant's app itself and require no redirection.
Pros
- Best conversion rates because there's no redirection
- Secure and reliable
- Better control over UI/UX for merchants
Cons
- Only supports Android or iPhone
- Complex integration and extra compliance requirements
- Requires bank or PSP / TPAP (Third-Party Application Provider) partnership
3. Collect
The payer needs to enter a VPA manually. The VPA gets verified and she is sent a payment notification on the UPI app.
Pros
- Minimal integration efforts
- Supports all kinds of devices like desktop web, tablets etc.
Cons
- Prone to human error as VPA needs to be entered manually
- Not seamless, payer has to switch between apps and devices
- As a business, poor visibility over the transaction funnel
One alternative is to use QR code scanning which reduces the friction of entering the VPA manually.
4. Omni channel - Google Pay
Its a Push Pay mechanism where the payer (customer) can enter Google Pay linked phone number in their purchase.
Pros
- Google pay payment options available on more platforms like (iOS and Web)
- Allows customer to pay through a device where Google Pay app is not installed
Cons
- Prone to human error
- Average conversion rates