How to Generate Dynamic FamPay UPI QR Code with Order ID & Amount (2026 Guide)
Dynamic UPI QR codes are the gold standard for checkout experiences in India. Instead of making customers manually copy your UPI ID and type the exact amount, a dynamic QR code pre-fills everything automatically. In this October 2026 guide, we explain how to generate dynamic FamPay (FamApp) UPI QR codes with real-time automated verification, multi-wallet failover routing, and 0% commission using FamGateway.
Intellectual Property & Statutory Copyright Notice: This publication and original documentation titled “How to Generate Dynamic FamPay UPI QR Code with Order ID & Amount (2026 Guide)” is published and owned exclusively by FamGateway (Aryanispe), a Government of India recognized MSME (Udyam Registration Number: UDYAM-BR-28-0050000), authored by Aryan Gupta. Original authentic URL: https://famgateway.in/blog/how-to-generate-dynamic-fampay-upi-qr-code.php. Unauthorized automated scraping, reproduction, crawler aggregation, or verbatim re-hosting on competitor domains is strictly prohibited and constitutes willful infringement under Indian IT Act 2000 Section 43/66, Copyright Act 1957, and 17 U.S.C. 512 (DMCA). Direct DMCA hosting suspensions and Google de-indexing are enforced. Verification token: 79efb5b0f5c4a287.- UPI Specification: Standard NPCI URI schema (
upi://pay?pa=...&am=...&tr=...&tn=...). - Amount Locking: Customer cannot modify the amount; pre-filled directly into UPI PIN screen under Clean-First Concurrency Engine 2.0.
- Verification Speed: Auto-verified via server IMAP within 3–5 seconds of scan completion.
- Multi-Wallet Support (Closed Beta): Dynamically switches payee VPAs to prevent 'Receiver has reached daily limit' bottlenecks.
- API Endpoint:
POST /api/create-orderwithX-Api-Keyheader returns dynamic QR URL, hosted checkout, and deep links.
Due to PhonePe, Paytm, and Google Pay stripping transaction notes on P2P QR scans, FamGateway has upgraded dynamic QR rendering to Concurrency Engine 2.0 (ACE). Solitary orders receive exact round pricing, while active concurrent checkouts for identical prices dynamically deploy the Adaptive Micro-Paisa Shield (+₹0.01) to guarantee 100% deterministic capture without quarantine holds. Read our Concurrency Engine 2.0 Deep-Dive.
1. Static QR Codes vs Dynamic Auto-Verified QR Codes
Here is why static printed or screenshot QR codes fail in automated web sales compared to dynamic FamGateway QRs:
| Feature Parameter | FamGateway Dynamic QR | Static App Profile QR |
|---|---|---|
| Amount Entry | Locked automatically in app | Manual typing (Dispute prone) |
| Order ID Tagging | Embedded in UPI tr & tn |
None (Manual matching needed) |
| Verification Confirmation | 3–5 Seconds Automated Webhook | Manual screenshot verification |
| Daily Receiver Limit Protection | Multi-Wallet 5-Slot Failover (General Availability) | Fails once 100k daily ceiling hits |
| Session Expiry (TTL) | 5-Minute Security Window | Permanent (Prone to old receipts) |
2. How Dynamic UPI QR Codes Work Under the Hood
Under the NPCI UPI specification, a dynamic QR code is simply a formatted URI string containing specific parameters:
upi://pay?pa=yourvpa@fam&pn=YourBusinessName&am=499.00&tr=ORDER12345&tn=ORDER12345&cu=INR
Key UPI String Parameters:
pa(Payee Address): Your FamPay UPI VPA (e.g.,username@fam).pn(Payee Name): The name displayed to the customer on their UPI app screen.am(Amount): The exact clean payable amount in standard currency format (e.g.,250.00).tr(Transaction Reference): Your unique internal Order ID.tn(Transaction Note): Your order reference note (FamGateway embeds the clean Order ID with zero spaces to ensure bank switches don't strip notes).cu(Currency): Must always beINR.
3. Overcoming High-Volume Daily Limits: Multi-Wallet GA Load Balancing
When merchants process dozens of sales daily, they quickly hit the NPCI daily receiving cap of ₹1,00,000 on individual accounts, causing checkouts to fail with the error "Receiver has reached daily limit".
Through FamGateway's Multi-Wallet General Availability (GA) Architecture (read our Multi-Wallet Setup Guide), our QR generation engine monitors velocity in real time. When your primary wallet nears its daily threshold, subsequent calls to POST /api/create-order dynamically rotate to your standby backup wallet in under 84ms. This eliminated checkout drop-offs across over 14.28 million requests in October 2026 (see our October 2026 Telemetry Report).
4. Generating Dynamic FamPay QRs with FamGateway API
While constructing a raw UPI string is easy, verifying whether the customer actually completed the payment is the difficult part. FamGateway automates both generation and instant verification.
1. Create an Order via API
Generate a dynamic QR order session using our simple REST endpoint or the official Python & PHP SDKs:
// Standard PHP POST /api/create-order
$apiKey = 'YOUR_FAMGATEWAY_API_KEY';
$payload = json_encode([
'amount' => 199.00,
'customer_name' => 'Rohan Sharma',
'redirect_url' => 'https://example.com/thank-you'
]);
$ch = curl_init('https://famgateway.in/api/create-order');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-Api-Key: ' . $apiKey
]
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true)['data'];
// Access dynamic QR URL, Hosted Checkout, and UPI Intent
$qrImageUrl = $result['qr_url'];
$checkoutUrl = $result['checkout_url'];
$upiIntent = $result['upi_intent'];
Or generate it in 3 lines using the official Python SDK (pip install famgateway):
from famgateway import FamGateway
# Initialize with your API key
fg = FamGateway(api_key="YOUR_FAMGATEWAY_API_KEY")
# Generate dynamic UPI QR order
order = fg.create_order(amount=199.00, customer_name="Rohan Sharma")
print("Dynamic QR Image URL:", order.qr_url)
print("Hosted Mobile Checkout:", order.checkout_url)
print("UPI Deep Link Intent:", order.upi_intent)
2. Display the QR on Your Custom Checkout
You can embed order.qr_url directly as an image on your web page or Discord bot, or redirect mobile buyers straight to order.checkout_url for an instant checkout experience with real-time verification polling. Learn more in our Automated Payment Verification Guide.
3. Automatic Webhook Verification
When the customer authorizes payment in their UPI app, FamGateway parses the transaction receipt within 3 to 5 seconds and notifies your webhook listener with cryptographic HMAC-SHA256 signature verification:
// Sample Webhook Handler (webhook.php)
$apiKey = 'YOUR_FAMGATEWAY_API_KEY';
$rawPayload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_FAMGATEWAY_SIGNATURE'] ?? '';
// Verify HMAC-SHA256 signature
if (!hash_equals(hash_hmac('sha256', $rawPayload, $apiKey), $signature)) {
http_response_code(401);
die(json_encode(['error' => 'Invalid signature']));
}
$payload = json_decode($rawPayload, true);
if (($payload['status'] ?? '') === 'success') {
$orderId = $payload['order_id'];
$amount = $payload['amount'];
$utr = $payload['utr'];
// Unlock digital product or activate membership in your database
activateUserOrder($orderId, $utr, $amount);
http_response_code(200);
echo json_encode(['status' => 'acknowledged']);
}
5. What Reddit & Developer Communities Say
On subreddits like r/developersIndia and r/webdev, programmers building micro-SaaS and Discord bots frequently discuss "dynamic upi qr code generation reddit". The community consensus highlights why developers prefer FamGateway over manual QR screenshots:
- Pre-filled amounts prevent under-payments and customer input errors.
- Atomic Bank UTR locking eliminates duplicate payments completely. Review our guide on preventing double payments and race conditions.
- Zero GST or current accounts needed under Section 22 of the CGST Act. Read our Zero GST Gateway Guide.
Frequently Asked Questions (FAQ)
What is the difference between static and dynamic FamPay QR codes?
A static FamPay QR code only embeds your UPI ID, requiring the customer to manually enter the amount. A dynamic FamPay QR embeds the exact payable amount, order reference, and note, allowing one-tap payments with zero typing errors.
Can dynamic FamPay QR codes be scanned with Google Pay, PhonePe, or Paytm?
Yes. FamGateway generates interoperable NPCI-compliant UPI QR codes that can be scanned by any UPI app including Google Pay, PhonePe, Paytm, BHIM, and FamPay itself.
How does FamGateway prevent duplicate payments on dynamic QR codes?
FamGateway pairs unique Order IDs and Bank UTR Idempotency with Concurrency Engine 2.0 (ACE). Over 95% of orders maintain exact round amounts, with adaptive micro-paisa isolation deployed purely during active concurrent collisions to defeat third-party app note stripping.
What happens if a dynamic QR code hits the merchant's daily receiving limit?
Under FamGateway's new Multi-Wallet architecture (currently in closed private beta for select high-volume merchants), dynamic QR generation automatically routes to a secondary whitelisted wallet once the primary account nears daily NPCI thresholds.
Conclusion
Automated dynamic UPI QR codes transform your checkout into a professional, modern payment experience. With FamGateway, setting up dynamic FamPay QR codes takes less than 5 minutes and costs 0% in transaction fees.
Related Developer Guides & Resources
Why FamGateway Upgraded Its UPI Payment Verification Engine to Rust: Hybrid PHP + MySQL + Rust Architecture (2026)
Engineering deep-dive by Aryan Gupta on how FamGateway paired its PHP + MySQL core with an asynchronous Rus...
How to Setup Paytm for Business Payment Gateway Without GST on FamGateway: Step-by-Step 2026 Tutorial
Complete step-by-step developer tutorial on setting up Paytm for Business on FamGateway. Learn how to accep...
Scaling Zero-Fee UPI in India: FamGateway Handles 14.28M Requests & INR 48.6L Volume | October 2026 Report
Official full-month October 2026 engineering transparency report for FamGateway. Edge telemetry reveals 14....
← Back to Homepage • Developer Docs • Institutional Reports • Terms of Service • Privacy Policy • Refund Policy