Redeem User Reward

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This API redeems an issued reward transaction, moving every user reward in the transaction from the ISSUED state to REDEEMED.

Use it to mark a reward as consumed once the customer has actually used it (for example, a voucher scanned in-store or a coupon applied at checkout). Only transactions in the ISSUED state can be redeemed.

The endpoint is gated by the brand-level REDEEM_ENABLE configuration flag, which is false by default. If the flag is not enabled for the org, the request is rejected. 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 redeemed together. If any one of them is not in the ISSUED state, the entire request is rejected and none of them are redeemed.
  • A successful redeem also triggers a rewardRedeemed event notification, if configured. See Supported Events.

Example request

curl --location --request POST 'https://eu.api.capillarytech.com/api_gateway/rewards/core/v1/user/reward/redeem?username={tillusername}' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Basic <token>' \
  --data '{
    "txnId": 9876543210,
    "redeemedAtEventDateTime": "2026-05-13T09:32:11.000Z"
  }'

Prerequisites

  • Authentication: Basic or OAuth authentication.
  • The REDEEM_ENABLE Brand configuration flag must be set to true for the org. It is false by default and is managed through the brand configuration API.
  • The reward transaction must be in the ISSUED state.

Request query parameters

FieldTypeRequiredDescription
usernamestringOptionalThe unique name of the store(till). If not provided, the store is derived from the authorisation used within the API.

Request body parameters

FieldTypeRequiredDescription
txnIdintegerRequiredThe issuance transaction ID to redeem. Use the transactionId value returned in the Issue Reward response.
redeemedAtEventDateTimestringOptionalThe date and time at which the redemption happened at the source, in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). Defaults to the processing time if not provided.

API Quick Reference

POST /api_gateway/rewards/core/v1/user/reward/redeem
   ├─ Request
   │   ├─ txnId (integer)
   │   └─ redeemedAtEventDateTime (string)
   └─ Response
       ├─ status
       │   ├─ success (boolean)
       │   ├─ code (integer)
       │   └─ message (string)
       ├─ txnId (integer)
       ├─ state (string)
       └─ userRewardCount (integer)

Example response

{
  "status": {
    "success": true,
    "code": 200,
    "message": "Reward redeemed successfully"
  },
  "txnId": 9876543210,
  "state": "REDEEMED",
  "userRewardCount": 1
}

Response parameters

FieldTypeDescription
statusobjectObject containing the outcome of the request.
.successbooleanIndicates whether the redeem succeeded.
.codeintegerStatus code for the outcome. 200 indicates success; other values indicate the failure reason. See API-specific error codes.
.messagestringHuman-readable description of the outcome.
txnIdintegerTransaction ID that was redeemed, echoed from the request.
statestringResulting state of the transaction's user rewards. Returned as REDEEMED only when the redeem succeeds.
userRewardCountintegerNumber of user rewards transitioned to REDEEMED for the transaction. Returned only when the redeem succeeds.

Error codes

CodeSymbolic nameMessageWhen it occurs
200REWARD_REDEEMED_OKReward redeemed successfullyThe transaction was redeemed and its rewards moved to REDEEMED.
400INVALID_REQUESTInvalid date format: <value>redeemedAtEventDateTime was provided but is not a valid ISO 8601 date-time.
13001REDEEM_FEATURE_NOT_ENABLEDRedeem feature is not enabled for this brandThe REDEEM_ENABLE flag is false for the org.
13006REDEEM_INVALID_STATETransaction <txnId> is in state <current_state> but for redeem the state should be in ISSUEDOne 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).
10007TRANSACTION_NOT_FOUNDTransaction not foundNo transaction exists for the provided txnId.
10008USER_REWARD_NOT_FOUNDUser reward not foundThe transaction exists but has no associated user rewards.

Query Params
string

Store identifier used for gateway authentication.

Body Params
int64
required

Transaction ID of the issuance transaction to redeem.

string

Source event date-time in ISO 8601 format. Defaults to the processing time.

Headers
string
Response

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json