What Is a Dynamic QR Code in UPI Payments? A Complete Guide

VT

VyaparGateway Team

Payments Editorial

7 min read
Updated
What Is a Dynamic QR Code in UPI Payments? A Complete Guide
#dynamic qr code #upi qr #qr payments #upi basics

If you've ever taken a UPI payment in your life — and if you've spent any time in India in the last five years, you almost certainly have — you've used a QR code. But not all UPI QR codes are the same. The QR taped to the counter at your local chaiwala is fundamentally different from the QR that pops up on a Zomato or Swiggy checkout screen. The first is a static QR; the second is a dynamic QR. The difference between them is small in appearance and enormous in business impact.

This guide explains what a dynamic QR code actually is, how it works at the payload level, when each type is appropriate, and why almost every online business that touches UPI ends up needing dynamic QR — usually after a painful month of trying to make static QR work for online checkout.

The short definition

A dynamic QR code in UPI is a QR generated on demand for a specific transaction. The payload encoded inside the QR carries the merchant's identifier (VPA or merchant ID), the exact amount to be paid, and a unique transaction reference. When the customer scans it with their UPI app, the app shows them the amount already filled in — they only have to approve, not type.

A static QR code, by contrast, encodes only the merchant identifier. The customer scans it, then manually enters the amount in their UPI app. There's no transaction reference, no amount validation, and no programmatic link between the scan and any specific order.

Mobile phone scanning a UPI QR code
Dynamic QRs encode the amount and reference in the payload itself, so the UPI app pre-fills the payment for the customer.

What's inside a dynamic UPI QR payload

Every UPI QR is, technically, a URI in the format `upi://pay?pa=...&pn=...&am=...&tr=...&cu=INR`. The fields you'll see in a real dynamic QR include:

  • pa — payee address, the merchant's VPA (e.g. merchant@bank).
  • pn — payee name, the merchant's display name shown to the customer in their UPI app.
  • am — amount, the exact rupee value of the transaction. Present in dynamic QRs, absent in static ones.
  • tr — transaction reference, a unique identifier (often the gateway's intent ID) that ties this QR to a specific order.
  • tn — transaction note, a short description the customer sees (e.g. 'Order #12345').
  • cu — currency, always INR for UPI inside India.
  • mc — merchant category code, optional but used for compliance and analytics.

Because the amount and reference are part of the URI, the UPI app cannot edit them. The customer's only choices are to approve the payment or to cancel — there is no field to type a different amount.

Why online businesses need dynamic QR

In a physical store, static QR is fine. The shopkeeper announces the amount, the customer types it, hands the phone over to confirm, and life moves on. Online, none of that works. There's no shopkeeper to verify the amount. The customer is alone with their phone, your website is loading, and they're being asked to type a number they may or may not remember correctly.

"Static QR is for in-person, attended payments. Dynamic QR is for everything else."

Concretely, dynamic QR enables four things that static QR cannot:

  • Exact-amount payments — no typos, no underpayments, no overpayments.
  • Per-order reconciliation — the credit in your bank carries the order ID, so you know whose order to fulfil.
  • Webhook automation — your gateway can tell your application the moment the specific intent is paid, instead of you having to manually match amounts to orders.
  • Time-bound intents — a dynamic QR can expire after a window, preventing 'I'll pay tomorrow' confusion or accidental re-scans.

Where static QR still makes sense

Static QR isn't bad — it's just specialised. It works well when the merchant is physically present, the amount is small enough to be communicated verbally, and there's no need to reconcile individual orders to individual payments. Tea stalls, taxi drivers, small kiranas, and anyone using UPI as a cash-equivalent at a counter all do well with static QR. It's only when you try to make static QR do the job of dynamic QR — putting it on a checkout page or sending it over WhatsApp for an invoice — that things break.

Small shop displaying static UPI QR code at counter
Static QR is fine at a counter where the amount is announced. Online, it forces customers to type — and customers make mistakes.

How to generate dynamic QR for your business

You don't generate dynamic QRs by hand — you call a gateway API that issues them for you, tied to your merchant identity. VyaparGateway's API takes an amount and your order ID, returns a fresh QR payload, and watches for the matching credit to fire a webhook to your backend. The whole cycle from intent creation to webhook delivery typically completes in under ten seconds. VyaparGateway helps you issue dynamic UPI QR codes, verify payments, and notify your stack via webhooks—without charging a per-transaction platform fee on top of your plan.

Share this guide

Frequently asked questions

What is the difference between a static and dynamic UPI QR code?
A static QR encodes only the merchant identifier — the customer has to manually type the amount. A dynamic QR encodes the merchant identifier plus the exact amount and a unique transaction reference, so the customer's UPI app pre-fills the payment and the merchant can match the credit to a specific order.
Can I generate a dynamic UPI QR code myself?
Technically you can construct a UPI URI yourself if you have a registered merchant VPA, but for production use you almost always want a gateway that handles the QR rendering, intent expiry, payment detection, and webhook delivery. Doing those four things reliably is non-trivial.
Do dynamic QR codes expire?
Yes, typically. Most gateways expire dynamic QR intents after a window (commonly 5–30 minutes). This prevents accidental late payments and stops customers from re-using an old QR with the wrong amount. The expiry is configurable depending on your use case.
Will all UPI apps accept a dynamic QR?
Yes. Dynamic QR is part of the standard UPI specification (the `upi://pay` URI format) and is supported by every major UPI app including PhonePe, Google Pay, Paytm, BHIM, Amazon Pay, and every bank-branded app. The customer experience is identical across apps.

Free tools for Indian merchants

No sign-up, no ads, no data selling

Use our free, browser-only tools whenever you need them. We don't store the values you enter or track you across the web.

See all free tools →
VT

About the Author

VyaparGateway Team

Payments Editorial

The VyaparGateway editorial team writes practical, India-first guides on UPI payments, merchant onboarding, and fintech compliance — informed by what we ship, debug, and operate every day at vyapargateway.com.

Related reading

Start with VyaparGateway

Create an account to connect your merchant profile, get API keys, and ship dynamic UPI checkout in minutes.