upi-qr

The package will generate NPCI's UPI QR code along with UPI intent link, using this any transaction is possible.

Usage no npm install needed!

<script type="module">
  import upiQr from 'https://cdn.skypack.dev/upi-qr';
</script>

README

The package will generate NPCI's UPI QR code (BASE64) along with UPI intent link, using this any transaction is possible. This package will work on client and server.

const QR =  require('upi-qr');


UPI
.generateQR({ vpa: 'name@bank', pa: "John Doe" })
.then((upi) => {
    console.log(upi.qr);        // Base64 URL
    console.log(upi.intent);    // eg: upi://pay?pa=john@bank&pn=JOHN DOE
})
.catch(err => {
    console.log(err);
});

Internally using qrcode for QR Generation.