Documentation 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.
svg_qr_code() takes any string and returns an SVG QR code. It skips URL construction and field validation entirely, giving you direct control over what gets encoded. Prefer this function over upiqrcode() when you have already built a UPI intent URL yourself, need to encode a non-UPI string, or want to apply custom parameter formatting before encoding.
Function signature
Parameters
The string to encode as a QR code. This is typically a UPI intent URL you have constructed yourself (e.g.
upi://pay?pa=merchant@upi&pn=Acme), but the function accepts any non-empty string.Returns
SVG markup string of the generated QR code (minimum 200×200 px). Inject this into the DOM with
innerHTML or, in React, with dangerouslySetInnerHTML.Errors
Usage example
Use
upiqrcode() if you want the library to construct the UPI URL and validate required fields for you. Use svg_qr_code() if you need direct control over the URL structure, or if you want to encode any arbitrary string as a QR code.