| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
This API revokes an issued reward transaction, moving every user reward in the transaction from the ISSUED state to CANCELLED, and refunds the points that were consumed when the reward was issued.
Use it to reverse a mis-issued or cancelled reward so that its value does not leak. Only transactions in the ISSUED state can be revoked; a reward that has already been redeemed must be reverse-redeemed back to ISSUED before it can be revoked.
The endpoint is gated by the brand-level REVOKE_ENABLE configuration flag, which is false by default. Raise a ticket with Product support to enable this for your organisation.
Note
- For detailed information about our APIs and for hands-on testing, refer to the documentation in API overview and the step-by-step guide on making your first API call in Make your first API call.
- All user rewards belonging to the transaction are revoked together. The points reversal is a single call for the whole transaction, because the rewards of a transaction share one redemption identifier.
Example request
curl --location --request POST 'https://eu.api.capillarytech.com/api_gateway/rewards/core/v1/user/reward/revoke?username={tillusername}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <token>' \
--data '{
"txnId": 9876543210,
"revokedEventDateTime": "2026-05-13T09:32:11.000Z",
"revokedBy": "BRAND_OPERATOR",
"revokeReason": "VENDOR_FULFILMENT_FAILURE"
}'Prerequisites
- Authentication: Basic or OAuth authentication.
- The
REVOKE_ENABLEbrand configuration flag must be set totruefor the org. It isfalseby default and is managed through the brand configuration API. - The reward transaction must be in the
ISSUEDstate.
Request query parameters
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Optional | The unique name of the store(till). If not provided, the store is derived from the authorisation used within the API. |
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
txnId | integer | Required | The issuance transaction ID to revoke. Use the transactionId value returned in the Issue Reward response. |
revokedEventDateTime | string | Optional | The date and time at which the revoke happened at the source, in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Defaults to the processing time if not provided. |
revokedBy | string | Optional | Identifier of the actor who initiated the revoke, for example BRAND_OPERATOR. Stored against the revoke record for audit. |
revokeReason | string | Optional | Reason for revoking the reward, for example VENDOR_FULFILMENT_FAILURE. Stored against the revoke record for audit. |
Example response
{
"status": {
"success": true,
"code": 200,
"message": "Reward revoked successfully"
},
"txnId": 9876543210,
"state": "CANCELLED",
"userRewardCount": 1
}Response parameters
| Field | Type | Description |
|---|---|---|
status | object | Object containing the outcome of the request. |
.success | boolean | Indicates whether the revoke succeeded. |
.code | integer | Status code for the outcome. 200 indicates success; other values indicate the failure reason. See API-specific error codes. |
.message | string | Human-readable description of the outcome. |
txnId | integer | Transaction ID that was revoked, echoed from the request. |
state | string | Resulting state of the transaction's user rewards. Returned as CANCELLED only when the revoke succeeds. |
userRewardCount | integer | Number of user rewards transitioned to CANCELLED for the transaction. Returned only when the revoke succeeds. |
Points reversal behaviour
On revoke, the points consumed during issuance are refunded through a single points reversal call for the transaction:
- Rewards that have no points attached (free or non-points rewards) need no reversal, and the revoke proceeds to
CANCELLED. - If the points reversal succeeds, the user rewards move to
CANCELLEDand the reversal reference is recorded against the revoke. - If the points reversal fails (the points service is unreachable, returns a non-success response, or the points could not be returned), the state does not change. The response returns
code1018and the revoke attempt is recorded so it can be retried.
Error codes
| Code | Symbolic name | Message | When it occurs |
|---|---|---|---|
| 200 | REWARD_REVOKED_OK | Reward revoked successfully | The transaction was revoked and its rewards moved to CANCELLED. |
| 13005 | REVOKE_FEATURE_NOT_ENABLED | Revoke feature is not enabled for this brand | The REVOKE_ENABLE flag is false for the org. |
| 13008 | REVOKE_INVALID_STATE | Transaction <txnId> is in state <current_state> but for revoke the state should be in ISSUED | One or more user rewards in the transaction are not in the ISSUED state. The message reports the actual current state (for example, REDEEMED or CANCELLED). |
| 10007 | TRANSACTION_NOT_FOUND | Transaction not found | No transaction exists for the provided txnId. |
| 10008 | USER_REWARD_NOT_FOUND | User reward not found | The transaction exists but has no associated user rewards. |
| 1018 | REVERSE_POINTS_API_EXCEPTION | Failed to reverse points | The points reversal could not be completed. The state is unchanged; retry the revoke. |
