chriswest101/paynow

Easily generate a SG PayNow compliant QR code
16,113 9
Install
composer require chriswest101/paynow
Latest Version:v2.0
PHP:^7.1|^8.0
License:MIT
Last Updated:Aug 21, 2026
Links: GitHub  ·  Packagist
Maintainer: chriswest101

SG PayNow QR Code

Singapore Paynow QR Code generator for PHP.

Usage Instructions

1. Install via composer

$ composer require chriswest101/paynow

2. Publish the assets

$ php artisan vendor:publish --provider="Chriswest101\Paynow\PaynowServiceProvider" --tag=public --force

3. Add the using

use Chriswest101\Paynow\Facades\Paynow;

4. Create PayNow QR Code

As encoded base64image

Dynamic

Paynow::generateDynamic(
    100.00,
    false,
    "O123456",
    (new DateTime())->modify("+ 1 hour"),
    "Clothing Company Pte Ltd",
    "SG",
    "Singapore",
    "2020111104G",
    null,
    true
);

As paynow string

Paynow::generateDynamic(
    100.00,
    false,
    "O123456",
    (new DateTime())->modify("+ 1 hour"),
    "Clothing Company Pte Ltd",
    "SG",
    "Singapore",
    "2020111104G",
    null,
    false
);

Static

Paynow::generateStatic(
    "Clothing Company Pte Ltd",
    "SG",
    "Singapore",
    "2020111104G",
    null,
    true
);

As paynow string

Paynow::generateStatic(
    "Clothing Company Pte Ltd",
    "SG",
    "Singapore",
    "2020111104G",
    null,
    false
);

Potential usecases:

Dynamically generating payment QR codes on e-commerce or donation pages that allow tracking of payments via reference codes.

Can be used in conjunction with Bank APIs to detect resolved payments.

To do

Incorporate QR generation into the PaynowQR class with logo / branding options

Credits

Original code referenced from: https://github.com/ThunderQuoteTeam/PaynowQR

See also:

Developed by Chris West (https://www.christophermwest.co.uk/)

Was looking around for various ways to implement dynamic SGQR codes for payment over PHP, however couldn't find any that worked.

Feel free to report any issues and feature requests!

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

637,827,751 9,703
laravel/framework

The Laravel Framework.

589,172,971 34,950
laravel/tinker

Powerful REPL for the Laravel framework.

498,216,183 7,442
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

413,412,504 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

394,964,158 4,660

Version History

Version Released PHP Laravel License
v2.0 ^7.1|^8.0 ^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v1.0.3 ^7.1|^8.0 ^7.0|^8.0|^9.0|^10.0|^11.0 MIT
v1.0.2 ^7.1|^8.0 ^7.0|^8.0|^9.0|^10.0 MIT
v1.0.1 ^7.1 ^7.0 MIT
v1.0.0 ^7.1 ^7.0 MIT