For the complete documentation index, see llms.txt. This page is also available as Markdown.

Rewards & Coupons

Building the rewards catalogue, letting members redeem coupons, vouchers and physical rewards, marking coupons as used and fulfilling orders — with the API calls, webhooks and checks for each step.

Rewards are what members spend their units on: coupon codes for your shop, third-party vouchers, physical merchandise, tickets. Open Loyalty holds the catalogue, checks balance, stock and limits, spends the units and issues the code; your channels show the catalogue and use the codes; your fulfilment process ships physical rewards.

For the Admin Panel side, see Creating a reward, Reward types, Adding coupons and Reward fulfillment.

Reward types

Type (API)
Use for

static_coupon

A code with a fixed value — your own codes (uploaded) or generated ones

dynamic_coupon

A code whose value is set when it's issued

conversion_coupon

Units converted to money at a rate (e.g. 100 points = 1 €)

material

Physical merchandise that has to be shipped

fortune_wheel

A spin or lottery draw — see Fortune wheels & lotteries

Who does what

Area
Responsibility

Admin Panel

Rewards, categories, costs, stock, per-member limits, visibility, coupon code pools

Integration layer

Lists rewards for the member, buys them, marks coupons used or unused, updates fulfilment status

Website / app

Catalogue with categories, "redeem" flow, "my rewards" with codes

E-commerce platform / POS

Accepts the codes at checkout and reports when one is used

Fulfilment / warehouse

Ships physical rewards and reports status

CRM / marketing automation

Sends the voucher with its code and status updates

Design decisions

Decision
Options
Recommendation

Where codes come from

Uploaded from your shop, or generated by Open Loyalty

Upload codes your shop already validates; generate them if the shop can accept Open Loyalty's codes.

Stock

Limited by quantity, by uploaded codes, or unlimited

Set stock for physical rewards. A coupon with uploaded codes is limited by the codes themselves — set a per-member limit as well.

Who sees what

Everyone, segments, tiers, labels

Use visibility and labels for audience-specific rewards (e.g. a tier-only catalogue, or rewards that need a verified profile).

Coupon use

Report usage back, or not

Report it (reward/redeem) so members and support see which codes are used, and so reporting is complete.

Cancellations

Allowed, or not

Allow cancelling unused rewards — but cancelling doesn't return units, so refund them explicitly.

1

Configure (Admin Panel)

Create categories for the catalogue tabs, then the rewards with cost, wallet, stock, limits and visibility. Upload or generate coupon codes (POST /api/{storeCode}/reward/{reward}/coupon).

2

Show the catalogue

GET /api/{storeCode}/member/{member}/reward returns the rewards this member can see, with cost; filter by categories for tabs and by label if several brands share a tenant. Leave spins out of the catalogue with type[notIn]=fortune_wheel if they're shown elsewhere.

3

Redeem

POST /api/{storeCode}/reward/{reward}/buy with the member's customerId (UUID — not the loyalty card number), quantity and withoutPoints = false; add shippingAddress for physical rewards. Open Loyalty checks balance, stock and limits, spends the units and returns the issued reward with its coupon code.

4

Use and reissue coupons

When the shop accepts a code, call POST /api/{storeCode}/member/{member}/reward/redeem with the couponCode (and usedAt for the real time); a 409 means it's already used. If the order is cancelled and the code should work again, call POST /api/{storeCode}/member/{member}/reward/reissue.

5

Fulfil physical rewards

Pass new orders to fulfilment from the CustomerBoughtReward webhook, and update their status with POST /api/{storeCode}/redemption/{issuedReward}/status (or /redemption/status/bulk, or a mass status import).

6

Cancel when needed

POST /api/{storeCode}/redemption/{issuedReward}/cancel cancels an unused reward and restores limits; an uploaded code goes back to the pool, a generated one is deleted. Units aren't returned — refund them with POST /api/{storeCode}/points/add if the member should get them back. See Canceling a redeemed reward.

Sequence diagrams

Browse and redeem: the integration layer reads the rewards the member can see by category; the member redeems a voucher; the integration layer buys the reward with the member's customerId, quantity 1 and withoutPoints false; Open Loyalty checks balance, stock and limits, spends units and assigns a coupon code, returns the issued reward with the code and sends a CustomerBoughtReward webhook, which CRM uses for the voucher email. Use at checkout: when an order is paid with the code, the integration layer marks the coupon as used with couponCode and usedAt; 409 means it was already used; if the order is cancelled, reissue makes the code usable again.
Coupon: redeem, use and reissue
The integration layer buys a physical reward with a shipping address and gets the issued reward ID; on the CustomerBoughtReward webhook it passes the order to fulfilment; when fulfilment reports it shipped, it changes the redemption status, Open Loyalty sends RewardRedemptionStatusChanged and CRM tells the member. Many orders can be updated with the bulk status call. A reward that can't be fulfilled is cancelled, but units are not returned and must be refunded with points add.
Physical reward fulfilment

Go-live checklist

Admin Panel

Integration layer

Website / app and shop

Validation

Key endpoints

Webhooks: CustomerBoughtReward, RewardRedemptionStatusChanged, CouponWillExpire

Last updated

Was this helpful?