Payment
Overview
The payment object defines how a member pays using loyalty assets such as points or credit. It is used within /payment and /transaction calls to either apply a payment or cancel a previous one.
When to Use This Object
Include a payment object when:
- A member is redeeming loyalty points or credit during a transaction
- You are canceling a previously confirmed loyalty payment
- A payment breakdown is required in a submitted transaction payload
Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
action | string | Yes | "pay" or "cancel" — defines if this is a new payment or a cancellation |
amount | number | Conditional | Required for pay, a positive integer. Optional for cancel; if sent, it must be a number, and its value is ignored: a cancel reverses the original payment's full amount |
confirmationCode | string | Conditional | Required only for cancel — must match a previously issued payment |
Example: Payment Request
{
"payment": {
"action": "pay",
"amount": 1000
}
}
Example: Payment Cancellation
{
"payment": {
"action": "cancel",
"confirmationCode": "ABC123XYZ"
}
}
Notes
- For
"pay"actions,amountis required and must be a positive integer - For
"cancel"actions, a validconfirmationCodeis required;amountis not needed; if sent, it must be a number, and its value is ignored - This object is required in
/paymentendpoint calls and may be embedded in/transactioncalls for reporting purposes
Related Use Cases
- Member pays partially with points and the rest with card
- Member cancels a previous payment, and their balance is refunded
- Detailed loyalty payment tracking for reporting or audit purposes