Skip to main content

Set Up Virtual Collection (Static QR)

A Funding Method is a persistent collection method attached to an account — a static QRPH code and/or virtual account number that remains active until you archive it. Use this for:

  • A merchant's permanent QR code displayed at their counter
  • A subscriber's persistent billing QR (same code every month)
  • A kiosk's embedded QR printed on the machine

Unlike Payment Intents (single-use, exact amount), Funding Methods accept any amount from any payer at any time.

Prerequisites

Step 1: Create a Funding Method

Two method types are available:

method_typeWhat it createsmethod_provider
qrph_p2m_referenceStatic QRPH QR codeph_netbank
bank_account_numberVirtual bank account numberph_netbank

The examples below use qrph_p2m_reference. To create a virtual account number instead, set method_type: "bank_account_number" — the response will contain account details in payment_instrument.method_details instead of QR data.

curl -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
-X POST "https://api.partners.nextpay.world/v2/funding-methods" \
-H "Content-Type: application/json" \
-d '{
"account_id": "YOUR_ACCOUNT_UUID",
"external_id": "merchant-store-qr",
"payment_instrument_options": {
"method_type": "qrph_p2m_reference",
"method_provider": "ph_netbank"
}
}'

Response

{
"id": "123e4567-e89b-12d3-a456-426614174000",
"account_id": "123e4567-e89b-12d3-a456-426614174001",
"external_id": "merchant-store-qr",
"status": "active",
"created_at": "2025-11-15T10:00:00Z",
"payment_instrument": {
"id": "123e4567-e89b-12d3-a456-426614174002",
"method_type": "qrph_p2m_reference",
"method_provider": "ph_netbank",
"method_details": {
"merchant_name": "Your Merchant Name",
"reference_label": "...",
"routing_account": "...",
"resolution": 480
},
"status": "active",
"persistence_mode": "persistent",
"usage_mode": "multiple"
}
}

Key fields:

  • payment_instrument.method_details — contains the QRPH data for rendering a static QR code client-side; use a QR code library (e.g. qrcode) to display it.

Step 2: Display or print the QR

For a merchant counter display:

Use a QR code library to render the QRPH data from funding_method.payment_instrument.method_details. For a kiosk or printed material, generate the QR image server-side using a QRPH-compatible library and embed it in your design.

The QR is standard QRPH format compatible with all Philippine bank and e-wallet apps.

Step 3: Handle incoming payment webhooks

When someone pays via this Funding Method, NextAPI sends a v2.payment_instrument.payment_received or v2.payment_instrument.payment_settled event:

app.post('/webhooks/nextapi', express.raw({ type: 'application/json' }), (req, res) => {
const signature = req.headers['x-nextpay-signature'];

if (!verifySignature(req.body, signature, process.env.WEBHOOK_SECRET)) {
return res.status(401).send('Unauthorized');
}

const event = JSON.parse(req.body);

if (event.event === 'v2.payment_instrument.payment_received' || event.event === 'v2.payment_instrument.payment_settled') {
const { funding_method_id, account_id, amount, payer_reference } = event.payload;

// For static QRs, you may need to match by amount or payer_reference
// to know which subscriber or transaction this corresponds to
await handleIncomingPayment({
fundingMethodId: funding_method_id,
accountId: account_id,
amount,
payerReference: payer_reference,
});
}

res.status(200).send('OK');
});
Webhook events: received vs settled

v2.payment_instrument.payment_received fires when the payment is received (uncleared). v2.payment_instrument.payment_settled fires when funds are cleared and credited to the account. For financial actions (crediting users, triggering orders), listen to payment_settled.

Matching payments to invoices

Unlike Payment Intents (which carry your external_id), static Funding Methods accept any payment. Use the amount and payer_reference fields in the webhook payload to match incoming payments to specific invoices or subscribers in your system.

Step 4: List and manage Funding Methods

List all Funding Methods for an account:

curl -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
"https://api.partners.nextpay.world/v2/funding-methods"

Get a specific Funding Method by external ID:

curl -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
"https://api.partners.nextpay.world/v2/funding-methods/external/merchant-store-qr"

Archive a Funding Method (stops accepting new payments):

curl -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
-X PATCH "https://api.partners.nextpay.world/v2/funding-methods/YOUR_FUNDING_METHOD_UUID/archive"

Funding Method vs Payment Intent: when to use which

Funding Method (static)Payment Intent (dynamic)
QR typeStatic — same code alwaysDynamic — new code per transaction
AmountAny amount from payerExact amount specified by you
ReusePermanent (until archived)Single-use
Use caseCounter QR, kiosk, recurring billingCheckout, invoice, one-time collection
Payment matchingMatch by amount or payer referenceMatched via external_id

→ See Collections Lifecycle for the full state machine comparison.