India

How UPI QR codes work

A UPI QR code holds a payment link with the payee's UPI ID, name, and sometimes an amount. What's inside, static vs dynamic shop codes, and how paying works.

A UPI QR code is a payment request printed as a QR code. It holds a short link starting upi://pay, with the payee’s UPI ID, their name, and sometimes an amount and a note. When you scan it with any UPI app, the app fills in a payment from you to that payee. Nothing happens until you check the details and enter your UPI PIN. UPI is run by the National Payments Corporation of India (NPCI), and every UPI app can read every UPI QR code.

What’s inside a UPI QR code

Scan a UPI code with a QR scanner app instead of a UPI app, and you’ll see text like this:

upi://pay?pa=sharmastore@okbank&pn=Sharma%20Store&am=250.00&cu=INR&tn=Order%2042

Each part after the ? is a field:

Field Means Example
pa Payee address: the UPI ID that receives the money sharmastore@okbank
pn Payee name Sharma Store (%20 is a space)
am Amount, in rupees 250.00
cu Currency INR
tn Transaction note Order 42
mc Merchant category code (business codes) 5411 for grocery stores
tr Transaction reference from the merchant An order or bill number

Only pa is essential. A personal code usually has just pa and pn. Shop codes often add mc, and billing systems add am and tr.

Static and dynamic UPI QR codes

Static QR codes are the printed standees and stickers at shop counters. They hold the shop’s UPI ID and name, but no amount, so you type the amount yourself. The same code works for every customer, for years.

Dynamic QR codes are generated for each bill, on a billing screen, a card machine, or a website checkout. They include the amount and a reference for that order, so the shop’s system can match your payment to the bill automatically. They’re meant for one payment.

Both are ordinary UPI codes; the difference is only which fields they include.

What happens when you scan and pay

  1. Your UPI app reads the code and shows the payee’s name, UPI ID, and amount. Reading the code happens on the phone, without internet.
  2. You check and confirm. If the amount is blank, you enter it.
  3. You enter your UPI PIN. This authorizes your bank to send money from your account.
  4. Your bank sends the payment through NPCI’s network to the payee’s bank, usually within seconds. This step needs a connection.
  5. Both sides get a confirmation. Many shops have a speaker (a “soundbox”) that announces payments received.

The name your app shows in step 2 comes from the UPI system (the name registered for that UPI ID), not just from the code, which is why it’s worth reading before you pay.

Why a UPI QR code can’t send you money

Every UPI QR code describes who receives the money: the person in the code. Scanning it and entering your PIN always pays them. There’s no kind of UPI code that puts money into your account when you scan it. If someone asks you to scan a code or enter your PIN “to receive” a payment, it’s a scam. UPI QR code scams explains how these work and what to do.

UPI QR codes and BharatQR

You may also see BharatQR codes, an interoperable standard developed by NPCI with the card networks. A single BharatQR code at a shop can accept payments from UPI apps and from card-network apps. To you, paying works the same way: scan, check, and approve with your PIN.

Common questions

Can I make my own UPI QR code?

Yes. Every UPI app can show a QR code for your own UPI ID, usually under your profile or a “Receive money” option. Share or print that one, so it’s linked to your account correctly.

Can a UPI QR code expire?

A static code doesn’t expire; it keeps working as long as the UPI ID is active. Dynamic codes made for a bill are meant for a single payment, and some apps or merchants set a time limit on them.

Is it safe to scan a UPI QR code at a shop?

Generally, yes, if you check that the payee name in your UPI app matches the shop. Watch for stickers placed over the shop’s real code. Fake QR code stickers explains what to look for.

A note on EveryQR

EveryQR, the Android app I make, shows the full UPI link when you scan a payment code, so you can read the pa (UPI ID) and am (amount) before deciding anything. It doesn’t make payments: if you tap Open in UPI app, your UPI app shows the details again and asks for your PIN there.

Browse all QR code guides.

All QR codes guides