Skip to main content
Redeem an amount of a flexible reward and apply the discount to one of the customer’s subscriptions, instead of returning a code for checkout. The reward’s purchase type must be Subscription or Both.

Usage

Parameters

string
required
The ID of a flexible reward (one whose redemptionMode is "flexible"). Get reward IDs from getShopRewards.
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.
string
required
The id of one of the customer’s subscriptions, from getSubscriptions.

Response

boolean
Whether the discount was applied.
object
The created reward record, with id and discountCode.
number
The discount value, in major currency units.
number
The amount deducted from the customer’s balance.
number
The customer’s remaining balance.
string
The subscription the discount was applied to.
How many orders the discount applies to follows the reward’s own settings. If applying fails, the customer’s balance is not charged.

Errors

Sample response