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
- A merchant and account already created (Wallet Structure)
- Sandbox credentials from /sandbox
Step 1: Create a Funding Method
- cURL
- Node.js
- Python
curl -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
-X POST "https://api.partners.nextpay.world/v2/accounts/acct_01HXYZ/funding-methods" \
-H "Content-Type: application/json" \
-d '{
"type": "qrph",
"external_id": "merchant-store-qr"
}'
const response = await fetch(
'https://api.partners.nextpay.world/v2/accounts/acct_01HXYZ/funding-methods',
{
method: 'POST',
headers: {
'Authorization': 'Basic ' + Buffer.from('YOUR_CLIENT_ID:YOUR_CLIENT_SECRET').toString('base64'),
'Content-Type': 'application/json',
},
body: JSON.stringify({
type: 'qrph',
external_id: 'merchant-store-qr',
}),
}
);
const fundingMethod = await response.json();
import requests
import base64
credentials = base64.b64encode(b'YOUR_CLIENT_ID:YOUR_CLIENT_SECRET').decode()
response = requests.post(
'https://api.partners.nextpay.world/v2/accounts/acct_01HXYZ/funding-methods',
headers={
'Authorization': f'Basic {credentials}',
'Content-Type': 'application/json',
},
json={
'type': 'qrph',
'external_id': 'merchant-store-qr',
}
)
funding_method = response.json()
Response
{
"id": "fm_01HXYZ",
"account_id": "acct_01HXYZ",
"type": "qrph",
"status": "active",
"external_id": "merchant-store-qr",
"qr_code": "00020101021226...",
"qr_image_url": "https://api.partners.nextpay.world/v2/accounts/acct_01HXYZ/funding-methods/fm_01HXYZ/qr",
"bank_account": {
"bank_name": "NextPay Partner Bank",
"account_number": "8823456789",
"account_name": "NextPay OPC"
},
"created_at": "2025-11-15T10:00:00Z"
}
Key fields:
qr_code— raw QRPH payload stringqr_image_url— pre-rendered QR imagebank_account— the virtual account number for bank transfer deposits (issued by one of NextAPI's partner banks)
Step 2: Display or print the QR
For a merchant counter display:
<img src="https://api.partners.nextpay.world/v2/accounts/acct_01HXYZ/funding-methods/fm_01HXYZ/qr"
alt="Scan to pay"
width="300" height="300" />
<p>Or transfer to partner bank account: 8823456789</p>
For a kiosk or printed material, download the QR image 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 funding_method.paid 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.type === 'funding_method.paid') {
const { funding_method_id, account_id, amount, payer_reference } = event.data;
// 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');
});
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/accounts/acct_01HXYZ/funding-methods"
Get a specific Funding Method by external ID:
curl -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
"https://api.partners.nextpay.world/v2/accounts/acct_01HXYZ/funding-methods/external/merchant-store-qr"
Archive a Funding Method (stops accepting new payments):
curl -u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
-X POST "https://api.partners.nextpay.world/v2/accounts/acct_01HXYZ/funding-methods/fm_01HXYZ/archive"
Funding Method vs Payment Intent: when to use which
| Funding Method (static) | Payment Intent (dynamic) | |
|---|---|---|
| QR type | Static — same code always | Dynamic — new code per transaction |
| Amount | Any amount from payer | Exact amount specified by you |
| Reuse | Permanent (until archived) | Single-use |
| Use case | Counter QR, kiosk, recurring billing | Checkout, invoice, one-time collection |
| Payment matching | Match by amount or payer reference | Matched via external_id |
→ See Collections Lifecycle for the full state machine comparison.