The Complete Guide to UPI QR Codes, Bill Splitting & NPCI 2.0 Payment Standards
An exhaustive technical walkthrough of Unified Payments Interface (UPI) URI specifications, static vs dynamic payment payload generation, client-side bill splitting math, and zero-trust privacy architectures.
1. Introduction to Unified Payments Interface (UPI) & QR Payload Mechanics
Unified Payments Interface (UPI) is a real-time payment system developed by the National Payments Corporation of India (NPCI) that facilitates inter-bank peer-to-peer (P2P) and person-to-merchant (P2M) transactions. The bedrock of instant in-person retail digital payments in India relies on scannable 2D matrix QR (Quick Response) codes.
When a mobile payment application (such as Google Pay, PhonePe, Paytm, or BHIM) scans a UPI QR code, it parses a standardized deep-linking Uniform Resource Identifier (URI) formatted according to NPCI specifications. The standard scheme identifier for all compliant transactions is upi://pay.
A QR code is simply a visual representation of raw UTF-8 string data formatted as a 2D matrix of black and white squares. When scanned, the smartphone camera extracts string data (e.g. upi://pay?pa=john@okaxis&pn=John%20Doe&cu=INR), triggers the OS protocol handler, and opens the user's default UPI banking application with pre-populated payee fields.
2. Deep Dive into upi://pay URI Parameters & NPCI Specifications
The NPCI URI specification defines mandatory and optional key-value parameters passed via standard query string format. Understanding these keys is essential for merchants, developers, and billing systems.
| Parameter Key | Parameter Name | Req / Opt | Description & Validation Rules |
|---|---|---|---|
pa |
Payee VPA / Handle | Mandatory | Virtual Payment Address of recipient (e.g., merchant@bank or 9876543210@paytm). Must contain an '@' symbol. |
pn |
Payee Name | Mandatory | Legal registered name of the payee or business entity. URL-encoded string. |
am |
Transaction Amount | Optional | Numeric decimal amount up to 2 decimal places (e.g., 250.50). If omitted, the payer enters custom amount. |
tn |
Transaction Note | Optional | Short remarks or reference memo shown in payment passbook (e.g. Dinner Split - Table 4). Max 80 chars. |
cu |
Currency Code | Mandatory | ISO 4217 3-letter currency code. Standard value is INR. Defaults to INR. |
mc |
Merchant Category Code | Optional | 4-digit ISO 18245 MCC code identifying business sector (e.g. 5812 for restaurants). |
tr |
Transaction Reference ID | Optional | Unique merchant order reference or invoice identifier for backend reconciliation. |
upi://pay?pa=cafe.espresso@upi&pn=Cafe%20Espresso&am=340.00&tn=Coffee%20and%20Pastry&cu=INR
3. Static vs Dynamic UPI QR Codes: Architectural Comparison
In retail digital payments, QR codes fall into two distinct operational categories: Static QR Codes and Dynamic QR Codes. Choosing the right format impacts payment security, customer checkout friction, and cashier workflow speed.
Static UPI QR Code
pa) & Name (pn) only.Dynamic UPI QR Code
am), and Invoice Ref (tr).4. The Mathematics & Logic of Client-Side Bill Partitioning
When groups share meals, hotel stays, or group gifts, calculating individual payment obligations and requesting reimbursement often introduces manual arithmetic errors and awkward follow-ups. SplitQR solves this by providing programmatic batch QR partitioning.
Equal Split Formula
Given a total bill amount \( A \), number of participants \( n \), and optional tip/tax surcharge rate \( t \):
Each participant's share \( S_i \) is automatically rounded to two decimal places, formatted into a unique dynamic payload URI, and rendered as a dedicated scannable QR card containing custom memo tags (e.g., Part 1 of 4 • Resort Bill).
5. Zero-Trust & Client-Side Privacy: Why Serverless Payment Studios Win
Financial data privacy is paramount. Many online QR code generators transmit payee VPAs, phone numbers, and payment notes to third-party cloud servers, exposing merchant data to database breaches, tracking cookies, and unauthorized analytics profiling.
100% In-Browser Compilation
All QR matrix logic and canvas card renderings execute locally within your browser's V8 JavaScript engine. Zero network requests are made during QR code generation.
Zero Server Logging
We operate without backend payment databases. Payee handles, invoice amounts, and saved presets remain strictly on your device via HTML5 LocalStorage.
Instant Offline Availability
Because no backend API calls are required, SplitQR generates QR codes instantly even under weak internet connectivity or offline conditions.
6. Best Practices for Designing & Printing Custom Payment Studio Cards
To maximize scan speed and aesthetic appeal on physical store counters or table acrylic stands, follow these print preparation guidelines:
Maintain maximum contrast between QR module pixels and background canvas. Dark modules on crisp white background provide optimal camera reflection contrast.
Ensure a minimum quiet margin of 4 module widths around the QR perimeter. Avoid clipping edge modules with text or border lines.
Use SplitQR's high-resolution Canvas PNG Export feature. Print at a minimum resolution of 300 DPI to eliminate pixel blurring on physical materials.
7. Frequently Asked Questions (FAQ)
SplitQR operates 100% client-side inside your browser. It formats payee details according to National Payments Corporation of India (NPCI) upi://pay specifications and compiles the 2D matrix directly using JavaScript. No bank details or payment payloads are ever transmitted to external servers.
A static UPI QR code encodes only payee VPA (pa) and Payee Name (pn), allowing customers to enter any amount. A dynamic UPI QR code includes a predefined amount (am) and optional transaction note (tn), locking the transaction value for instant single-scan payment.
Yes! SplitQR strictly follows official NPCI UPI 2.0 URI specifications. The generated QR codes work seamlessly with Google Pay (GPay), PhonePe, Paytm, BHIM UPI, Amazon Pay, Cred, and all major Indian banking applications.
The Bill Splitter takes total bill amount, number of participants, custom bill notes, and payee details, then calculates individual exact shares. It automatically generates a grid of customized, scannable QR codes for each person to settle their share instantly.
Zero. SplitQR is a client-side generator tool, not a payment gateway or payment aggregator. Payments go directly from the customer's bank account to your merchant bank account via native UPI settlement with 0% fee.
Yes! Use the "Save as Preset" feature on the Single QR tab. Saved profiles are stored locally in your browser's encrypted LocalStorage and can be recalled instantly from the "Profiles" tab.