Saurabh Tekam
2 min readDec 18, 2020

How UPI payment gateway works?

Following diagram shows the overall architecture of the unified interface allowing USSD, smartphone, Internet banking, and other channel integration onto a common layer at NPCI.

This common layer uses existing systems such as IMPS, AEPS, etc. to orchestrate these transactions and ensure settlement across accounts. Usage of existing systems ensure reliability of payment transactions across various channels and also takes full advantage of all the investments so far. This unified layer offers next generation peer-to-peer immediate payment just by using personal phone. As illustrated in the diagram, 3rd party API integration (merchant sites, etc.) can “collect” payment from “an address” avoiding the need to share account details or credentials on 3rd party applications or websites. Within this solution, payment authentication and authorization are always done using personal phone. Since this layer offers a unified interface, any-to-any (Aadhaar number, mobile, account, virtual addresses) payments to be done using standard set of APIs.

Payment Address: - Every payment transaction must have source (payer) account details (for debit) and destination (payee) account details (for credit). At the end, before the transaction can be completed, these must be resolved to an actual account number/ID. “Payment Address” is an abstract form to represent a handle that uniquely identify an account details in a “normalized” notation. In this architecture, all payment addresses are denoted as “account@provider” form. Address translation may happen at provider/gateway level or at NPCI level.

Every payment has the following core elements :- 1. Payer and payee account and institution details for routing and authorization

2. Authentication credentials (password, PIN, biometrics, etc. as required for debit, can be bank provided or 3rd party provided such as UIDAI)

3. Transaction amount

4. Transaction reference

5. Timestamp

6. Other metadata attributes such as location, product code, mobile number, device details, etc. as required.