QR Ph

How QR Ph works on PayMongo — the two variants (dynamic API-driven and static in-store), when to use each, and how payments are confirmed.

Overview

QR Ph is the Philippine national QR code standard supervised by the Bangko Sentral ng Pilipinas (BSP). A single QR Ph code lets customers pay from any participating bank or e-wallet app — they scan it using their preferred banking or payment app and the transaction settles via InstaPay.

PayMongo supports two variants of QR Ph:

VariantUse caseHow the amount is set
Dynamic QR (online)Online checkout, payment linksAmount encoded in the QR code
Static QR (in-store)Physical counter, market stallCustomer enters the amount

When to use each variant

Use dynamic QR when you're building an online checkout and you know the exact amount before generating the code. Each code is single-use and expires after 30 minutes by default. See QR Ph API.

Use static QR when you need a reusable code at a physical location. Customers scan the same code repeatedly and enter the amount they owe. See In-Store QR Ph.


How QR Ph attaches to a Payment Intent

Dynamic QR Ph follows the standard Payment Intent workflow:

  1. Create a Payment Intent with "qrph" in payment_method_allowed
  2. Create a Payment Method with type: "qrph"
  3. Attach the Payment Method — the response contains next_action.code.image_url, a Base64-encoded QR code image
  4. Display the QR code to the customer
  5. The customer scans it and completes payment in their banking app
  6. PayMongo sends payment.paid when the payment is confirmed

Payment confirmation

Confirm QR Ph payments via webhook events:

EventMeaning
payment.paidCustomer successfully paid via QR Ph
payment.failedPayment attempt failed
qrph.expiredQR code was not scanned within 30 minutes

You can also poll the Payment Intent status, but webhooks are the recommended approach for production.