Pattern
- At order completion, filter the cart down to qualifying items (by SKU, category, tag — whatever your system uses).
- Optionally check the time-of-day / day-of-week window.
- Call
POST /points/issuewith points for the qualifying subtotal only.
Example: points only on coffee SKUs, 2–5 pm happy hour
Variations
- Bonus multipliers: send
points: qualifyingPoints * 2for double-points promotions on selected products. - Category exclusions: award full points but skip gift cards / alcohol by filtering them out of the subtotal.
- Split descriptions: issue two calls (with distinct
Idempotency-Keys) — one for base points, one for the bonus — so the customer sees both lines in their history.
Time-of-day rules on the redemption side don’t need any code: rewards have a built-in
time_active schedule that Rigaly enforces automatically. Product-specific earning, as shown here, is your code’s job by design.