Product Guide 11
Fintech AI

UPI Switch Infrastructure: How to Build It

A step-by-step guide to building UPI infrastructure in India. Eight stages, the options at each one, exactly how each step connects to the next, real costs, and what breaks. Written for someone who has not built this before.

Verified September 2026Free · No signupOfficial sources only
BeginnerStart here. No prior knowledge assumed.

How to use this page

This page walks you through building on UPI: an app that pays, a checkout that collects, or the switch underneath either. Not how UPI works for a user — how you connect to it, get certified, stay up, and settle.

Ten guides on this site describe a rulebook written by a regulator. This one describes a rulebook written by a company. NPCI is not a regulator. It is a not-for-profit umbrella organisation operating an RBI-authorised payment system — and its circulars will constrain your product more tightly, day to day, than most regulations do.

Watch out

UPI acquired a revenue model this week, after six years without one. The Taxation and Other Laws (Amendment) Bill, 2026 amended the Payment and Settlement Systems Act, 2007 to remove the bar on charging for UPI and RuPay debit, and the government notification followed on 14 September 2026. It fixes one thing and leaves the rest open: no charge on UPI transactions up to ₹2,000, no charge on RuPay debit, and P2P stays free. Whether MDR applies only above a merchant-size threshold, at what rate, and how the income is split between the parties is with NPCI's UPI and Services Steering Committee, expected to meet this week. Rates in the 0.25% to 0.4% range have been discussed. Nothing above that sentence is settled, and by the time you read this some of it will be.

What you are actually building

Four different products get called “building on UPI” and they have almost nothing in common except the rails:

What you are buildingWhat you actually needEffort
Accepting UPI as a merchantA payment aggregator or gateway. You are a customer of this ecosystem, not a participant in it.Days
A UPI app (TPAP)A PSP bank to sponsor you, plus NPCI certification.Months
UPI inside your own appA sponsor bank’s SDK, plus UDIR integration. See step 6.Weeks to months
The switch itselfTo be a bank, or to build the switch a bank runs.Quarters
Note

Work out which one you are before reading further. Most teams who say “we are building a UPI product” mean row one, which is a commercial decision rather than an engineering project and is covered in Build Sheet 05. Rows two and four are where this page lives.

Who is who on the rails:

PartyRole
NPCIOwns and operates UPI. Sets the rules, the liabilities, the settlement cut-offs and the dispute protocol. Approves who may participate. May audit you, directly or through a third party.
PSP bankA bank, connected to UPI. Holds the handle. Audits your app, owns grievance redressal, and answers for your data residency.
TPAPThe app the customer sees. No licence, no direct line to the network. Borrows both.
Issuer and beneficiary banksWhere the money leaves and lands. Neither is under your control and both can fail your transaction.

What this is not:

  • Not a licence you can hold. Participation is approved by NPCI and sponsored by a bank. You are always on somebody’s paper.
  • Not a feature race. The product is uptime and decline rate. Step 8.
  • Not free forever. It was, until this week.

The whole journey, in one table

#StepIn plain words
1Pick the shapeWhich of the four products, honestly.
2Find a bankThe commercial step everyone underestimates.
3Certify with NPCITechnical and compliance. Not a formality.
4The payment pathIntent, collect, QR, mandate. Four flows, one rulebook.
5The deemed stateNot success, not failure. The state that breaks systems.
6DisputesUDIR, and a turnaround clock with a penalty on it.
7Reconcile and settleCut-offs you do not control.
8Run itDeclines, uptime, the 30% cap, and now MDR.
Note

Steps 5, 6 and 8 are where the work is, and they are the three that look like operations rather than product. A team that builds steps 1 to 4 well has built a demo that works on a good day. UPI does not have only good days.

IntermediateBuild it. Pipelines, tools and working code.

Steps 1 to 3 — shape, bank, certification

Step 1 — Pick the shape

The question that settles it: do you need to hold the customer’s UPI handle? If you do, you are a TPAP and you need a PSP bank. If you only need to be paid, you need an aggregator and this page is mostly background.

Step 2 — Find a bank

This is a partnership negotiation, not an integration, and it is the step that decides your timeline. The bank is taking on your risk: NPCI holds the PSP bank responsible for auditing your app and systems, for the grievance mechanism your customers use, and for keeping all UPI transaction data in India. A bank that signs you is accepting audit findings on your code.

Two routes, and the trade is the usual one:

Direct with a PSP bankThrough an enabler
You ownThe whole stackThe app surface
CertificationYours to passLargely inherited
TimeMonthsWeeks
CeilingNone you did not buildTheirs
ReversibilityHard — the handle suffix is theirsHarder
Watch out

The handle suffix is a switching cost disguised as a branding decision. Your customers' UPI IDs end in your PSP bank's suffix. Changing banks later means every customer re-registers a new UPI ID, which in practice means losing a meaningful share of them. Ask about the exit before you sign the entry — same rule as the payment-gateway exit path in Build Sheet 05, and for the same reason: integration takes weeks and extraction takes quarters.

Step 3 — Certify with NPCI

NPCI approves participation. Certification covers the technical implementation and the compliance posture, and the specification moves — the common library, the PIN handling, the API versions and the dispute hooks all get revised, and revisions come with dates.

Note

Budget for re-certification as a standing cost, not a launch cost. The single most common planning error on this rail is treating NPCI certification as a gate you pass once. It is closer to a subscription: circulars land, deprecations get announced, and the compliance date is set by somebody else's calendar. A team with no capacity reserved for spec changes will spend its roadmap on them anyway.

Steps 4 and 5 — the payment path and the deemed state

Steps 4 and 5 — The payment path, and the deemed state

Python — steps 4 and 5, the four flows and the state that is neither success nor failure
from datetime import datetime, timedelta

# STEP 4. FOUR FLOWS, ONE RULEBOOK.
FLOWS = {
    "intent":  "customer taps, app opens, customer approves",     # best success
    "collect": "you request, customer approves later",            # worst success
    "qr":      "customer scans and pays",                         # merchant default
    "mandate": "recurring, pre-authorised",                       # see Guide 05
}

# Collect requests are the flow most abused and the flow with the worst
# conversion. Treat a high collect share as a product smell, not a feature.

# STEP 5. THE DEEMED STATE. THIS IS THE ONE.
# A UPI transaction that does not return a clean result is NOT a failure. It
# is an UNKNOWN. The debit may have happened. The credit may have happened.
# Your system knows neither, and the customer is looking at your screen.

TERMINAL = {"SUCCESS", "FAILURE"}

def on_response(txn, response):
    if response and response["result"] in TERMINAL:
        return {"state": response["result"], "final": True}
    # Deemed. Do not guess. Do not retry with a new reference.
    return {"state": "DEEMED", "final": False,
            "action": "poll_status",
            "customer_message": "We are confirming this payment",   # not "Failed"
            "never": "initiate_a_second_debit"}

def poll_plan(txn):
    """Back off. A thundering herd of status checks is how an incident
    becomes an outage -- yours and everyone else's on the same switch."""
    return [5, 15, 30, 60, 120, 300]        # seconds, then hand to reconciliation

def resolve(txn, npci_status, ledger):
    # NPCI reconciles and the outcome is guaranteed to settle one way or the
    # other. Your job is to make sure YOUR ledger ends up agreeing with it,
    # and to never have told the customer something the ledger contradicts.
    assert txn["reference"] == npci_status["reference"], "same intent, same reference"
    ledger.apply(npci_status["final_state"])
    return npci_status["final_state"]

# WHAT TO CHECK
# [ ] "deemed" is a first-class state in your schema, with its own screen,
#     its own message and its own queue. Not a null, not a failure
# [ ] a retry uses the SAME reference derived from the intent, stored BEFORE
#     the call. A fresh reference on an unknown outcome is how a customer
#     gets debited twice -- the same rule as payouts in Build Sheet 05
# [ ] status polling backs off. Fixed-interval polling during a switch
#     incident is load you are adding to an outage
# [ ] never show "Payment failed" on a deemed transaction. The money may be
#     gone, and you have just told someone it is not
# [ ] every state change is idempotent and keyed on the event id, applied in
#     the same database transaction as the ledger write
# [ ] reconcile in IST against NPCI settlement cut-offs, not against your own
#     calendar day

The gotcha that produces the worst customer outcomes on this rail: a pending UPI transaction is an unknown, not a failure, and the two demand opposite behaviour. On a failure you retry. On an unknown you must not, because the debit may already have happened.

The ecosystem resolves this for you eventually — NPCI reconciles, and a failed debit is auto-reversed under the RBI turnaround-time framework with a per-day penalty for delay. What the framework does not do is tell your customer what is happening in the ninety seconds they are staring at your screen. That copy is yours to write, and writing “Payment failed” on a deemed transaction is the single most damaging string in a UPI product.

Steps 6 to 8 — disputes, settlement, running it

Steps 6 to 8 — Disputes, settlement, and running it

Python — steps 6 to 8, disputes, settlement and the numbers you are actually judged on
# STEP 6. DISPUTES GO THROUGH UDIR, NOT THROUGH YOUR SUPPORT INBOX.
# Unified Dispute and Issue Resolution is the ecosystem's protocol. If you
# are a partner application on a sponsor bank's SDK, integrating UDIR is a
# requirement, not an option -- your customers' eligible complaints have to
# be raised into it.

def raise_dispute(txn, reason, udir):
    case = udir.open(reference=txn["reference"], reason=reason,
                     raised_at=now_ist())
    return {"case_id": case["id"], "track_in": "UDIR",
            "your_job": "keep the customer informed while it runs"}

# STEP 7. SETTLEMENT. The cut-offs are NPCI's, not yours.
def settlement_day(txn_time_ist, cutoffs):
    """A transaction after the cut-off settles in the next cycle. Aggregating
    on a UTC day boundary moves 5.5 hours of transactions into the wrong
    settlement day, every single day."""
    return cutoffs.cycle_for(txn_time_ist)

# STEP 8. WHAT YOU ARE ACTUALLY MEASURED ON.
# Declines split two ways and only one of them is your problem -- but the
# ecosystem measures BOTH against you, and the split is the whole
# conversation with your bank and with NPCI.

def classify_decline(code_, who):
    TECHNICAL = {"switch_timeout", "psp_unavailable", "issuer_down",
                 "beneficiary_unreachable"}          # infrastructure
    BUSINESS  = {"insufficient_funds", "wrong_pin", "limit_exceeded",
                 "account_blocked"}                  # the customer or their bank
    if code_ in TECHNICAL:
        return {"type": "TD", "owner": who, "counts_against_you": True}
    if code_ in BUSINESS:
        return {"type": "BD", "owner": "customer", "counts_against_you": False}
    return {"type": "UNCLASSIFIED", "action": "map_it_before_it_ships"}

def health(window):
    return {
        "td_rate": technical_declines(window) / total(window),
        "td_by_issuer": td_split(window, "issuer"),      # not your fault, your problem
        "success_by_flow": success_split(window, "flow"),
        "deemed_rate": deemed(window) / total(window),
        "deemed_unresolved_over_1h": aging_deemed(window),
        "market_share_rolling_3m": share_rolling(window, months=3),  # the 30% cap
    }

# WHAT TO CHECK
# [ ] every decline code is MAPPED to technical or business before launch.
#     An unclassified bucket is where your real TD rate hides
# [ ] plot TD by issuer bank. You cannot fix another bank's infrastructure,
#     but you can route around it, warn the customer, and take it to your PSP
# [ ] track market share on a ROLLING THREE-MONTH basis if you are anywhere
#     near scale. That is how the cap is computed
# [ ] the deemed queue has an owner and an age, like the EDPMS queue in
#     Guide 06. Unresolved deemed transactions are a support backlog that
#     arrives all at once
# [ ] build the per-rail, per-ticket-size fee engine NOW. The threshold is
#     fixed at 2,000 rupees. The rate is not yours to choose or to schedule

THE finding, and it is the reason this page exists: your technical decline rate is not a metric, it is the condition of your participation. UPI publishes bank-level performance, NPCI can audit participants, and a switch that declines transactions for infrastructure reasons is a problem the ecosystem addresses rather than tolerates. Feature roadmaps do not survive that conversation; decline rates do.

And the part that makes it hard: a large share of your declines will not be your fault. An issuer bank you have no relationship with, on infrastructure you cannot see, will fail your customers’ payments and the customer will blame your app. You cannot fix it. You can measure it per issuer, route around it where a second option exists, tell the customer something truthful about why, and take the data to your PSP bank — which is the only party with standing to escalate it. Teams that do not split declines by issuer spend years believing their own switch is worse than it is.

The 30% cap, still scheduled

NPCI proposed in November 2020 that no single third-party application provider should process more than 30% of UPI transaction volume, measured over the preceding three months on a rolling basis, with breach met by a halt on onboarding new customers rather than by blocking transactions. Bank-owned UPI apps are outside it.

The deadline has moved three times — 2022, then 31 December 2024, then 31 December 2026, which is where it stands. Two apps have been well above the cap throughout, at roughly three-quarters of monthly volume between them.

Watch out

Be careful how you use this in a business case, in either direction. The honest statement is that the cap is scheduled for 31 December 2026 and has been deferred three times. A plan that assumes it binds on that date is betting against a consistent pattern. A plan that assumes it never binds is betting that a stated rule will not be enforced. The defensible position is to build the rolling three-month share measurement and know your own number, which costs almost nothing and is the input to either outcome. Check the current position before you rely on this paragraph; it is the most likely line on this page to be out of date.

What it costs

UPI infrastructure — what it costs

Verified September 2026
The bank relationshipdirect
Commercial terms with a PSP or sponsor bank, and the step that sets your timeline. Negotiate the exit at the same time as the entry — the handle suffix makes leaving expensive in customers, not in rupees.
NPCI certificationdirect
Technical and compliance certification to participate. Then treat re-certification as a standing engineering cost: specifications are revised and the compliance dates are set elsewhere.
Running the switchdirect
Infrastructure sized for peak, not average, on a rail that does 24.51 billion transactions worth ₹29.82 lakh crore in a month. Capacity is a compliance posture here, not a cost-optimisation exercise.
The deemed queueindirect
Support and operations cost that arrives in bursts, during exactly the incidents when everything else is also on fire. Staff it as a queue with an owner.
Revenue, from this weekdirect
Zero since January 2020; the bar was removed by the 2026 amendment and notified on 14 September 2026. Confirmed so far: nothing charged up to ₹2,000, nothing on RuPay debit, P2P free. The rate, the merchant threshold and the split between parties are with the NPCI Steering Committee. Rates of 0.25% to 0.4% have been discussed — against 1–3% on credit cards and up to 0.9% on debit.
The shape of the revenueindirect
In 2025-26, transactions above ₹2,000 to merchants were about 4% of UPI volume and roughly two thirds of its value. A threshold set at ₹2,000 therefore exempts almost every transaction and reaches most of the money — which is the design, and it is why a volume-weighted revenue model will be badly wrong.
Where to buy these: Payments Reconciliation Build Sheet names every tool with its unit cost. Getting Access covers which ones you can sign up for today, which need a sales call, and which are licensed.
Note

Do not write an MDR number into a pricing model. This site said that in Session 49 when the change was a proposal, and it is still the right advice with the notification published, because the rate is not notified. Do build the ability to apply a per-rail, per-ticket-size, per-merchant-category fee — that is a schema decision, it takes a sprint, and the alternative is discovering you need it in the week NPCI publishes the circular.

AdvancedShip it. Failure modes, thresholds and evidence.

Three versions you could build

Accept UPI

Build: an aggregator integration, webhook signature verification over raw bytes, a settlement-file reconciliation, and a fee engine that can price per rail and per ticket size.

You get: UPI acceptance in days. You are a customer of this ecosystem, and Build Sheet 05 is the page you want.

Ship a UPI app on a sponsor bank

Build: sponsor bank agreement → SDK integration → UDIR → deemed-state handling with its own screen and queue → decline mapping before launch → data resident in India → a grievance route that reaches the PSP bank’s mechanism.

Trade: speed against a ceiling. You inherit the enabler’s roadmap and their certification, and you own the customer who is looking at a spinner.

Build the switch

Build: the whole transaction path, certified with NPCI, sized for peak, with per-issuer decline telemetry, rolling three-month share measurement, an idempotent ledger keyed on intent, and a fee engine waiting for a rate.

It breaks when: the team optimises for the happy path. Success rate on a good day is not the product. Behaviour during an issuer outage is, and it is the only thing that is visible to NPCI, to your bank and to your customers simultaneously.

Note

If you take one thing from this page: make “deemed” a real state in your schema today. Not a null, not a failure, not a retry. It costs a migration now and it is the difference between a bad hour and a double-debit incident with a dispute trail.

What goes wrong

What goes wrongWhyFix
Customer debited twiceAn unknown outcome was retried with a fresh reference.Reference derived from intent, stored before the call.
“Payment failed” on a live debitDeemed mapped to failure in the UI.Its own state, its own message, its own screen.
Status polling worsens an outageFixed-interval retries during an incident.Exponential backoff, then hand to reconciliation.
Real TD rate is invisibleUnmapped decline codes in a catch-all bucket.Map every code to technical or business before launch.
Blaming your own switch for yearsDeclines never split by issuer bank.Plot TD per issuer. Escalate through the PSP bank.
Complaints go nowhereSupport inbox instead of UDIR.Integrate UDIR. Eligible disputes are routed into it.
Settlement off by a day, every dayAggregating on a UTC boundary.IST, against NPCI cut-offs.
Certification treated as a launch gateNo capacity reserved for spec changes.Standing engineering budget for re-certification.
Cannot change banksEvery customer’s handle carries the suffix.Negotiate the exit before signing the entry.
No fee engine when the circular landsSix years of zero MDR encoded as an assumption.Per-rail, per-ticket-size pricing in the schema now.

Where to go next

Watch out

This page is a guide, not a specification. UPI participation is governed by NPCI circulars and procedural guidelines that are revised regularly and are authoritative over anything written here, and the MDR position changed the day before this page was published. Nothing here is legal advice. Work from the current NPCI documentation your PSP bank gives you, and confirm the MDR framework with your bank before pricing anything.

Sources

Every figure, rule and date on this page, and where to check it. Entries are typed so you can see which are primary-sourced and which are industry reporting.

  1. officialNPCI roles and responsibilities of NPCI, PSP banks and TPAPs — the allocation published by PSP banks under NPCI requirement: NPCI owns and operates UPI, prescribes the rules, liabilities, settlement cut-offs and dispute protocol, approves participation and may audit participants directly or through a third party; the PSP bank audits the TPAP’s app and systems, owns grievance redressal and answers for data residency; and both PSP bank and TPAP must store all UPI transaction data only in India. www.npci.org.in
  2. officialPayment and Settlement Systems Act, 2007 and the Taxation and Other Laws (Amendment) Bill, 2026 — the amendment removing the bar in section 10A, read with section 269SU of the Income-tax Act 1961, that had prevented any charge on BHIM-UPI, UPI-QR and RuPay debit payments since January 2020. www.indiacode.nic.in
  3. officialGovernment notification of 14 September 2026 on MDR — the notified position that no charge applies to UPI transactions up to ₹2,000 or to RuPay debit, and that person-to-person transfers remain free. The notification does not fix the rate, the merchant threshold or the distribution of MDR income — those sit with the NPCI UPI and Services Steering Committee. dfs.gov.in
  4. officialRBI turnaround time framework for failed transactions — the auto-reversal of failed debits with compensation payable per day of delay — the mechanism that eventually resolves a deemed transaction, and which does not help the customer in the ninety seconds they are looking at your screen. www.rbi.org.in
  5. officialNPCI circular on the third-party application volume cap — the 30% limit on a single TPAP’s share of UPI transaction volume proposed in November 2020, computed over the preceding three months on a rolling basis, enforced by halting new customer onboarding, with bank-owned apps outside its scope. Deadline moved from 2022 to 31 December 2024 and then to 31 December 2026. www.npci.org.in
  6. officialNPCI dispute and decline framework — Unified Dispute and Issue Resolution as the ecosystem dispute protocol that partner applications are required to integrate, and the NPCI definitions and targets separating technical declines from business declines. www.npci.org.in
  7. industryUPI scale and MDR reporting, September 2026 — 24.51 billion transactions worth ₹29.82 lakh crore in August 2026; more than 24,000 crore transactions worth ₹314 lakh crore in 2025-26, up 30% by volume and 21% by value; transactions above ₹2,000 to merchants at about 4% of volume and roughly two thirds of value; discussed MDR rates of 0.25% to 0.4% against card MDRs of 1–3% credit and up to 0.9% debit; and the Steering Committee’s expected meeting. Reporting, not notification — confirm every figure before use.
  8. industryUPI architecture and operations commentary — the practitioner read on sponsor-bank SDK routes, handle-suffix switching costs, deemed-transaction polling behaviour during incidents, and per-issuer decline variation. Directional.

Checked September 2026. This page has the shortest shelf life of any on this site. The MDR notification is one day old, the rate is unnotified, and the volume cap is scheduled for 31 December 2026 having been deferred three times. Verify all three before relying on them.

Ask an AI about this page

Opens your assistant with this page as the source, and a question rather than a summary. It will ask what you are building before it answers.

Nothing is sent from here. The link carries only this page’s title and address.