TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Pratyay360/upiqrcode/llms.txt
Use this file to discover all available pages before exploring further.
upiqrcode package ships TypeScript types generated directly from the Rust/WebAssembly source via wasm_bindgen. You can import the interfaces alongside the functions to get full type safety in TypeScript projects. Every type described on this page matches the definitions in the compiled .d.ts output exactly.
Import syntax
UpiqrcodeParams
UpiqrcodeParams describes the object you pass to upiqrcode(). All fields are optional at the type level, but payeeVPA and payeeName are validated at runtime and will cause the Promise to reject if they are missing or too short.
UPI Virtual Payment Address (e.g.
merchant@upi). Required at runtime. Minimum 5 characters.Display name of the payee shown in payment apps. Required at runtime. Minimum 4 characters.
Transaction amount as a decimal string (e.g.
"100.00"). If omitted, the payer selects the amount.Minimum acceptable payment amount. Maps to the
mam UPI parameter.ISO 4217 currency code (e.g.
"INR"). If omitted, the cu parameter is excluded from the intent URL; most UPI apps treat the currency as INR when it is absent.Unique transaction identifier generated by your system. Maps to the
tid UPI parameter.Merchant-side reference number for the transaction. Maps to the
tr UPI parameter.Human-readable note or description visible to the payer. Maps to the
tn UPI parameter.Merchant category code assigned to your business. Maps to the
me UPI parameter.Reference URL associated with the transaction. Maps to the
url UPI parameter.UpiqrcodeResult
UpiqrcodeResult describes the object resolved by upiqrcode() on success.
SVG markup string of the generated QR code (minimum 200×200 px). Inject this into the DOM using
innerHTML or, in React, with dangerouslySetInnerHTML={{ __html: result.qr }}.The full UPI intent URL (e.g.
upi://pay?pa=merchant@upi&pn=Acme+Store&am=100.00&cu=INR) that was encoded in the QR code. Use this as the href of a deep-link button so mobile users can open their payment app directly.init()
init() loads the WebAssembly binary that powers the library. You must call and await it once before invoking upiqrcode() or svg_qr_code(). Calling it more than once per page load is safe but unnecessary.
Call
init() at application startup or at the top of any async function that uses the library, before the first call to upiqrcode() or svg_qr_code(). You only need to call it once per page load.