Skip to main content

Payment Gateway & Beyond

"I need a payment gateway for my Philippine business. I want to accept GCash, Maya, and bank transfers on my website."

Yes, NextAPI does that. But if you stop at "payment gateway," you're leaving capabilities on the table that most payment APIs can't offer at all.

This page covers the gateway use case first — accepting payments on your website or app — then explains what sets NextAPI apart from every other option in the market.

Accepting payments: the gateway use case

A customer on your website or app needs to pay you. NextAPI generates a QR Ph code (scannable by GCash, Maya, and any Philippine bank app) or a virtual bank account number. When the customer pays, NextAPI sends you a webhook. Your order is confirmed. Funds hit your account.

Customer at checkout

POST /v2/payment-intents
NextAPI returns QRPH code + virtual account number

Customer pays via GCash / Maya / bank app

Webhook: payment_intent.paid → your backend confirms the order

That's the gateway. It works. But here's where it gets interesting.

The problem with other payment gateways

Most Philippine payment gateways solve one thing: collect money from customers. The moment you need to do anything else — pay suppliers, split revenue with partners, move money between accounts, pay out to a network of people — you're on your own or you need a second vendor.

The common ceiling hits when you try to:

  • Pay sellers, riders, or suppliers after a transaction (requires a separate payout API)
  • Hold funds in sub-accounts per merchant or partner before settling (requires a ledger platform)
  • Automate platform fee splits at collection time (requires custom accounting)
  • White-label payment collection for your own network of merchants (requires a BSP license or a platform API that most gateways don't have)

NextAPI is built as full-stack payment infrastructure, not a checkout widget. The gateway capability is the entry point.

What NextAPI adds that a payment gateway doesn't

1. Payouts to any Philippine bank or e-wallet

After you collect money, you can pay it out. Any recipient. Any bank (BPI, BDO, UnionBank, Metrobank, RCBC, 50+ more). GCash. Maya. Real-time via InstaPay (≤ PHP 50,000) or same-day via PESONet.

One API. No separate payout vendor. No bank portal. No CSV uploads.

Collect from customer → POST /v2/payment-intents
Pay supplier same day → POST /v2/payout-requests

2. Sub-merchant wallets and platform hierarchy

NextAPI's account model lets you create isolated wallets per merchant, seller, or entity under your platform. Each has its own balance, transaction history, and settlement. Funds don't commingle.

Your Platform (Partner)
├── Merchant A → collections account (their balance)
├── Merchant B → collections account (their balance)
└── Merchant C → collections account (their balance)

This is the infrastructure that powers white-label payment acceptance. You onboard merchants, they get QR codes, you see their balances — all through your platform, not theirs.

3. Automatic fee splits

Collect a customer payment and automatically retain your platform fee before settling to the merchant. No manual transfers. No reconciliation spreadsheets.

Customer pays ₱1,000
→ ₱970 credited to merchant's account
→ ₱30 retained in platform account (3% fee)

→ See Take a Commission from Sales

4. Multi-provider routing

NextAPI connects to multiple financial providers simultaneously — currently 3 partner institutions, with more being added. Each transaction is automatically routed to the best available provider based on cost, reliability, and volume. If one provider experiences issues, traffic shifts to another automatically. Your integration stays the same throughout. The more providers in the network, the better the redundancy and cost efficiency your platform benefits from.

→ See Multi-Provider Routing

5. No BSP license, no per-merchant account fees

Offering payment collection to your merchants typically requires a BSP license (12+ months, millions of pesos in capital requirements) or a platform API from a provider that charges per merchant account. NextAPI has no per-merchant fees — create unlimited merchants and accounts, pay only on transaction volume.

Integration pattern for e-commerce checkout

sequenceDiagram
participant C as Customer
participant Y as Your Backend
participant N as NextAPI

C->>Y: Place order (item, amount)
Y->>N: POST /v2/payment-intents (amount, external_id=order_id)
N-->>Y: { qrph_code, virtual_account, expires_at }
Y-->>C: Show QR code + virtual account at checkout
C->>N: Pay via GCash / Maya / bank app
N-->>Y: Webhook: payment_intent.paid
Y->>Y: Mark order as paid, trigger fulfillment
Y-->>C: "Payment confirmed. Order is processing."

Key API endpoints

ActionEndpoint
Generate checkout QR / virtual accountPOST /v2/payment-intents
Check payment statusGET /v2/payment-intents/{id}
Cancel unpaid paymentDELETE /v2/payment-intents/{id}
Create static QR (accept any amount)POST /v2/accounts/{id}/funding-methods
View collected paymentsGET /v2/accounts/{id}/postings
Check account balanceGET /v2/accounts/{id}/balances
Pay out collected fundsPOST /v2/payout-requests

Static QR vs payment intent: which to use

Payment Intent (dynamic QR) — use for checkout flows where you know the exact amount. The QR is single-use and amount-locked. When it's paid, you know exactly which order was settled.

Funding Method (static QR) — use for open-ended collection: a "donate" button, a standing QR for a physical store, or a subscription page where the subscriber pays a known recurring amount. Any amount can be paid to the same QR; your webhook handler matches incoming amounts to expected balances.

→ See Collections Lifecycle for the full comparison.

Webhook confirmation: the right way to confirm payments

Never poll. Set up a webhook endpoint and let NextAPI push confirmation to you. A payment_intent.paid event arrives within seconds of the customer completing payment.

// Minimal webhook handler
app.post('/webhooks/nextapi', (req, res) => {
const event = req.body;

if (event.type === 'payment_intent.paid') {
const { external_id, amount } = event.data;
// external_id is the order ID you passed at creation
fulfillOrder(external_id, amount);
}

res.status(200).send('OK');
});

Always verify the webhook signature before processing. → See Verify Webhook Signatures

Reach: who can pay

Every customer with any of the following can pay:

  • GCash — 94M+ registered users
  • Maya — 80M+ registered users
  • Any Philippine bank app — BPI, BDO, UnionBank, Metrobank, Security Bank, RCBC, Chinabank, Landbank, DBP, and 50+ more that support QR Ph or InstaPay transfers

A single QR code covers all of them. Your customer doesn't need to know which provider handles the transaction — it just works from whatever app they have open.

Getting started

  1. Get sandbox credentials — accept test payments with no real money
  2. Follow Your First Collection — end-to-end collection flow in under 30 minutes
  3. Follow Accept a QRPH Payment — step-by-step guide for the payment intent flow
  4. Set up Webhooks — real-time payment confirmation
  5. Follow Build an E-commerce Checkout — full checkout tutorial with order management

What else can NextAPI power

Once your gateway is running, the same API handles: