Skip to main content
POST
cURL
Use this endpoint to redeem a custom reward, which is fulfilled by the merchant either manually or via a webhook. LoyaltyLion isn’t involved in the fulfillment of custom rewards. If the redemption is successful, i.e. the customer has enough points, the response may include a fulfillment_explanation property. This is a short plaintext string provided by the merchant when the custom reward was configured, and is intended to inform the customer how/when the reward will be fulfilled. For example, “We’ll email you instructions within the next 2 days” The fulfillment explanation, if present, should be shown to the customer once the reward has been redeemed. Alternatively, if you know which reward has just been redeemed, you could build your own custom UI flow following the redemption. For example, if you have a custom reward that provides access to a special product collection, you might want to direct the user to that collection once the redemption completes. If the custom reward has been configured with a webhook, we will call that webhook after the redemption is successful, and mark the reward as fulfilled once the webhook returns a success response. For custom rewards that are manually fulfilled, you can pass the fulfill_immediately property to immediately mark the reward as fulfilled.

Authorizations

Authorization
string
header
required

An API key linked to a Program in LoyaltyLion, with a set of permissions (scopes). API keys can be created manually, or acquired through an OAuth2 flow. The API key should be provided as a Bearer token in the Authorization header

Path Parameters

site_id
number
required

Your LoyaltyLion Site ID

Query Parameters

channel
enum<string>

The sales channel from which this request is made

Available options:
web,
pos,
mobile
country
string

ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used

Body

application/json

Body

reward_id
number
required

The LoyaltyLion ID of the reward to redeem

customer_merchant_id
string
required

The ID of the customer (in your ecommerce store or platform) to redeem the reward for. For Shopify stores, you can pass either a GID or a regular numeric ID.

This must be a customer whose state is enrolled

fulfill_immediately
boolean

For rewards using manual fulfillment, passing true here will mark the custom reward as fulfilled immediately. This option is ignored if the custom reward is configured to use a webhook for fulfillment

Requires api_token authentication: fulfilling a reward is a merchant-side action, so requests made with a customer session token are rejected when this option is passed

This is useful if you know you'll be fulfilling the reward straight away, or have already fulfilled it

This option does not apply to rewards with a fulfillment_type of voucher: a voucher custom reward is always fulfilled at claim time, when the pooled code is issued to the customer

usage
Order · object

You can pass a usage object to indicate the reward has been used with an order. Note that the usage won't be applied in LoyaltyLion until the matching order (with the same merchant_id) has been sent to LoyaltyLion

Requires api_token authentication: marking a reward as used is a merchant-side action, so requests made with a customer session token are rejected when this option is passed

This option does not apply to rewards with a fulfillment_type of voucher and is ignored for them: a voucher custom reward is marked as used automatically when the matching order containing its discount code is sent to LoyaltyLion

Response

201

fulfillment_explanation
string | null
required

Optional fulfillment explanation as a short, plaintext string. If present, this will explain to the customer how and when the reward will be fulfilled

claimed_reward
object
required

The new claimed reward. If you may need to refund this custom reward later, you should save the claimed_reward.id and use it with the Refund Reward API

customer
object
required

The customer object, updated as of the reward redemption, i.e. their claimed_rewards will include the new redemption. This customer will always have state set to enrolled, as only enrolled customers can redeem rewards