Consume
The Reward Consume endpoint allows you to set the state of vouchers to pending, verify, notified, redeemed, or expired. See the table below to understand the various states.
The Reward Consume endpoint will enable integrations whereby rewards are redeemed through a different mechanism i.e. not via the built-in peer-to-peer confirmation. This can be in the form of issuing coupons, digital codes, digital tickets, airtime credits, etc.
Reward Voucher States
States |
pending The voucher has been obtained but a notification to the user has not been sent. |
notified The voucher has been obtained and a voucher notification has been sent. |
verify Send a peer-to-peer confirmation request to the user's device, requesting them to confirm that the reward has been received. |
redeemed Set the voucher to redeemed i.e. confirm that the user has received the reward. |
expired Set the voucher to expired. |
Consuming Vouchers
In order to consume vouchers, you will need to retrieve the voucher guid
. This can either be done via the reward list endpoint, or automatically via reward webhooks. The consume endpoint allows you to set the voucher state for a single or multiple users.
Parameters
Key | Type |
guids | Array. A list of GUIDs. |
state | String. The state that vouchers should be set to. |
Success Response
The response will contain how many vouchers changed their state. Vouchers will only change their state if the current state does not match the new state.
Last updated