Accept a payment
Taking an online payment is three steps: open the page, send the customer to it, then follow the payment to its outcome.
Before the first payment
Two settings on your account decide what a page may do, and an administrator sets them once in the Boundless dashboard (or over the settings API):
| Setting | What it decides |
|---|---|
| Allowed return origins | Where a customer's browser may be sent after paying. Every returnUrl you send must be on one of these origins — https://host[:port], no path. A request whose return address is anywhere else is refused with 400. |
| Checkout page expiry | How long a page takes payment, from 60 to 1800 seconds. The default is 120 seconds. |
The expiry is not chosen per request. A table bill rarely needs longer than the default; raise it for flows where the customer takes time to decide.
Step 1 — Open the page
curl https://api-live.kcpboundless.com/api/online/payments \
-H "X-API-Key: bndl_live_..." \
-H "Content-Type: application/json" \
-d '{
"merchantExternalId": "your-merchant-id",
"amount": 42.50,
"currency": "SGD",
"reference": "bill-7731",
"returnUrl": "https://order.example.com/bills/7731/return"
}'
| Field | Required | Description |
|---|---|---|
merchantExternalId | yes | Your business identifier. |
amount | yes | Decimal amount in the payment's currency, greater than zero. |
currency | yes | ISO 4217 code, for example SGD. |
reference | recommended | Your own reference for the order — a bill id, an invoice number. Up to 100 characters. It makes a retried request safe, and matches every outcome back to your records. See One live payment per reference. |
returnUrl | yes | Where the customer's browser is sent once the page is done. Must be on your allowed return origins. |
allowedMethods | optional | What the page offers: ["CARD"], ["E_WALLET"], or both. Omit to offer every method enabled on your account. E_WALLET covers every wallet and QR method, PayNow included. |
description | optional | Shown on the page where the acquirer supports it, up to 100 characters — "Table 4", for instance. |
customerName, customerEmail, customerMobile | optional | Passed to the page for the customer's convenience. |
The response is the payment, waiting for the customer:
{
"id": "01a18691-b545-7952-ba41-661d336d894f",
"pspReference": "BNDL7K2P9QW1ABCD",
"status": "AWAITING_TERMINAL",
"amount": 42.50,
"currency": "SGD",
"reference": "bill-7731",
"channel": "ONLINE",
"checkoutUrl": "https://onlinepayments.pinelabs.sg/checkout/v1/pay?order_id=v1-...",
"checkoutExpiresAt": "2026-11-02T08:17:30Z"
}
id— the payment id. Use it to read the payment and to refund it. It is an opaque string; store it as text and pass it back unchanged.status—AWAITING_TERMINALmeans the page is open and the customer has not paid. The same status name is used for a bill waiting at a terminal; for an online payment it means waiting for the customer on the page.checkoutUrl— the page. Send the customer's browser there.checkoutExpiresAt— when the page stops taking payment.
Store the payment id against the order in your own database before sending the customer to
the page. The outcome arrives by webhook and on the customer's return, and both name the payment by
its id.
A page the acquirer refuses to open comes back 201 with the payment already REFUSED (or
ERROR when the acquirer could not be reached) and no checkoutUrl. Branch on status, never on
the HTTP code alone.