QR Ph

QR Ph

QR Ph is the Philippines' national QR standard: any bank or e-wallet app can scan it to pay. A dynamic QR code encodes a fixed amount and expires, so it suits one online order. Its QR string is the payment payload a banking app reads from the image; there is no hosted payment URL. A static in-store code is permanent, and the customer types the amount after scanning. Scanning and paying from the other side moves money, so only the Operator runs QR execution.

Read the QR Ph docs

Every demonstration here makes a real PayMongo API call in test mode. Nothing is simulated, and no real money moves.

Generate dynamic QR code

Generate a single-use QR code for a fixed amount. Scan the image in the summary with a banking app to see the amount it asks for.

Test mode: A test-mode QR code cannot be paid from a real banking app. Paying it means executing its QR string from a PayMongo account, which moves money and is left to the Operator.

PHP
use Luigel\Paymongo\Facades\Paymongo;

$qrph = Paymongo::qrph()->generate(
    attributes: [
        'nation' => 'ph',
        'mode' => 'p2p',
        'type' => 'dynamic',
        'transaction_currency' => 'PHP',
        'transaction_amount' => 10000,
        'expiry_seconds' => 1800,
        'qr_image' => true,
    ],
);

Retrieve QR code

Fetch a QR code with its QR string and image rebuilt, to see whether it is still active.

PHP
use Luigel\Paymongo\Facades\Paymongo;

$qrph = Paymongo::qrph()->retrieve(
    id: '{qr_code id}',
    qrString: true,
    qrImage: true,
);

Expire QR code

Expire a QR code before its time runs out, so it can no longer be paid. An expired code never becomes active again.

PHP
use Luigel\Paymongo\Facades\Paymongo;

$qrph = Paymongo::qrph()->expire(
    id: '{qr_code id}',
);

Generate static in-store QR code

Generate a permanent QR code for a counter or stall. The customer enters the amount after scanning, and the mobile number gets an SMS for each payment.

PHP
use Luigel\Paymongo\Facades\Paymongo;

$qrph = Paymongo::qrph()->generateStatic(
    attributes: [
        'kind' => 'instore',
        'mobile_number' => '••••',
        'notes' => 'Laravel PayMongo Playground demo',
    ],
);