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.
pip install paynowqr
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")
- 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".
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.
This library is released under the MIT License.