🎓 CoursesMarkets & internationalAdvanced⏱ 60 min

UPI in depth: integration and operations. 6 chapters and a final quiz.

An engineering course on India's UPI rail for teams already running UPI volume. Learn to read the status triplet NPCI returns, instrument the loss specific to collect, validate a virtual address against the central mapper, and set up an AutoPay mandate that survives its execution windows. Then run an idempotent webhook consumer under the polling discipline imposed since 2025, reconcile 12 settlement cycles, and turn an NPCI decline code into a retry decision.

Chapter 1. Intent, collect, QR: measuring the loss instead of guessing at it.

The final status of a UPI transaction is spread across three separate fields, set by three different parties. The first carries the verdict, the second the cause as NPCI sees it, and the third the cause as the payer's bank sees it. Breaking out these three fields is the benchmark of a mature integration, more than watching the checkout flow. Merging them into a single metric produces misleading dashboards. If you store only the verdict, you can't tell a loss caused by the merchant's flow from a loss caused by a struggling bank.

Three fields, three sources

ScopeSet byValuesWhat it tells you
ResultUPISUCCESS, FAILURE, DEEMEDThe verdict. DEEMED flags a credit of unknown status: neither succeeded nor failed, to be resolved later through UDIR or the back office
ErrorCodeThe UPI service layerCodes U01 to U99, M16, S93…The cause as the central switch sees it: duplicate, limit, expiry, member bank unavailable
RespCodeThe bank or PSP on the response legTwo-character codes: Z9, ZM, B3, XH…The cause as the bank sees it: balance, PIN, account type, court-ordered freeze
What a final RespPay message carries, per NPCI's error and response code specification (version 2.9)

Next to each code, the NPCI specification publishes a classification: BD for a business decline and TD for a technical decline. That label determines what the merchant is allowed to try next. A business decline comes from the payer or their account, and retrying it unchanged returns the same code. A technical decline comes from an outage, so a second attempt makes sense. NPCI has given its members targets of under 1% for technical declines and under 5% for business declines.

ModeMode-specific decline codesWhat you don't controlInstrumentation to build
Intent (upi://pay)No code of its own: the loss happens before the rail, when the app fails to open or the customer drops offWhether a UPI app is installed on the device, and the switch between appsCount links issued, returns from the app, and authorizations requested: the gap is your real drop-off
Dynamic QRX6 invalid merchant (acquirer), PQ tampered QR on the e-RUPI railScan quality, how old the displayed QR is, how fresh the reference it carries isTimestamp QR generation and expiry; a QR that stays live too long collects a stale amount
CollectU69 COLLECT EXPIRED, classified BD, a loss category that doesn't exist in intentNotification delivery, the payer's attention, the expiry time you setTrack the expiry rate by time bucket: it's the only lever you have
The three collection modes and the loss specific to each. The useful comparison is between codes, not screen counts
⚠️
You don't optimize collect, you retire it
U69 COLLECT EXPIRED means the payer did not approve a payment request before it expired. The code is classified as a business decline: the rail worked and the payer didn't respond. No API optimization lowers that rate, because the variable is payer behavior. Collect also carried the most common fraud on the market, a payment request disguised as money the victim was about to receive, and NPCI discontinued person-to-person collect on October 1, 2025. Keeping collect at checkout therefore exposes the merchant to a loss no technical fix can reduce, on a mode whose person-to-person side NPCI has already shut down. Collect still has one narrow use: requesting an unpaid amount from an address that is already known and validated.
< 1 % / < 5 %
targets communicated to UPI members for technical and business declines
NPCI, UPI circular OC No. 149 (2022) and addendum OC No. 149A of June 15, 2022
monthly
how often NPCI publishes business declines, technical declines, and uptime, bank by bank
NPCI, “Declined (BD/TD) & Uptime” page
22,716.07M
UPI transactions in June 2026 alone, the scale that makes fine-grained measurement worthwhile
NPCI, UPI product statistics, June 2026

The instrumentation that follows from this stores, for every attempt, the three status fields, the BD or TD classification, the payer's bank identifier, and the initiation mode. Without the payer's bank identifier, the merchant can't match its failures against NPCI's monthly publication. A single bank's degradation then looks like a regression in the merchant's app. Teams that manage their authorization rate in India compare their own breakdown with the market's every month.

🎯 Quick question
Your dashboard shows UPI failures rising. Which field do you check first to find out whether the cause is on your side?