Payments
Process payments and save manual transactions. Requires the payments:direct scope. Supported currencies: NZD (New Zealand Dollar) and AUD (Australian Dollar).
POST
/api/v1/{system}/payNow🔒 payments:directProcess a payment through a terminal's configured gateway. Tenant ownership is validated server-side.
Auth: Bearer JWT
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| grandTotal | string | Yes | Decimal amount (e.g. '10.00') |
| referenceId | string | Yes | Unique transaction reference (must be unique per merchant) |
| branchId | long | Yes | Branch user ID |
| configId | long | Yes | Terminal config ID (from listTerminals) |
| channel | string | No | WECHAT, ALIPAY, UNION_PAY, CENTRAPAY, etc. |
| authCode | string | No | QR scan code (required when qrMode=false) |
| qrMode | boolean | No | true = generate QR for customer to scan |
Response Example
{
"status": true,
"paymentStatus": "SUCCESS",
"referenceId": "REF-001",
"tradeNo": "TRADE-123",
"grandTotal": "10.00",
"channel": "WECHAT",
"currency": "NZD"
}⚠️ Live testing disabled for this endpoint — it modifies data. Use curl or the SDK against your sandbox.
POST
/api/v1/{system}/saveTransaction🔒 payments:directSave a manually recorded transaction (e.g. cash or external payment).
Auth: Bearer JWT
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| grandTotal | string | Yes | Decimal amount |
| referenceId | string | Yes | Unique reference |
| branchId | long | Yes | Branch user ID |
| configId | long | Yes | Terminal config ID |
| channel | string | Yes | Payment channel (e.g. CASH) |
⚠️ Live testing disabled for this endpoint — it modifies data. Use curl or the SDK against your sandbox.