UPI payment link and QR code generator
Build and validate a upi://pay link, render its QR, or decode an existing UPI QR back into readable fields.
Runs in your browser — nothing you paste is sent to a server
The virtual payment address money goes to, e.g. merchant@okhdfcbank.
Shown to the payer in their UPI app. Must be percent-encoded if it contains spaces.
Omit for a static QR the payer types an amount into. Include it for a dynamic QR. Maximum two decimal places.
UPI settles only in INR. Any other value will be rejected by the payer's app.
Free text shown to the payer. Keep to 50 characters.
Four-digit ISO 18245 MCC. Required for merchant collection.
Set by the PSP for merchant transactions.
Your own order or invoice reference. Required for merchant collection, and what you reconcile against.
Minimum the payer may pay, for part-payment flows.
Link to an order or invoice, shown by some apps.
How the link was presented, e.g. 01 intent, 02 QR, 04 secure QR.
Purpose of the transaction, assigned by NPCI.
NPCI-assigned organisation identifier.
Base64 signature over the QR contents, present on signed merchant QRs.
upi://pay?pa=bharatgrocers%40okhdfcbank&pn=Bharat%20Grocers&tn=Counter%201&mc=5411
- This looks like a merchant collection (mc present) but tid, tr are missing. Merchant transactions normally carry all of mc, tid and tr.
cu— No currency given. Apps assume INR, which is the only currency UPI supports.
Printed merchant QRs should use M or above — a sticker on a counter picks up scuffs, and higher error correction is what keeps it scannable.
What goes into a upi://pay link
A UPI QR is not a special image format — it is a plain upi://pay URI encoded as a QR. Scan one with any QR reader and you can read the text yourself. The parameters that matter:
pa— the payee VPA. Note the handle has no dot:name@okhdfcbank, nevername@bank.com.pn— the payee name the payer sees before confirming.am— the amount. Its presence is the entire difference between a static and a dynamic QR.mc,tid,tr— merchant category code, transaction ID and your own order reference. Reconciliation runs ontr.
Scope and limits
- Validates link structure, VPA format, amount precision, currency and encoding. It cannot tell you whether a VPA actually exists — only the payer's PSP can resolve that.
- Signed merchant QRs carry a
signparameter. It is shown but not verified, since that needs the NPCI public key for the issuing organisation. - Decoding reads QR images only. A Bharat QR will decode to an EMVCo payload rather than a UPI link — that belongs in the Bharat QR decoder.
Worked example
Static — one sticker for the counter
No amount, so the payer types one in. Simple to print, but nothing ties a payment to an order.
upi://pay?pa=bharatgrocers%40okhdfcbank&pn=Bharat%20Grocers&tn=Counter%201&mc=5411
- pa
- bharatgrocers@okhdfcbank
- pn
- Bharat Grocers
- tn
- Counter 1
- mc
- 5411
Dynamic — one code for one order
Carries the amount plus tid and tr, so settlement reconciles against your order reference.
upi://pay?pa=bharatgrocers%40okhdfcbank&pn=Bharat%20Grocers&am=499.00&cu=INR&tn=Order%204821&mc=5411&tid=TID2402140931&tr=ORD4821
- pa
- bharatgrocers@okhdfcbank
- pn
- Bharat Grocers
- am
- 499.00
- cu
- INR
- tn
- Order 4821
- mc
- 5411
- tid
- TID2402140931
- tr
- ORD4821
Frequently asked questions
- What is the difference between a static and a dynamic UPI QR?
- Only the amount. A static QR omits the am parameter, so the payer types the amount in — one sticker at a counter serves every sale, but you cannot reconcile a payment to an order automatically. A dynamic QR carries am, and normally tid and tr as well, so it is generated per order and reconciles cleanly. If you are chasing unmatched settlements, a static QR is usually why.
- Why does my UPI link break in some apps but work in others?
- Nearly always percent-encoding. A payee name or note containing a literal space, ampersand or hash is valid to your eye but truncates the link at that character in apps that parse strictly. Spaces must be %20, and a plus sign must be %2B — a raw + is read as a space by some apps and as a plus by others. This tool flags all of these, because once the value is decoded for display the fault becomes invisible.
- Is a UPI QR the same as a Bharat QR?
- No, and they are not interchangeable. A UPI QR encodes a upi://pay URI — plain text you can read. A Bharat QR encodes an EMVCo merchant payload, a tag-length-value structure that also carries card network data and ends with a CRC. If what you scanned starts with a digit rather than upi://, it is an EMVCo QR and belongs in the Bharat QR decoder instead.
- Can a UPI QR take payment in a currency other than INR?
- No. UPI settles only in INR, so the cu parameter is either INR or absent. Any other value will be rejected by the payer's app rather than converted.
- Is it safe to decode a QR here?
- Yes. The image never leaves your browser — it is drawn to an in-memory canvas and decoded locally, with no upload and no network request. A UPI QR contains no secret in any case: it is a public payment address, which is why it is printed on a sticker.