Guide #24 Dynamic UPI QR & API Automation (October 2026)

How to Generate Dynamic FamPay UPI QR Code with Order ID & Amount (2026 Guide)

By Aryan Gupta • October 14, 2026 • 5 min read

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.

Dynamic QR Specs & Technical Summary
  • 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.
  • 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-order with X-Api-Key header returns dynamic QR URL, hosted checkout, and deep links.

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:

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.
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 Failover (Closed Beta) 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 be INR.

3. Overcoming High-Volume Daily Limits: Multi-Wallet QR Generation (Closed Beta)

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 new Multi-Wallet Architecture (Closed Beta), our QR generation engine monitors velocity. When your primary wallet nears its daily threshold, subsequent calls to POST /api/create-order dynamically inject your secondary backup wallet's VPA into the pa= parameter. This eliminates customer drop-off while maintaining unified reporting.

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:

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 embedded in the UPI transaction note with Bank UTR Idempotency locking, verifying clean exact amounts without decimal alterations.

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.

Get Your Free API Key →

Topic Cluster & Series

Related Developer Guides & Resources

View All 80+ Guides →
Multi-Wallet & FinTech

How to Fix 'Receiver Reached Daily Limit' on FamPay: High-Volume UPI Guide & Multi-Wallet Architecture (2026)

Complete technical breakdown of fixing 'Receiver has reached daily limit' on FamPay UPI without a current a...

Read Guide →
Group M&A & Valuation

FamGateway & Aryanispe Milestone Valuation Report: Consolidated Group Telemetry, Financial Audit & Net Worth (October 2026)

Official milestone and valuation transparency report for parent entity ARYANISPE (MSME UDYAM-BR-28-0050000)...

Read Guide →
SRE & Architecture

Scaling Under 1.07M Requests: Slashing CPU from 44% to 3% by Eliminating MySQL Metadata Locks & Edge Caching 818K Bot Pings

Deep SRE post-mortem on scaling FamGateway under 1.07 million daily requests on our production Linux origin...

Read Guide →

Back to Homepage →

About the Platform

FamGateway is an official unit of ARYANISPE, founded by Aryan Gupta (Aryanispe) and officially registered under the Ministry of Micro, Small and Medium Enterprises (MSME), Government of India (Reg: UDYAM-BR-28-0050000). Operating in full statutory compliance with India's Digital Personal Data Protection (DPDP) Act, 2023 and Section 43A of the Information Technology Act, 2000.

Legal & Privacy Notice: FamGateway is an independent, non-custodial developer automation utility operated by ARYANISPE (Govt. MSME UDYAM-BR-28-0050000). All credentials are encrypted via AES-256-GCM under statutory Data Fiduciary obligations with zero email storage and zero fund custody. FamGateway is not affiliated with, authorized, maintained, sponsored, or endorsed by Tri O Tech Solutions Private Limited, FamApp, or FamPay. All brand names, logos, and trademarks belong to their respective owners.