Raw Redemption
Debit an arbitrary amount from a participant’s balance:| Field | Required | Description |
|---|---|---|
program_id | Yes | Program context |
asset_id | Yes | Which asset to debit |
amount | Yes | Positive decimal amount |
description | Yes | Reason for the redemption (1-500 characters) |
idempotency_key | No | Prevents duplicate redemptions on retry. Same key + different payload returns 409. |
AVAILABLE balance and credited to the program’s configured redemption target.
Catalog Item Redemption
Redeem a specific item from the reward catalog:UNIT_BASED rewards, specify quantity (defaults to 1 if omitted). For AMOUNT_BASED rewards, specify amount instead.
The cost is calculated from the reward’s unit_cost and stored on the redemption record. For UNIT_BASED rewards, inventory is tracked: redeemed_count increments globally and per participant, and the reward status changes to OUT_OF_STOCK when max_total is reached.
See Rewards Catalog for setting up catalog items.
Redemption Targets
Each program configures where redeemed funds flow viaredemption_target_type. Most programs use SYSTEM_REDEMPTION to keep redeemed value separate from breakage.
| Target | Description |
|---|---|
SYSTEM_REDEMPTION | Default. Tracks redeemed value in a dedicated system account. |
SYSTEM_BREAKAGE | Combines with forfeited value in the breakage account. |
LEDGER_ENTITY | Routes to a specific ledger entity. Requires redemption_target_entity_id on the program. |
Reversals
Reverse a redemption to return funds to the participant:amount or quantity for a full reversal. Include it for a partial reversal. The type must match the original redemption: UNIT_BASED redemptions accept quantity, AMOUNT_BASED and raw redemptions accept amount.
reason is required (1-500 characters). Reversals are often reviewed during disputes or audits, so every reversal needs a human-readable explanation on record.
Reversal Status
Each reversal updates the redemption’sstatus:
| Status | Meaning |
|---|---|
COMPLETED | No reversals applied |
PARTIALLY_REVERSED | Some amount or quantity reversed, more can follow |
FULLY_REVERSED | Entire redemption reversed, no further reversals allowed |
reversed_amount and, for catalog items, reversed_quantity.
Inventory Restoration
ForUNIT_BASED catalog items, reversals decrement redeemed_count and the per-participant redemption_count. If a reward was OUT_OF_STOCK and the reversal brings inventory below max_total, the reward status returns to ACTIVE.
Lot Restoration
ForLOT-mode assets, reversals restore the specific lots consumed by the original redemption. Lots are restored in LIFO order (last in, first out) and retain their original metadata including expires_at and matures_at.
Viewing Redemptions
You can list redemptions per participant, fetch a single redemption by ID, or list the reversals attached to a redemption.Requirements
Both redemptions and reversals enforce the same base checks:- Participant must be
ACTIVE - Program must be
ACTIVE(notSUSPENDEDorARCHIVED) - Asset must not be archived
- Sufficient
AVAILABLEbalance for the requested amount - For catalog items: reward must be
ACTIVEand within its availability window