diagram.mmd — sequence
UPI Payment Flow sequence diagram

The Unified Payments Interface (UPI) is India's real-time interbank payment system operated by the National Payments Corporation of India (NPCI). It enables account-to-account transfers using a Virtual Payment Address (VPA) — an alias like user@okicici — without exposing bank account numbers. UPI processes over 10 billion transactions per month.

The flow begins when a customer initiates a payment on a merchant's app or website. For merchant-initiated (collect) flows, the merchant's backend generates a payment request specifying the merchant VPA, amount, and a transaction reference ID, and sends it to the PSP (Payment Service Provider — the gateway integrated with UPI, such as Razorpay or PayU). The PSP sends a collect request to the NPCI UPI switch.

NPCI routes the collect request to the customer's remitter bank (the bank where the customer's UPI account is registered). The remitter bank's UPI app on the customer's phone receives a push notification requesting approval. The customer opens their UPI app, reviews the request, and authenticates with their 6-digit UPI PIN. The PIN is verified by the remitter bank (never transmitted to the merchant or NPCI in cleartext — it is used to sign a cryptographic token).

On successful PIN verification, the remitter bank debits the customer's account and sends a debit notification to NPCI. NPCI routes the credit instruction to the merchant's beneficiary bank, which credits the merchant's account. NPCI sends a final settlement confirmation back through the PSP chain, and the merchant's webhook receives the payment success event.

The entire flow completes in under 3 seconds. Unlike card payments, UPI transactions are final — there is no authorization-then-capture model. Refunds are processed as a separate credit transfer. UPI payment settlement is near-real-time (within seconds to hours), unlike card networks which settle in 1–2 business days.

Free online editor
Edit this diagram in Graphlet
Fork, modify, and export to SVG or PNG. No sign-up required.
Open in Graphlet →

Frequently asked questions

UPI (Unified Payments Interface) is India's real-time interbank payment system operated by NPCI. It enables account-to-account transfers using a Virtual Payment Address (VPA) as an alias, without exposing bank account numbers. Payments are final and settle within seconds to hours.
The merchant backend creates a payment request with the merchant VPA, amount, and reference ID, and sends it to a PSP. The PSP forwards a collect request to NPCI, which routes it to the customer's remitter bank. The customer authenticates in their UPI app with a PIN, and on success NPCI credits the merchant's beneficiary bank.
UPI is the preferred option for Indian consumers and offers lower transaction costs and near-instant settlement. Card payments are more appropriate for international customers or when instalment-based payment plans are needed, since UPI does not support credit-based EMI flows natively.
mermaid
sequenceDiagram participant Customer participant MerchantApp as Merchant App participant PSP as Payment Service Provider participant NPCI as NPCI UPI Switch participant RemitterBank as Customer Bank participant BeneficiaryBank as Merchant Bank MerchantApp->>PSP: Create collect request (merchant VPA, amount, ref ID) PSP->>NPCI: Submit collect request NPCI->>RemitterBank: Route collect request to customer bank RemitterBank->>Customer: Push notification to UPI app Customer->>RemitterBank: Review request and enter UPI PIN RemitterBank->>RemitterBank: Verify PIN and authenticate user RemitterBank->>RemitterBank: Debit customer account RemitterBank-->>NPCI: Debit success notification NPCI->>BeneficiaryBank: Credit instruction to merchant bank BeneficiaryBank->>BeneficiaryBank: Credit merchant account BeneficiaryBank-->>NPCI: Credit confirmed NPCI-->>PSP: Transaction success (UTR number) PSP-->>MerchantApp: Payment confirmed via webhook MerchantApp-->>Customer: Order confirmation
Copied to clipboard