Member card and rewards
After you identify a member, show their card. Call:
GET /v1/memberships/{membership_id}/loyalty{ "balance": 3, "unit": { "label": "stamps", "presentation": "card" }, "program": { "id": "1d2e3f40-0000-4000-8000-000000000003", "name": "Coffee card" }, "cycle": { "seq": 3, "length": 10, "progress_pct": 30, "started_at": "2026-11-02T08:30:00Z" }, "punches": ["2026-11-02T08:30:00Z", "2026-11-09T12:05:00Z", "2026-11-20T10:15:00Z"]}The API reference has every field.
Reading the card
Section titled “Reading the card”balanceis in the program’s own unit: points, stamps or a cash value.unit.presentationsays how to draw it:card: a stamp card.puncheslists when each stamp in the current cycle was earned.counter: a points counter.punchesisnull.currency: a cash-like balance (cashback).balanceis money in minor units, andunitalso carriescurrency,minor_unitsandlocaleso you can format it (see Money). Forcardandcounterthese three arenull.punchesisnull.
cycleis the member’s current round on the program.lengthis the target (ornullwhen there is none) andprogress_pcthow full it is. When the target is reached, a reward is unlocked and a new cycle starts.
New presentation values may be added. When you meet one you do not know, show balance with unit.label.
The card straight from the lookup
Section titled “The card straight from the lookup”The lookup already returns balance, unit, cycle, cycle_length (for example 10 on a 10-stamp card, null when unbounded) and stamps_dates. For a simple till display, the lookup plus the rewards list below is enough: two calls per sale.
Balances lag the sale
Section titled “Balances lag the sale”Points and stamps are calculated after the sale is recorded, usually within seconds. If you read the card straight after recording a sale, it may still show the old balance. Do not add the points yourself.
Rewards
Section titled “Rewards”List the rewards the member can use now, at your store:
GET /v1/memberships/{membership_id}/rewards?external_store_id=store12| Query | Notes |
|---|---|
external_store_id or store_id |
Optional. Your store code or the LoyX store id; send one, not both. With a store, rewards limited to other stores are left out. |
limit |
1 to 200, default 50. |
cursor |
From pagination.next_cursor of the previous page. |
{ "data": [ { "_id": "2c4d6e80-0000-4000-8000-000000000006", "membership_id": "6f1c3e1a-0000-4000-8000-000000000001", "offer_id": "9e8d7c6b-0000-4000-8000-000000000007", "title": "Free coffee", "benefit": { "kind": "free_item", "quantity": 1, "percent": null, "amount": null, "price": null, "per": null, "pay_quantity": null, "description": null }, "terms_and_conditions": ["One per visit."], "valid_from": "2026-11-20T00:00:00Z", "valid_to": "2026-12-20T23:59:59Z", "max_redemptions": 1, "times_redeemed": 0, "created_at": "2026-11-20T10:16:00Z" } ], "pagination": { "limit": 50, "has_more": false, "next_cursor": null }}- Only active rewards are listed. Rewards from a paused campaign are hidden. Newest first.
_idis the member’s own reward. Keep it: using rewards at the till will take this id.benefitis the benefit at the store you asked about; a reward can differ between stores. Without a store, it is the reward’s default benefit.benefit.kindis one ofpercent,amount,fixed_price,free_item,text,bundle_price,bundle_percent,multibuy. More kinds may be added: show thetitlefor a kind you do not know. Money fields carryminor_unitsandlocale.
| Error | Meaning |
|---|---|
400 store_reference_ambiguous |
You sent both store_id and external_store_id. |
400 invalid_cursor |
The cursor is not one we gave you. Start from the first page. |
404 |
The member, or the store, does not exist for this brand. |
Showing rewards is live. Using a reward at the till (reserve, then commit or release) is coming: see Reserve and use rewards under Preview.