Rewards
Rewards are what the business set up in Likom Business for its card programs: a free item after 10 stamps, a discount for 100 points, a promo price for members. The scan tells you which ones the customer can use right now.
Which rewards are available
The card object from a scan has rewards:
| Field | |
|---|---|
promotion_id | Send it to hand the reward over |
title | e.g. "Free pastry" |
uses | What it takes from the card, e.g. "Uses 100 points" |
available, blocker | Whether it can be used now, and if not, why (in words) |
reward | What to hand over, e.g. "Any pastry" or "Latte for $3 (usually $5)" |
price | What to charge for it (a promo price), or null when it's free |
min_purchase | The bill must be at least this; send it as bill |
Rewards need the customer's live QR. A card found by @username can earn but not spend (403 needs_qr).
Hand over a reward
POST /redemptions
Scope redemptions:write. Needs an Idempotency-Key header.
| Field | Type | |
|---|---|---|
ticket | string, required | From the scan |
promotion_id | UUID, required | One of rewards[].promotion_id with available: true |
bill | money | The purchase, when the reward has a min_purchase or the discount depends on the bill |
curl https://api.likom.co/v1/partner/redemptions \
-H "Authorization: Bearer $LIKOM_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-10482-reward-1" \
-d '{"ticket": "t_9Gq2…", "promotion_id": "0193c0d1-2e3f-7a4b-8c5d-6e7f8a9b0c1d"}'The answer has the same shape as a purchase: redemption_id, message and card (the card after the reward). A replay answers replayed: true with the first redemption_id.
Recording a purchase and handing over a reward on the same scan is fine: for example, record the bill, then hand over the reward it unlocked. Use a different Idempotency-Key for each.
Errors: 404 promotion_not_found (not on this card), 409 not_available (with its blocker as the message), 409 min_purchase (send a larger bill), 403 needs_qr.
Undo a reward
POST /redemptions/{redemption_id}/undo
Scope redemptions:write. Gives back what the reward took (points, stamps). Same rules as purchases: the key's own within 10 minutes, any within 30 days with transactions:refund.
| Field | Type | |
|---|---|---|
reason | string | Optional, up to 300 characters |
{"redemption_id": "0193e5f6-0718-7293-a4b5-c6d7e8f90a1b", "message": "Undone. 100 points given back."}Still need help? Troubleshooting · [email protected]