Redeem loyalty reward
POST
/v2/loyalty/rewards/{reward_id}/redeem
Redeems a loyalty reward.
The endpoint sets the reward to the REDEEMED
terminal state.
If you are using your own order processing system (not using the Orders API), you call this endpoint after the buyer paid for the purchase.
After the reward reaches the terminal state, it cannot be deleted. In other words, points used for the reward cannot be returned to the account.
Name | Description |
---|---|
reward_
Required
|
The ID of the loyalty reward to redeem. |
Name | Description |
---|---|
idempotency_
Required
|
A unique string that identifies this |
location_
Required
|
The ID of the location where the reward is redeemed. |
Response Fields
Name | Description |
---|---|
errors
|
Any errors that occurred during the request. |
event
|
The |
Examples
POST
/v2/loyalty/rewards/{reward_id}/redeem
cURL
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/loyalty/rewards/9f18ac21-233a-31c3-be77-b45840f5a810/redeem \
-X POST \
-H 'Square-Version: 2023-01-19' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"idempotency_key": "98adc7f7-6963-473b-b29c-f3c9cdd7d994",
"location_id": "P034NEENMD09F"
}'
Response JSON
{
"event": {
"id": "67377a6e-dbdc-369d-aa16-2e7ed422e71f",
"type": "REDEEM_REWARD",
"created_at": "2020-05-08T21:56:00Z",
"redeem_reward": {
"loyalty_program_id": "d619f755-2d17-41f3-990d-c04ecedd64dd",
"reward_id": "9f18ac21-233a-31c3-be77-b45840f5a810"
},
"loyalty_account_id": "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd",
"location_id": "P034NEENMD09F",
"source": "LOYALTY_API"
}
}