PayMeQR is a simple JavaScript tool to generate UPI QR codes โ ideal for freelancers, creators, or anyone accepting personal payments or donations online. Just place the QR on your site โ no server or payment tracking needed.
Note: This only generates a QR. You must verify payments manually.
๐ฏ Want to try it out instantly? Head over to the live QR generator and create your UPI QR code in seconds.
CDN (Browser):
<script src="https://cdn.jsdelivr.net/npm/paymeqr@latest/dist/paymeqr.min.js"></script>
Node.js:
npm install paymeqr
Browser usage:
<script>
const qr = new PayMeQR({ upiId: "you@upi" });
qr.setAmount(50).setNote("Thanks!").createQrCode().then(img => {
document.body.appendChild(img);
});
</script>
Node.js basic usage (Base64 image):
const PayMeQR = require("paymeqr");
(async () => {
const qr = new PayMeQR({ upiId: "you@upi" });
qr.setPayeeName("Dev").setAmount(100).setNote("Test payment");
const base64 = await qr.createQrCode();
console.log(base64);
})();
Node.js (Generate Buffer + Save to File):
const fs = require("fs");
const PayMeQR = require("paymeqr");
(async () => {
const qr = new PayMeQR({ upiId: "you@upi" });
qr.setAmount(99.99).setNote("Support Me");
const buffer = await qr.getQrCodeBuffer(); // โฌ
Buffer output
fs.writeFileSync("upi-qr.png", buffer);
})();
Node.js (Use in Express API):
const express = require("express");
const PayMeQR = require("paymeqr");
const app = express();
app.get("/qr", async (req, res) => {
const qr = new PayMeQR({ upiId: "you@upi" });
const buffer = await qr.getQrCodeBuffer();
res.set("Content-Type", "image/png");
res.send(buffer);
});
app.listen(3000, () => console.log("QR API running on port 3000"));
Initializes a new QR code generator instance. upiId
is required in the options
object.
Throws an error if upiId
is missing or invalid.
Set recipient name (optional).
Set amount (must be > 0).
Attach a note (optional).
Generates the QR image:
<img>
element
Node.js only โ returns a Buffer
object of the QR PNG image.
Ideal for file saving or API responses (e.g., Express).
If this package helped you, consider sending a small donation as a thank you.
UPI ID: pareekaman1@ybl
Scan this QR with any UPI app like GPay, PhonePe, Paytm, etc.