Skip to main content

What is NextAPI?

NextAPI is NextPay's headless payment infrastructure for the Philippines — a REST API that lets software platforms embed payment collection, disbursement, and wallet management into their own products without building or licensing the underlying financial rails themselves.

The problem NextAPI solves

Getting a BSP (Bangko Sentral ng Pilipinas) license takes 12+ months and costs millions of pesos. Integrating with Philippine banks one-by-one requires separate agreements, compliance workflows, and ongoing maintenance for each. And after all that, you still need to handle reconciliation, error handling, and routing across InstaPay, PESONet, and QRPH.

NextAPI is the shortcut: one API, one integration, one BSP-licensed counterparty. Your platform handles the product; NextAPI handles the payments.

Who uses NextAPI

NextAPI is designed for platforms — software companies that serve a network of merchants, employees, or end users who need to send or receive money:

Platform typeExampleWhat they use NextAPI for
POS / Merchant SaaSCloud POS platform serving hundreds of restaurantsEach restaurant collects QRPH payments through the POS interface
Physical kiosk networksVending machine operator with hundreds of endpointsEach kiosk accepts QRPH; operator pays suppliers via PESONet
HRIS / Payroll platformsPayroll SaaS serving dozens of companiesPay employees at multiple banks every 15th and 30th
Subscription billingISP billing portalSubscribers pay monthly bills via QR Ph
Gig & marketplaceDelivery platform with thousands of ridersInstant payouts to riders after every delivery
Payment Gateway & BeyondE-commerce store, SaaS app, or booking platformAccept QRPH + virtual account payments at checkout — then pay out to suppliers, partners, or staff from the same API

NextAPI is not a standalone payment gateway for individual merchants. If your organization is a single merchant wanting to accept payments, you want NextPay's consumer product instead.

Core capabilities

Merchant and account hierarchy

NextAPI uses a three-tier wallet structure: Partner → Merchant → Account. Your platform is the partner. Each of your customers becomes a merchant. Each merchant can have multiple accounts (e.g., a collections account and a payroll account).

This hierarchy lets you manage money flows across your entire platform from a single integration — no per-merchant licensing required.

→ See Wallet Structure for a full breakdown.

Money In: collection via QRPH

Generate QRPH codes for any merchant account — either a static code (tied to the account, reusable) or a dynamic code (one-time use, exact amount). When a customer scans and pays, NextAPI receives the bank notification and triggers a webhook to your platform.

Supported collection methods:

  • Funding Methods (static) — persistent QR codes and virtual account numbers per account
  • Payment Intents (dynamic) — single-use QRPH codes for a specific amount

→ See Collections Lifecycle for the full flow.

Money Out: payouts to any bank or wallet

Send funds from any account to any Philippine bank or e-wallet via InstaPay (real-time, ≤ PHP 50,000) or PESONet (batch, same-day settlement, no limit). NextAPI automatically routes to the optimal rail based on amount and availability.

For batch operations (payroll, mass disbursement), use POST /v2/payout-requests/batch to submit multiple payout requests in a single API call.

→ See Payout Lifecycle and Disbursement Channels.

Real-time webhooks

Every significant event — payment received, payout completed, payout failed — triggers a webhook to your registered endpoint. Webhooks are signed with HMAC-SHA256 so you can verify they came from NextAPI.

→ See Webhooks.

Automatic reconciliation

Every peso movement is recorded as a posting in a double-entry ledger. Query GET /v2/accounts/{id}/postings to get an exact, timestamped record of every debit and credit — no manual reconciliation against bank statements required.

How NextAPI fits into NextPay

NextAPI is the headless core powering NextPay. The consumer-facing NextPay app (used by SMEs) runs on the same infrastructure. When you integrate NextAPI, you're using the same payment rails, the same BSP OPS license, and the same multi-provider routing logic powering payments across the Philippines.

┌─────────────────────────────────────────────┐
│ Your Platform │
│ (POS, HRIS, marketplace, billing portal) │
└───────────────────┬─────────────────────────┘
│ NextAPI (REST)
┌───────────────────▼─────────────────────────┐
│ NextAPI Core │
│ Ledger · Routing · Webhook orchestration │
└────────────────────┬────────────────────────┘

┌────────────┴───────────────┐
│ 3 Partner Providers │
│ (growing network) │
└────────────┬───────────────┘

BancNet / InstaPay / PESONet

→ See Architecture for a deeper look at the routing layer.

Key design decisions

Basic Auth, not OAuth. Credentials are your Client ID and Client Secret, Base64-encoded in the Authorization header. Simple to implement, no token refresh loops.

Centavos, not pesos. All amounts are in PHP minor units (centavos). PHP 500.00 = 50000. This avoids floating-point rounding errors in financial calculations.

Idempotency by default. Every state-changing request accepts an X-Idempotency-Key header. Submit the same key twice and the second call returns the original response without creating a duplicate.

Async by design. Payouts don't complete synchronously. Create a payout request → receive initiated status → receive a webhook when it completes (or fails). Poll GET /v2/payout-requests/{id} if you need status without webhooks.

Next steps