UPI as a Service: How Digital Payments Flow
The Unified Payments Interface (UPI) has revolutionized digital payments in India, making it as easy to send money as sending a text message. But what makes UPI tick? Let’s explore the architecture, actors, and flows that enable millions of transactions daily.
The UPI Ecosystem: Key Actors
UPI isn’t just about two people sending money - it’s a complex ecosystem involving multiple parties:
1. NPCI (National Payments Corporation of India)
The central orchestrator that:
- Maintains the UPI infrastructure and protocols
- Routes transactions between different banks
- Ensures settlement and reconciliation
- Sets security standards and compliance requirements
2. Payment Service Providers (PSPs)
Banks and financial institutions that:
- Issue UPI IDs to customers (like
user@paytm,user@oksbi) - Maintain customer bank account mappings
- Handle authentication and authorization
- Settle funds with other PSPs through NPCI
3. Third Party Application Providers (TPAPs)
Apps like Google Pay, PhonePe, and Paytm that:
- Provide user interfaces for UPI transactions
- Don’t hold customer funds directly
- Partner with PSPs for backend processing
- Focus on user experience and merchant acquisition
4. Customers and Merchants
End users who:
- Link bank accounts to UPI apps
- Create Virtual Payment Addresses (VPAs)
- Initiate or receive payments
- Manage multiple bank accounts through a single app
The Basic UPI Transaction Components
At its core, every UPI transaction involves:
- Payer VPA - The sender’s identifier (like
username@bankname) - Payee VPA - The receiver’s identifier
- Amount - The money being transferred
- Purpose Code - Transaction category (P2P, P2M, etc.)
- Reference ID - Unique transaction identifier
This simplicity is UPI’s greatest strength. Unlike traditional banking where you need account numbers, IFSC codes, and multiple verification steps, UPI abstracts all that complexity behind simple VPAs.
UPI Transaction Types and Flows
Pay Flow (Push Payment)
The payer initiates the transaction:
1. Payer opens UPI app
2. Enters payee VPA and amount
3. App sends request to Payer PSP
4. Payer PSP validates with NPCI
5. NPCI routes to Payee PSP
6. Payee PSP credits account
7. Confirmation flows back to payer
Collect Flow (Pull Payment)
The payee requests payment:
1. Payee sends collect request via UPI app
2. Request goes through Payee PSP → NPCI → Payer PSP
3. Payer receives notification to approve/decline
4. If approved, payment flows as normal Pay transaction
5. If declined or timed out, request expires
Step-by-Step Transaction Flow
Let’s trace a complete UPI transaction from Megha (megha@paytm) sending ₹500 to Manas (manas@oksbi):
Phase 1: Transaction Initiation
- Megha opens her UPI app and selects “Pay to Contact”
- Enters Manas’s VPA (
manas@oksbi) and amount (₹500) - App validates format and shows transaction preview
- Megha enters her UPI PIN for authorization
Phase 2: PSP Processing
- Paytm PSP receives request and performs initial validation:
- Checks if Megha’s account has sufficient balance
- Validates transaction limits (daily/per-transaction)
- Verifies UPI PIN against stored hash
Phase 3: NPCI Routing
- Paytm PSP forwards to NPCI with encrypted transaction details
- NPCI validates the request:
- Checks if
raj@oksbiis a valid VPA - Performs fraud and risk checks
- Generates unique transaction reference number
- Checks if
Phase 4: Payee PSP Processing
- NPCI routes to SBI PSP (Manas’s bank)
- SBI PSP validates:
- Confirms Manas’s account is active and can receive funds
- Checks for any account-level restrictions
- Prepares to credit the account
Phase 5: Settlement and Confirmation
- SBI credits ₹500 to Manas’s account
- Confirmation flows back: SBI → NPCI → Paytm PSP → Megha’s app
- Real-time settlement occurs between banks through NPCI
- Both parties receive transaction notifications
Security Through Two-Factor Authentication
UPI’s security model adapts traditional 2FA for the mobile-first world:
Traditional Card Payments
- Something you have: Physical card with number
- Something you know: OTP sent to registered mobile
UPI Authentication
- Something you have: Registered device + SIM card
- Something you know: UPI PIN
Device Binding Process
- SIM verification: OTP sent to registered mobile number
- Device fingerprinting: App captures device-specific identifiers
- Secure key generation: Cryptographic keys stored in device secure storage
- PSP registration: Device registered with customer’s bank
This eliminates the need for OTPs on every transaction while maintaining security through device-PIN combination.
UPI PIN Security
- Bank-grade encryption during transmission and storage
- Limited retry attempts before account lockout
- No storage on device - validated server-side only
- Separate from ATM PIN for additional security layer
Failure Modes and Error Handling
UPI’s real-time nature means robust error handling is crucial:
Common Failure Scenarios
Insufficient Balance
Flow: Payer PSP → Decline → NPCI → Payee PSP → User notification
Resolution: Immediate failure, no money movement
Invalid VPA
Flow: NPCI validation fails → Immediate rejection
Resolution: Transaction never reaches payee PSP
Network Timeout
Flow: Any step times out → Transaction marked as "PENDING"
Resolution: Automatic reconciliation within 24 hours
Bank System Downtime
Flow: PSP unable to process → "Bank not available" error
Resolution: User advised to retry later
Transaction Reversal Process
When things go wrong:
- Automatic reversal for technical failures (24-48 hours)
- Dispute resolution through NPCI’s grievance mechanism
- Manual intervention for complex cases
- Customer protection through guaranteed refund policies
Performance and Scale Characteristics
UPI handles massive scale through:
Real-time Processing
- Sub-5 second transaction completion for successful payments
- 24/7/365 availability with minimal maintenance windows
- Peak handling of 30+ million transactions per day
Load Distribution
- Geographic load balancing across multiple data centers
- PSP-level scaling with each bank handling its customer load
- NPCI redundancy with failover mechanisms
Settlement Efficiency
Traditional Banking: T+1 or T+2 settlement
UPI Settlement: Real-time gross settlement (RTGS)
Benefits:
- Immediate fund availability
- Reduced counterparty risk
- Better cash flow for merchants
The Payment Rails Ecosystem
UPI operates on India’s payment infrastructure:
Core Infrastructure
- RTGS (Real Time Gross Settlement): For large-value transactions
- NEFT (National Electronic Funds Transfer): For regular transfers
- IMPS (Immediate Payment Service): UPI’s underlying settlement rail
Integration Points
- CBS (Core Banking System): Bank’s internal ledger system
- Payment Gateway: For merchant integrations
- Mobile Banking: Direct integration with bank apps
- PoS Systems: For in-store payments
What Makes UPI Unique Globally
Compared to other real-time payment systems:
Technical Innovation
- Interoperable by design: Any app can send to any VPA
- Multiple account linking: One app, multiple bank accounts
- Offline payments: Using sound-based technology for feature phones
Business Model Innovation
- Free for P2P transactions: No charges for person-to-person transfers
- Low merchant fees: Minimal costs for businesses
- Financial inclusion: Works on basic smartphones and feature phones
Looking Ahead
UPI continues evolving with:
Upcoming Features
- UPI 2.0: Enhanced security and dispute resolution
- UPI AutoPay: Recurring payment mandates
- UPI International: Cross-border payment capabilities
- Conversational Payments: Voice and chat-based transactions
Scaling Challenges
- Cross-border complexity: Regulatory and technical challenges
- Fraud prevention: Keeping ahead of sophisticated attacks
- Rural adoption: Infrastructure and literacy challenges
Understanding UPI’s architecture reveals why it succeeded where many payment systems failed: it balanced simplicity for users with sophistication in the underlying infrastructure, creating a system that’s both easy to use and robustly engineered for massive scale.
The success of UPI demonstrates how thoughtful API design, strong security foundations, and ecosystem-thinking can create transformative financial infrastructure that serves hundreds of millions of users reliably.