PHPackages                             keenthekeen/php-promptpay-qr - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. keenthekeen/php-promptpay-qr

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

keenthekeen/php-promptpay-qr
============================

PHP Library to generate QR Code payload for PromptPay

v1.1.0(2y ago)417.4k3MITPHPPHP &gt;=7.4

Since Oct 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/keenthekeen/php-promptpay-qr)[ Packagist](https://packagist.org/packages/keenthekeen/php-promptpay-qr)[ RSS](/packages/keenthekeen-php-promptpay-qr/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

php-promptpay-qr
================

[](#php-promptpay-qr)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cb37e9640cc4821b1e6d26bbb56819401247e8a9631e94d511ed0856dcf8a8e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b65656e7468656b65656e2f7068702d70726f6d70747061792d71722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/keenthekeen/php-promptpay-qr)[![Packagist PHP Version](https://camo.githubusercontent.com/0763d91a38ba6db6f55cf8f4dbfd4595afc3bf5e4d9fdc8e6172c7b45f5adaa3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6b65656e7468656b65656e2f7068702d70726f6d70747061792d71722f7068703f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/0763d91a38ba6db6f55cf8f4dbfd4595afc3bf5e4d9fdc8e6172c7b45f5adaa3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6b65656e7468656b65656e2f7068702d70726f6d70747061792d71722f7068703f7374796c653d666c61742d737175617265)[![GitHub Tests Action Status](https://camo.githubusercontent.com/495fb01c461805f82dd0268d32e73a8bdc658710ca550d0aee2b98aa9451c0a4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6b65656e7468656b65656e2f7068702d70726f6d70747061792d71722f72756e2d74657374733f6c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/keenthekeen/php-promptpay-qr/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/1ba266d3c4f112d3690278ca08d56a73e6df3e15980db391b81cf729cafcc596/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6b65656e7468656b65656e2f7068702d70726f6d70747061792d71722f466978253230504850253230636f64652532307374796c652532306973737565733f6c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/keenthekeen/php-promptpay-qr/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amaster)[![License: MIT](https://camo.githubusercontent.com/458425f8985b0b0c8a736cffe75e05a098e3d77906acddbcad2bfc54492a4e02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e7376673f7374796c653d666c61742d737175617265)](https://opensource.org/licenses/MIT)

PHP Library to generate QR Code payload for PromptPay, a Thai QR Code Standard for Payment Transactions, using fluent interface

inspired by [dtinth/promptpay-qr](https://github.com/dtinth/promptpay-qr) and [pheerathach/promptpay](https://github.com/pheerathach/promptpay)

adapted from [kittinan/php-promptpay-qr](https://github.com/kittinan/php-promptpay-qr)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require keenthekeen/php-promptpay-qr
```

Usage
-----

[](#usage)

```
use PromptPayQR\Builder;

// Generate PromptPay Payload
Builder::staticMerchantPresentedQR('0899999999')->build();
// 00020101021129370016A000000677010111011300668999999995802TH53037646304FE29

// Generate PromptPay Payload With Amount
Builder::staticMerchantPresentedQR('089-999-9999')->setAmount(420)->build();
// 00020101021229370016A000000677010111011300668999999995802TH53037645406420.006304CF9E

// Generate PromptPay Payload With Amount (one-time use)
Builder::dynamicQR()->creditTransfer()->phoneNumber('083-888-3333')->setAmount(420)->build();

// Generate PromptPay Bill Payment (Tag 30) Payload
Builder::dynamicQR()->billPayment()
  ->setBillerIdentifier('099400015804189', 'Ref1', 'Ref2')
  ->setAmount(1999.99)->build();

// Generate QR Code SVG string
$svgString = Builder::staticMerchantPresentedQR('1-2345-67890-12-3')->toSvgString();
// Laravel example: respond with header Content-Type: image/svg+xml
return response($svgString, 200)->header('Content-Type', 'image/svg+xml')->header('Cache-Control', 'no-store');

// Generate QR Code SVG file
Builder::staticMerchantPresentedQR('1-2345-67890-12-3')->toSvgFile($path);
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~397 days

Total

2

Last Release

907d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ad1fbec4cef6bc1c35c15eec7704b0e979b66f7eac97fee4f23a6ef276173ef?d=identicon)[keenthekeen](/maintainers/keenthekeen)

---

Top Contributors

[![kittinan](https://avatars.githubusercontent.com/u/144775?v=4)](https://github.com/kittinan "kittinan (32 commits)")[![keenthekeen](https://avatars.githubusercontent.com/u/5007387?v=4)](https://github.com/keenthekeen "keenthekeen (15 commits)")[![hackhq](https://avatars.githubusercontent.com/u/6234626?v=4)](https://github.com/hackhq "hackhq (3 commits)")[![k1337](https://avatars.githubusercontent.com/u/32435327?v=4)](https://github.com/k1337 "k1337 (1 commits)")[![leekung](https://avatars.githubusercontent.com/u/3615383?v=4)](https://github.com/leekung "leekung (1 commits)")

---

Tags

promptpaypromptpay-qrPromptpay

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/keenthekeen-php-promptpay-qr/health.svg)

```
[![Health](https://phpackages.com/badges/keenthekeen-php-promptpay-qr/health.svg)](https://phpackages.com/packages/keenthekeen-php-promptpay-qr)
```

###  Alternatives

[endroid/qr-code

Endroid QR Code

4.8k67.6M348](/packages/endroid-qr-code)[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[simplesoftwareio/simple-qrcode

Simple QrCode is a QR code generator made for Laravel.

2.9k27.6M92](/packages/simplesoftwareio-simple-qrcode)[greenter/greenter

Facturacion Electrónica SUNAT en Perú

31530.2k1](/packages/greenter-greenter)[kittinan/php-promptpay-qr

PHP Library to generate QR Code payload for PromptPay

4950.4k](/packages/kittinan-php-promptpay-qr)[revolution/self-ordering

Self Ordering System

2112.7k](/packages/revolution-self-ordering)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
