Accept a payment
Taking an in-store payment is two steps: start it, then follow it to its outcome.
Step 1 — Start the payment
Send the amount to a store and terminal you have registered:
curl https://api-live.kcpboundless.com/api/in-store/payments \
-H "X-API-Key: bndl_live_..." \
-H "Content-Type: application/json" \
-d '{
"merchantExternalId": "your-merchant-id",
"storeExternalId": "your-store-id",
"terminalExternalId": "your-terminal-id",
"amount": 100.00,
"currency": "SGD",
"reference": "order-4821"
}'
| Field | Required | Description |
|---|---|---|
merchantExternalId | yes | Your business identifier. |
storeExternalId | yes | The store the payment is taken at. |
terminalExternalId | yes | The device at that store. |
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 bill. Use it to match the outcome back to your records. |
sequenceNumber | optional | Position of this tender when one bill is split across several payments. |
requestedModes | optional | Restrict what the terminal offers: ["CARD"] for cards, ["E_WALLET"] for a wallet or QR, PayNow included (QR_CODE is accepted as the same value). Omit to allow every mode the device supports. See Choosing the tender. |
walletProvider | optional | The wallet the customer will pay with, when your till already knows it — for example PAYNOW or GRABPAY. The terminal shows that wallet's QR, and the payment is recorded and priced as that wallet. See Naming the wallet. |
terminalTimeoutMinutes | optional | How long the device waits for the customer. |
cashierId, customerMobile, customerEmail | optional | Passed through for the receipt and your records. |
The response is the payment, waiting at the terminal:
{
"id": "01997b3e-6c31-7a42-9f10-4d2c8b5e7a01",
"pspReference": "BNDL7K2P9QW1ABCD",
"status": "AWAITING_TERMINAL",
"amount": 100.00,
"currency": "SGD"
}
id— the payment id. Use it to check status. It is an opaque string (a UUID); store it as text and pass it back unchanged. Do not parse it as a number.pspReference— Boundless's stable reference for the payment.status—AWAITING_TERMINALmeans the bill is on the device and no money has moved yet.
Store the payment id against the bill in your own database before the cashier sees the
waiting screen. If your till crashes between the call and the write, you have lost the handle on a
live payment.
The customer now taps their card at the terminal.
Step 2 — Follow it to the outcome
You learn the result two ways, and a good integration uses both: poll sync-status for the live
cashier screen, and subscribe to webhooks as your durable record of every outcome — see
A recommended till flow below.
By webhook
Register a webhook endpoint (see Webhooks) and Boundless will call it when the payment reaches a final state — captured, declined, cancelled. You do not have to poll.
By status call
Two calls answer "where is this payment now", and they differ in cost:
Read the current state — a plain lookup of what Boundless already knows. Cheap; use this for routine polling:
curl https://api-live.kcpboundless.com/api/transactions/01997b3e-6c31-7a42-9f10-4d2c8b5e7a01 \
-H "X-API-Key: bndl_live_..."
Refresh from the terminal — asks the acquirer what happened at the device and applies the
answer before responding. This is the call for the live cashier screen: while a cashier is watching
the terminal, calling it on a short interval — every two to three seconds is reasonable — until the
payment leaves AWAITING_TERMINAL gives the fastest honest answer. It is also the call for when
you suspect Boundless's view is behind the device — for example the customer says they paid but the
payment still reads as waiting:
curl -X POST https://api-live.kcpboundless.com/api/in-store/payments/01997b3e-6c31-7a42-9f10-4d2c8b5e7a01/sync-status \
-H "X-API-Key: bndl_live_..."
Either way the response is the payment, with its status advanced if the customer has finished:
{
"id": "01997b3e-6c31-7a42-9f10-4d2c8b5e7a01",
"status": "CAPTURED",
"amount": 100.00,
"currency": "SGD",
"cardBrand": "VISA",
"last4": "4242"
}
Both calls are safe to make repeatedly. If the payment is still open, you get AWAITING_TERMINAL
again; once it is final, the state does not change on you. A sensible point of sale combines a
webhook subscription with one sync-status behind its "check payment" button.
Every payment ends
Boundless also runs a reconciliation sweep over in-store payments on its own, independently of anything your point of sale does. It picks up outcomes your till never asked about — including payments cancelled or completed at the device — and closes out bills that nobody decided.
The sweep runs on a cycle of a few minutes, and only considers a payment once its own terminal timeout has elapsed plus a short grace period. It is a safety net that guarantees every payment eventually reaches a final state, even if your till goes offline mid-sale.
It is not a mechanism to build a cashier experience on. The delay is measured in minutes, not
seconds. When you need an answer now, call sync-status.