Skip to main content

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.

upiqrcode is a Rust library compiled to WebAssembly that generates NPCI-compliant UPI payment QR codes as inline SVG strings, along with UPI intent URLs for deep-linking into payment apps like Google Pay, PhonePe, and Paytm. Install it from npm and use it in React, Vue, Svelte, or vanilla JavaScript — no backend required.

Introduction

Learn what upiqrcode is, how it works, and what it can do for your payment flows.

Quickstart

Install upiqrcode and generate your first UPI QR code in under five minutes.

React guide

Integrate upiqrcode into a React application with a complete working component.

API reference

Explore every parameter, return type, and function exported by upiqrcode.

What you can build

Payment QR codes

Render scannable UPI QR codes that any BHIM-compatible app can read to initiate a payment.

UPI deep links

Generate upi://pay? intent URLs to open payment apps directly from a button tap on mobile.

Merchant checkout

Add a zero-dependency payment option to e-commerce flows — no payment gateway account needed.

Donation pages

Let supporters pay via UPI with a pre-filled amount and note on any static or server-rendered page.

How it works

1

Install from npm

Add the upiqrcode package to your project with your preferred package manager.
2

Initialize the WebAssembly module

Call the default init() export once before using any other function. This loads the compiled .wasm binary.
3

Call upiqrcode()

Pass a payeeVPA and payeeName (plus any optional fields) to receive an SVG string and a UPI intent URL.
4

Render the result

Inject the SVG into your page for the QR code, and use the intent URL as an href for a “Pay now” button on mobile.
upiqrcode runs entirely in the browser. No server, no API key, and no third-party payment gateway account required.

Build docs developers (and LLMs) love