payment Call
Description
This endpoint allows a member to pay for their purchase using their loyalty budget (credit or points), or to cancel a previous payment using a confirmation code.
Payment Flow
Use this endpoint when a member wants to pay with their loyalty budget:
- Only one member can be processed per request
- The payment can be applied either as a means of payment or as a discount, depending on configuration
- The request must include the purchase details and the requested amount
- If reimbursing the member, the amount should be negative
Cancel Payment Flow
Use this when a member wishes to cancel a payment using the confirmation code from a prior payment response.
📝 Notes
- For cancellations, include
action: "cancel"andconfirmationCode - Do not include empty fields; only provide values that are relevant and necessary
Request Format
Headers
| Name | Type | Required | Description |
|---|---|---|---|
x-source-type | string | ✅ | Source of request (POS, Web, etc.) |
x-source-name | string | ✅ | Name of client system or integration |
x-pos-id | string | ✅ | Unique POS terminal ID |
x-branch-id | string | ✅ | Branch/location identifier |
Body
{
"member": {
"phoneNumber": "5511122233"
},
"payment": {
"action": "pay",
"amount": 300
},
"transaction": {
"transactionId": "TX300POINTS-003",
"dateTime": "2025-06-18T12:15:00Z",
"totalAmount": 3000,
"items": [
{
"lineId": "1",
"code": "PRD001",
"name": "Espresso Machine",
"departmentCode": "APPLIANCES",
"departmentName": "Home Appliances",
"quantity": 1,
"subtotal": 3000,
"total": 3000,
"tags": []
}
],
"payments": [
{
"type": "POINTS",
"amount": 300
},
{
"type": "CASH",
"amount": 2700
}
],
"employee": "Cashier #3"
}
}
Response Format
Success Example
{
"status": "success",
"data": {
"confirmationCode": "ABC123XYZ",
"newBalance": {
"points": 1700,
"credit": 0
}
}
}
Error Example
{
"status": "error",
"error": {
"code": "407",
"message": "creditBalance balance for members is insufficient to process the payment!"
}
}
Related Use Cases
- Loyalty redemption at checkout
- Cancelling previous loyalty payments with confirmation code
- Updating balance after partial payment