Skip to main content

Collections Lifecycle

Collections are how you receive money through NextAPI. There are two mechanisms: Funding Methods (persistent, static) and Payment Intents (dynamic, one-time). This page explains the lifecycle of each and how funds flow from payor to your account.

Two collection mechanisms

Funding MethodPayment Intent
TypeStatic, persistentDynamic, one-time
QRPH codeSame code reused for multiple paymentsUnique code per payment
Use caseVirtual bank account, recurring depositsInvoice payment, checkout
ExpiresNever (until archived)Configurable expiry
AmountAny amount (payor-defined)Specific amount (you define)

Funding Methods

A Funding Method is a persistent payment endpoint — a virtual bank account or static QRPH code linked to a NextAPI account. Payors can use it repeatedly.

Lifecycle

CREATED → ACTIVE → ARCHIVED
StateDescription
CREATEDFunding method provisioned with provider; not yet active
ACTIVEAccepting payments; QRPH code or account number is live
ARCHIVEDDeactivated; no longer accepts new payments

Payment receipt flow

Payor scans QRPH / sends bank transfer


Provider receives funds


NextAPI receives provider webhook


Account balance updated (pending → available)


NextAPI fires webhook to your endpoint
event: funding_method.payment_received

Creating a Funding Method

curl -X POST https://api.partners.nextpay.world/v2/funding-methods \
-u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{
"account_id": "acc_abc123",
"type": "qrph",
"external_id": "fm-merchant-001"
}'

The response includes the QRPH payload or virtual account details your payor uses to send funds.

Payment Intents

A Payment Intent is a single-use collection request for a specific amount. It generates a unique QRPH code that expires after a configurable window.

Lifecycle

CREATED → PENDING → COMPLETED
│ │
└──────────┴──→ EXPIRED / CANCELLED
StateDescription
CREATEDIntent created; QRPH code generated but payor hasn't scanned
PENDINGPayor has scanned; payment in processing
COMPLETEDPayment received and settled to account
EXPIREDExpiry time reached before payment
CANCELLEDCancelled via API

Payment receipt flow

POST /v2/payment-intents


QRPH code generated

▼ (share QR with payor)
Payor scans and pays


NextAPI receives provider confirmation


Intent → COMPLETED
Account balance credited


NextAPI fires webhook to your endpoint
event: payment_intent.completed

Creating a Payment Intent

curl -X POST https://api.partners.nextpay.world/v2/payment-intents \
-u "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: pi-order-checkout-789" \
-d '{
"account_id": "acc_abc123",
"amount": 50000,
"currency": "PHP",
"description": "Order #789",
"external_id": "order-789",
"expires_at": "2024-01-16T10:00:00Z"
}'

Amount is in centavos: 50000 = PHP 500.00.

Balance update timing

PhaseAvailable balancePending balance
Before paymentUnchangedUnchanged
Payment scanned / in-flightUnchangedIncreases
Payment confirmedIncreasesReturns to 0

The pendingavailable transition triggers the webhook event. The available balance is what you can use for payouts.

Webhook events

EventTrigger
funding_method.payment_receivedFunds received into a Funding Method
payment_intent.completedPayment Intent payment confirmed
payment_intent.expiredPayment Intent expired without payment

Configure webhooks via POST /v2/webhooks. See Understanding Webhooks for payload structure.