How a UPI QR code works: the upi://pay link and its pa, pn, am, cu and tn fields, static vs fixed-amount codes, checking the payee name, and print sizes.
By Udit Agarwal · Updated October 17, 2026
A UPI QR code is an ordinary QR code that stores a upi://pay link naming the UPI ID to be paid and the payee's name, such as upi://pay?pa=citybakery@bank&pn=City%20Bakery&cu=INR. When someone scans it with a UPI app, the app reads those details and opens a payment screen, and no money moves until the payer approves the payment with their UPI PIN. Because the code holds only text, anyone can make one for their own UPI ID, and anyone paying should check the name their app shows before approving.
The parameter names come from the UPI linking specification published by NPCI, the organisation that runs UPI. A code for a shop counter might hold this link, where citybakery@bank is a made-up UPI ID:
upi://pay?pa=citybakery@bank&pn=City%20Bakery&am=250.00&cu=INR&tn=Order%2042
| Parameter | Meaning | Example |
|---|---|---|
pa |
Payee address: the UPI ID that receives the money | citybakery@bank |
pn |
Payee name | City%20Bakery |
am |
Amount in rupees: digits and a decimal point, at most two decimals | 250.00 |
cu |
Currency, which for UPI is INR | INR |
tn |
Transaction note shown to the payer | Order%2042 |
tr |
Transaction reference, such as an order or bill number | ORD42 |
mc |
Merchant category code, four digits | 5411 |
Values are percent-encoded so that spaces and symbols survive. A space becomes %20, and the ampersand in "Sharma & Sons" becomes %26, which stops it being read as the start of the next parameter: pn=Sharma%20%26%20Sons. The specification defines a few more parameters, but a payee address and name, with an optional amount and note, are all a basic payment code needs.
upi://pay, splits the link at each & and decodes the values, so %20 becomes a space again.Nothing in the code can take money on its own. The payer's PIN authorises each payment, and a PIN is needed only to send money, never to receive it.
A code without an am value is what shops call a static code: one printed code takes any number of payments, and the payer types the amount each time. A code with the amount filled in suits a single bill, an invoice or a fixed price, such as a ₹500 event fee. Most UPI apps show that amount prefilled, though some let the payer change it, and each amount needs its own code. An invoice made with the GST Invoice Generator can travel with a code for its exact total, as the GST invoice guide describes.
In UPI payments, a dynamic QR code usually means one generated for each sale by a billing system or payment provider, carrying the amount and a unique transaction reference so the merchant's system can match each payment automatically. A code you make yourself with an amount and a reference looks similar, but nothing reports back when it is paid. Check the credit in your own UPI app or bank account; a payment screen shown on the customer's phone is easy to fake.
The name on the confirmation screen is the best safety check UPI offers. If it does not match the shop or person you mean to pay, stop. A mismatch can mean a typo in the UPI ID, a code that belongs to someone else, or a sticker pasted over the real code. Because many apps show the name registered with the bank for that UPI ID, which can differ from the pn text inside the code, trust the name the app displays.
Anyone who displays a code should put their real business or personal name in it and look at printed codes now and then for a sticker on top. Anyone paying should remember that receiving money never requires scanning a code or entering a PIN, so a stranger who sends a QR code "to pay you" is asking you to pay them. To see what a code holds before you act on it, the QR Code Reader decodes it and warns when a UPI link is a collect or mandate request rather than an ordinary payment.
am must be plain digits with a decimal point, so 1,250 or ₹250 is not a valid amount.tn to an order number or a short label.mc is a four-digit merchant category code from a business's bank, such as 5411 for grocery stores. Leave it out for a personal UPI ID.A UPI link is short, so the code is coarse: the 76-character example above makes a 37 × 37 module code at error-correction level M. Large modules are easy for phone cameras, which is why even a small counter card scans well.
The general rules in the QR code guide apply. Print at least 2 cm wide for close scanning, keep a blank margin (the quiet zone) of four modules, use dark modules on a light background, and allow roughly ten times the code's width as the scanning distance. Level Q or H suits a card that will be handled and scuffed. For print, export SVG or a large PNG.
| Card | Paper | Code width | Scanning distance (10× rule) |
|---|---|---|---|
| Counter card | A6, 105 × 148 mm | 64 mm | about 0.6 m |
| Stand or window | A5, 148 × 210 mm | 92 mm | about 0.9 m |
| Poster | A4, 210 × 297 mm | 130 mm | about 1.3 m |
On the A6 card, each module of the example code is about 1.4 mm wide.
The UPI QR Code Generator builds the link and the code from a form. The UPI ID and payee name are required. Amount, note, transaction reference and merchant category code are optional, and empty ones are left out of the link. The UPI ID must have at least two letters, digits, dots, hyphens or underscores, one @ and a handle of letters and digits; capitals are saved as lowercase, and the tool says whether it recognises the handle. An unfamiliar handle only gets a hint, because new ones appear often, and the tool cannot check that an ID exists or who owns it.
Commas, spaces, a ₹ sign and a leading Rs or INR are ignored in the amount, which is written with exactly two decimals. A line under the field shows what will be encoded, such as 1250.00 (₹1,250.00), and that is where a comma typed as a decimal point shows up as ₹25,050.00. Zero, negative amounts, more than two decimals and anything above ₹10,00,00,000 are rejected, and amounts above ₹1,00,000 get a warning, because banks and apps often cap a single payment around that figure. The note is limited to 50 characters, the reference to 35 letters and digits, and the merchant code to four digits. The currency is always INR.
You get the link with a copy button and a QR code with a choice of colours, module shape (square, rounded, dots or diamond), quiet zone and error-correction level, M by default. It downloads as PNG from 256 to 2048 pixels or as SVG, and the page decodes the finished image to confirm it scans back to the same link. A printable Scan to pay card in A6, A5 or A4 carries the code, payee name, UPI ID, any amount and a reminder to check the payee name, with no logos; it opens the browser's print dialog, where you can also save a PDF. The tool only builds the code. It does not process payments, contact any bank or app, or track who has paid, and what you type is not uploaded.
What does a UPI QR code contain? A upi://pay link with the payee's UPI ID (pa) and name (pn), and optionally an amount (am), the currency (cu=INR), a note (tn), a reference (tr) and a merchant code (mc). It holds nothing that lets anyone take money from you.
Can I make a UPI QR code with a fixed amount? Yes. Put the amount in am, as plain digits with up to two decimals. Most apps show it prefilled, though some let the payer change it, and you need a separate code for each amount.
Is it safe to display my UPI QR code? It shows your UPI ID and the name in the code, so anyone who sees it can pay you and read those details. It cannot be used to take money, because every payment needs the payer's own PIN.
Why does my UPI app show a different name from the one in the code? Many apps show the name registered with the bank for that UPI ID rather than the name typed into the code. A person's full name in place of a shop name can be normal, but an unrelated name is a reason to stop and check with the payee.
Does a UPI QR code expire? A code made from a UPI ID contains no expiry date. It keeps working as long as that UPI ID stays active and linked to a bank account.
Can I add a logo to a UPI QR code? Copy the link from the generator into QR Code with Logo, which accepts any text, keep error correction at Q or H, and test the result with a phone before printing.
All Encode / Decode tools · All guides