Guest baskets never accrue loyalty points or progress — there is no member to
credit. Only OAuth apps owned by your Merchant account are eligible to mint
guest tokens; apps shared across merchants (Partner, whitelabel, or global
apps) cannot. This flow must be enabled for your account by Thanx.
Minting a guest token
Exchange your Merchant-owned OAuth app’sclient_id / client_secret (in the
JSON body, or as HTTP Basic) for a guest access token with
Create Guest Token
(POST /loyalty-api/oauth/token, grant_type=client_credentials). The token
lasts 1800 seconds (30 minutes) and has no refresh token — re-mint once it
expires. Keep the client_secret on your server; never ship it in a client or
mobile app build.
Guest basket requests
Once minted, use the guest token exactly like a member’s Bearer token on Create & Update Basket — the basket shape and lifecycle are unchanged. The only differences: a guest basket must include apromo_code and
can never carry rewards or points_products, and a guest token only works on
POST /baskets — not on
Get Account or
Qualifying Rewards for a Basket.
Guest basket errors
Promo code rejections on a guest basket are deliberately generic: whether the code is unknown, expired, fully redeemed, not valid at this location or time, or the order minimum is not met, the response is always the same generic message,This promo code is not valid. A promo_code that fails format validation (longer than 64 characters,
or containing control characters) is rejected earlier with a standard 400
validation error instead.
Guest traffic is rate limited per merchant, not per shopper — your server
makes these calls, so Thanx cannot tell your shoppers apart. Rate-limit individual shoppers on your side, and on a
429
wait the Retry-After seconds before retrying.