Skip to content
Acquiring • UPI QR 10 min read • 08 September 2026

Merchant Acquiring & Dynamic QR Code Engine: High-Throughput NPCI Payload Generation

An engineering guide to dynamic UPI QR code generation — EMVCo specifications, Base64 payload encoding, transaction reference binding, instant webhook callback hooks, and acquirer switch integration.

Dynamic UPI QR Code Generation & Merchant Acquiring Engine Technical Whiteboard Diagram
Read Article In / भाषा चुनें:

1. Static vs. Dynamic QR Codes in Merchant Acquiring

In retail and billing environments, Static QR stickers printed at checkout counters require customers to manually enter the exact transaction amount. This introduces human input errors, wrong payment amounts, and manual merchant verification delays.

A Dynamic UPI QR Code Engine automatically embeds the exact payable amount, unique merchant VPA, order reference ID, and transaction note directly into a single, dynamically generated EMVCo-compliant QR image. When the customer scans the QR code on any UPI app, the exact amount is pre-filled and locked, allowing 1-tap instant payment with < 50ms payload generation latency.

2. Core Architectural Components of a Dynamic QR Engine

As illustrated in the hand-drawn technical architectural whiteboard blueprint above, a production-grade merchant acquiring QR engine consists of five integrated modules:

  • Merchant App / Billing POS Server: Initiates the payment request containing order ID, merchant key, and exact payable amount (e.g. ₹1,499.00).
  • QR Generator API (Payload Engine): High-throughput microservice generating cryptographically signed NPCI UPI deep links and EMVCo payloads.
  • EMVCo Specification Encoder: Converts UPI parameters (VPA, amount, tr, tn, mc) into standardized Tag-Length-Value (TLV) payload strings with CRC16 error checking.
  • Customer PSP & NPCI UPI Network: Routes the scanned transaction to the issuing bank for instant PIN authorization.
  • Real-Time Webhook Callback Handler: Receives acquirer payment confirmation and dispatches instant HTTP webhooks to the merchant's POS billing system.

3. Anatomy of an NPCI-Compliant Dynamic UPI Payload

upi://pay?pa=paisape@upi&pn=MerchantName&mc=5411&tr=TXN9842103&am=1499.00&cu=INR&tn=Order9842
  1. pa (Payee Address): Merchant's verified VPA (e.g. paisape@upi).
  2. pn (Payee Name): Registered legal business or brand name.
  3. mc (Merchant Category Code): 4-digit NPCI/Visa MCC code (e.g. 5411 for Grocery Stores).
  4. tr (Transaction Ref ID): Unique order reference number generated by the merchant POS.
  5. am (Amount): Fixed payable transaction amount pre-filled and locked.
  6. tn (Transaction Note): Order summary or bill reference text displayed on user app.

4. Key Engine Performance Metrics

Metric Target SLA Technical Implementation
QR Payload Latency < 50ms In-memory C++ / Go payload string generation
Throughput (RPS) 10,000+ Requests/sec Stateless microservices auto-scaled behind Load Balancers
Webhook Callback SLA < 100ms Asynchronous Redis/RabbitMQ message queue dispatch

5. Engineering Best Practices

  • Short TTL for Dynamic QR Codes: Expire generated dynamic QR codes after 5-10 minutes to prevent accidental duplicate payments on expired orders.
  • HMAC Signature Verification: Sign inbound POS payload requests with a secret merchant HMAC key to prevent unauthorized QR generation.
  • Webhook Retry Strategy: Implement exponential backoff retries (30s, 2m, 10m) for failed merchant POS webhook notifications.

6. Conclusion

A dynamic UPI QR code engine turns retail and digital checkouts into seamless 1-tap payment experiences. By encoding EMVCo payloads in sub-50ms latency and pushing real-time acquirer webhooks, Indian merchants eliminate billing errors and accelerate checkout speed.