Skip to main content

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

  1. Type: Type of PayNow account. It can be either "Mobile" or "UEN".
  2. Identifier: Mobile number for personal account or UEN number for business account.
  3. Name: Name of the account holder or business.
  4. Amount: Amount to be paid.
  5. Description: Description of the payment.
  6. Expiry Date (Optional): Expiry date of the QR code. Default is None. Format is "YYYYMMDD".
  7. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paynowqr-0.3.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PayNowQR-0.3-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

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

Hashes for paynowqr-0.3.tar.gz
Algorithm Hash digest
SHA256 55449e5b464323cba1dcac66fe26356d60ddc6f507527f326e57ef205034c25b
MD5 7ef3a49adbe48cd2e17ecf3d7088ad79
BLAKE2b-256 6c7ab3a7544025fb5f9745a3c508d0216b0f7ff8de67b6043073908d62490637

See more details on using hashes here.

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

Hashes for PayNowQR-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9485d8a8d6fd6d92f430e2ff94669af996f0b96eed334a07284e2590198e6804
MD5 6051302305c63ca8db69a1a7036205ca
BLAKE2b-256 7ad1e725799d4c116424514529f477b48796916cc2cf307c59991414405882e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page