A simple python library to generate PayNow QR codes in Singapore
Project description
PayNow QR Library
This library is a simple library to generate PayNow QR code for Singapore banks. It is written in Python and can be used to generate PayNow QR code for both personal and business accounts.
Installation
pip install paynowqr
Usage
from paynowqr import PayNowQR
# Personal Account (mobile number)
qr = PayNowQR("Mobile", "+6591234567", "John Lim", 2.00, "Bubble Tea")
qr.save("paynow_personal.png")
# Business Account (UEN number)
qr = PayNowQR("UEN", "S12345678W", "Running Bananas", 1000.00, "Machine Maintainance")
qr.save("paynow_business.png")
Parameters
- Type: Type of PayNow account. It can be either "Mobile" or "UEN".
- Identifier: Mobile number for personal account or UEN number for business account.
- Name: Name of the account holder or business.
- Amount: Amount to be paid.
- Description: Description of the payment.
- Expiry Date (Optional): Expiry date of the QR code. Default is None. Format is "YYYYMMDD".
- QR Code Colour (Optional): Colour of the QR code. Default is "purple".
Output
The above code will generate two QR codes, one for personal account and one for business account. The QR code will be saved as paynow_personal.png and paynow_business.png respectively.
License
This library is released under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file paynowqr-0.3.tar.gz.
File metadata
- Download URL: paynowqr-0.3.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55449e5b464323cba1dcac66fe26356d60ddc6f507527f326e57ef205034c25b
|
|
| MD5 |
7ef3a49adbe48cd2e17ecf3d7088ad79
|
|
| BLAKE2b-256 |
6c7ab3a7544025fb5f9745a3c508d0216b0f7ff8de67b6043073908d62490637
|
File details
Details for the file PayNowQR-0.3-py3-none-any.whl.
File metadata
- Download URL: PayNowQR-0.3-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9485d8a8d6fd6d92f430e2ff94669af996f0b96eed334a07284e2590198e6804
|
|
| MD5 |
6051302305c63ca8db69a1a7036205ca
|
|
| BLAKE2b-256 |
7ad1e725799d4c116424514529f477b48796916cc2cf307c59991414405882e6
|