The upi://pay Deep Link and Encoding
AnyTool UPI QR Code Generator assembles the standard UPI payment deep link defined by the NPCI UPI Linking Specification and encodes it into the QR, so scanning the code with any UPI app opens a pre-filled payment. The link is upi://pay? followed by query parameters: pa (the payee address or virtual payment address, e.g. name@bank), pn (the payee name), an optional am (amount, formatted to two decimals such as 250.00), cu (currency, always INR), and an optional tn (transaction note); a short tr (transaction reference) is added automatically when an amount is set so repeat scans of a fixed-amount code are distinguishable. Every value is percent-encoded with URLSearchParams and spaces are normalised to %20, which keeps the &/= separators and any special characters in the payee name or note safe. The VPA is validated against a handle@provider pattern before a QR is produced, but the tool builds the link purely as text — it never contacts a bank or NPCI.
- Format: upi://pay?pa=<VPA>&pn=<name>&am=<amount>&cu=INR&tn=<note>
- pa and pn are required; am and tn are optional; cu is always INR
- Amount normalised to two decimals; a tr reference is added when amount is set
- Every value percent-encoded; spaces normalised to %20
- VPA validated as handle@provider before the QR is generated
