Creating a Reward
Rewards are scoped to a program and priced in a linked asset.| Field | Required | Description |
|---|---|---|
name | Yes | Display name (1-255 characters, unique per program) |
description | No | Additional context (max 1000 characters) |
category | No | Grouping label (max 100 characters) |
redemption_type | Yes | UNIT_BASED or AMOUNT_BASED. Cannot be changed after creation. |
asset_id | Yes | Which asset this reward is priced in. Must be linked to the program. Cannot be changed after creation. |
unit_cost | Yes | Cost per unit (must be positive). For AMOUNT_BASED rewards, this is the minimum redemption amount. |
max_total | No | Global inventory cap (UNIT_BASED only). Null means unlimited. |
max_per_participant | No | Per-participant cap (UNIT_BASED only). Null means unlimited. |
status | Yes | Initial status. Most rewards start as DRAFT until configuration is finalized. |
available_from | No | When the reward becomes redeemable (UTC timestamp) |
available_until | No | When the reward stops being redeemable (UTC timestamp) |
metadata | No | Arbitrary JSON for your own use |
Reward Types
UNIT_BASED
Discrete quantities with a fixed cost per unit. Use for items like gift cards, merchandise, or experiences. When a participant redeems, the total cost isquantity * unit_cost. Inventory is tracked: each redemption increments redeemed_count globally and per participant. When redeemed_count reaches max_total, the reward status automatically changes to OUT_OF_STOCK.
AMOUNT_BASED
Flexible amounts without inventory tracking. Use for cashback, statement credits, or charitable donations. Participants specify anamount when redeeming. max_total and max_per_participant are not supported for this type.
Reward Status
| Status | Description |
|---|---|
DRAFT | Not yet available for redemption. Use while configuring. |
ACTIVE | Available for redemption (subject to availability window). |
OUT_OF_STOCK | Set automatically when redeemed_count reaches max_total. Reversals can restore inventory and revert the status to ACTIVE. |
ARCHIVED | Removed from default listings. Cannot be redeemed. Historical data remains. |
ACTIVE rewards can be redeemed.
Availability Windows
Restrict when a reward is redeemable by settingavailable_from and available_until. Both are optional. If both are set, available_from must be before available_until.
Managing Rewards
You can list, inspect, and update rewards through the API. Archived rewards are hidden from list results by default but can be included withinclude_archived=true.
redemption_type and asset_id cannot be changed after creation. All other fields can be updated.
Inventory Management
Inventory tracking applies toUNIT_BASED rewards only. Scrip maintains a global redeemed_count and a per-participant count, both updated atomically during redemptions and reversals.
max_totalcan be increased but not decreased below the currentredeemed_count- Use
DRAFTstatus while configuring, then switch toACTIVEwhen ready - When
redeemed_countreachesmax_total, the reward transitions toOUT_OF_STOCKautomatically UNIT_BASEDreversals decrementredeemed_count. If this brings inventory back belowmax_total, the reward returns toACTIVE