# The UPI QR code format, parameter by parameter

> A UPI QR code is a upi://pay deep link. pa (the VPA) and pn (payee name) are required; am, cu, tn, tr, mc and mode are optional. NPCI standardised it, so one code works in every UPI app — Google Pay, PhonePe, Paytm, BHIM and every bank app.

Source: https://useqr.app/docs/payments/upi-qr-code-format · Last reviewed 2026-08-21 · UseQR is free forever, MIT licensed, no signup.

---

## The link

```
upi://pay?pa=merchant@okhdfcbank&pn=Chai%20Point&am=120.00&cu=INR&tn=Table%207&tr=ORD10432&mc=5812
```

## Every parameter

| Param | Name | Required | Constraint |
|---|---|---|---|
| `pa` | Payee address (VPA) | **yes** | `name@handle`, 2–256 chars before `@`, 2–64 letters after |
| `pn` | Payee name | **yes** | Shown on the payer's confirmation screen |
| `am` | Amount | no | Up to 2 decimal places |
| `cu` | Currency | effectively yes | `INR` |
| `tn` | Transaction note | no | Keep under ~25 chars |
| `tr` | Transaction reference | no | 1–35 chars, `[A-Za-z0-9.-]` |
| `mc` | Merchant category code | no | Exactly 4 digits, ISO 18245 |
| `mode` | Mode | no | `02` for merchant-presented static |
| `sign` | Signature | no | Only for PSP-issued signed codes |
| `url` | Invoice URL | no | Rarely honoured |

## Why the confirmation screen matters

`pn` is what the payer sees before they authorise. It is not decoration — it is the **only**
fraud check most customers will ever perform. If a fraudster pastes their own code over
yours, the mismatch between the printed business name and the name in the app is what gives
it away.

Print your business name large, right next to the code, matching `pn` exactly.

## Merchant category codes

`mc` affects more than reporting. Some issuers apply different limits, interchange or rewards
by category, and certain UPI-Lite and offline flows are gated on it.

| MCC | Category |
|---|---|
| 5411 | Grocery stores |
| 5812 | Restaurants |
| 5814 | Fast food |
| 5912 | Pharmacies |
| 5541 | Service stations |
| 8220 | Education |
| 4121 | Taxi and rideshare |
| 8398 | Charitable organisations |

If your PSP issued your merchant VPA, use the MCC they assigned rather than choosing one.

## Encoding notes

- The payload is a URI, so every value must be **percent-encoded**. A space in `pn` becomes
  `%20`; an ampersand becomes `%26`. Unencoded, the parameter list breaks at the first space.
- Keep `tn` short. Each character adds modules, and a long note can push the code up two
  versions, shrinking every module at the printed size.
- UseQR validates the VPA pattern, the two-decimal amount, the 4-digit MCC and the
  35-character reference before generating — the constraints NPCI actually imposes.

## One code, every app

There is no such thing as a "Google Pay QR code" or a "PhonePe QR code" that another app
cannot read. NPCI standardised the format precisely so a merchant needs one standee. Anyone
selling per-app codes is selling nothing.

## FAQ

### What are the required parameters in a UPI QR code?
pa (the payee VPA) and pn (the payee name). Everything else — amount, note, reference, merchant category — is optional, and cu=INR is conventionally always present.

### Do I need separate QR codes for Google Pay and PhonePe?
No. NPCI standardised the upi://pay format, so one code works in every UPI app and every bank app.

### What is the mc parameter?
The four-digit ISO 18245 merchant category code. Some issuers apply different limits or rewards by category, and some offline flows depend on it.

### Why does my UPI QR code show the wrong name?
The pn parameter is what the app displays. If it differs from your business name, either the code was generated with the wrong value, or someone has pasted a different code over yours.

## Try it

- https://useqr.app/upi
- https://useqr.app/validate
- https://useqr.app/size-calculator
