spl-qr
spl-qr is a simple Python library for generating UPI payment QR codes. It helps businesses and individuals create scannable QR codes for easy digital payments.
Features
✅ Generate UPI QR codes with a name and UPI ID
✅ Optionally include a transaction amount
✅ Support for transaction numbers (optional)
✅ Easy-to-use and lightweight
Installation
Install spl-qr via pip:
pip install spl-qr
Usage
Basic QR Code Generation
from spl_qr import SPLQR
qr = SPLQR(name="Your Name", upi_id="yourupi@upi")
qr.generate(amount=100)
📌 This will generate a QR code for ₹100 linked to "yourupi@upi" and save it as an image file.
With an Optional Transaction Number
from spl_qr import SPLQR
qr = SPLQR(name="Your Name", upi_id="yourupi@upi")
qr.generate(amount=100, transaction_no="TXN123456789")
📌 Here, "TXN123456789" is an optional transaction reference.
Optional Parameters
name | str | ✅ Yes | Name of the recipient |
upi_id | str | ✅ Yes | UPI ID of the recipient |
amount | float/int | ✅ Yes | Payment amount |
transaction_no | str | ❌ No | (Optional) A unique transaction reference |
License
This project is licensed under the MIT License.