Skip to main content
Redeem a flexible reward, where the customer chooses how much of their balance to spend and the server generates a discount for that amount. This powers “choose your own discount” rewards in points mode, and it is the only redemption path on store-credit shops.

Usage

Parameters

rewardId
string
required
The ID of a flexible reward (one whose redemptionMode is "flexible"). Get reward IDs from getShopRewards.
pointsToRedeem
number
required
The amount to spend, in the shop’s loyalty unit (points, or minor currency units in store-credit mode). Must fall within the reward’s flexibleConfig.minPoints and flexibleConfig.maxPoints.

Response

success
boolean
Whether the redemption was successful.
data.customerReward
object
The created reward record.
data.discountAmount
number
The cash value of the generated discount, in major currency units.
data.pointsRedeemed
number
The amount deducted from the customer’s balance.
data.updatedPoints
number
The customer’s remaining balance after redemption.

Errors

Sample response

Example: Choose-your-own-amount slider