Creating an asset
201 Created. Send an Idempotency-Key header to make a retry safe.
Assets are created at the organization level and linked to the programs you name. They can be shared across programs.
Inventory mode
Decide the inventory mode before you issue any value; it cannot change later.
Choose
SIMPLE only when the balance can be one pool. A SIMPLE asset cannot later tell you which program, campaign, or credit issued the value a participant redeemed.
Choose LOT when individual credits carry meaning. For example, an airline program where points expire 18 months after they’re earned should use LOT. Each credit becomes a lot with its own expiration date, and from that date on the participant cannot spend the lot.
Pending card rewards also need LOT; see Authorization and settlement. So does event reversal: credits on a SIMPLE asset are listed in ineligible_entries with reason SIMPLE_ASSET. If you might add either later, create the asset as LOT from the start.
A fixed budget alone does not require LOT: either mode works with PREFUNDED issuance.
See Lots and expiration for more on how lots work.
Issuance policy
Most programs start with
UNLIMITED. Use PREFUNDED when you have a hard cap, like a “$50,000 Summer Promo” where the program wallet is funded once and credits stop when it’s empty. See Programs for how to fund and burn.
Scale
The number of decimal places for all amounts on this asset. Any value from0 to 18.
How extra decimal places are handled depends on where the amount comes from. Amounts computed by rule actions (
CREDIT, DEBIT, and the others) are rounded half-up to fit the scale: crediting "1.009" on an asset with scale: 2 records "1.01". Amounts you pass to the balance endpoints (adjust, hold, release, forfeit) and to redemptions are not rounded: a value with more decimal places than the scale is rejected with 422 invalid_scale. Money amounts end to end walks through both paths.
Money amounts end to end
When tracking cashback or money rewards, we recommend tracking amounts in integer minor units (such as cents for USD, withscale: 0) and sending integer cents on your events ("amount_cents": 4230 for a $42.30 purchase). Using integer cents avoids floating-point rounding edge cases in rule expressions:
- Rule actions round automatically: For a
$42.30(4230cents) purchase,4230 * 0.05 = 211.5, which Scrip rounds half-up to the asset’sscale(212cents). - Direct API calls require exact scale: When calling balance operations or redemptions directly, pass amounts with no more decimal places than the asset’s
scale(for example,"250"for$2.50on ascale: 0cents asset); extra decimal places return422 invalid_scale.
Value per unit
value_per_unit records what one unit of the asset is worth in money (for example, $0.01 per point). It never changes a participant’s balance; Scrip uses it in four places:
- The program activity report values each program’s outstanding balances in money.
- A reward source created without a
default_rateusesvalue_per_unitto calculate gift-card point prices automatically. - A redemption sent with a
face_valueis priced in points with it, unless the reward sets its ownvalues_per_unitfor that currency. See Redemptions. GET /v1/participants/{participant_id}/balancesandGET /v1/participants/{participant_id}returnavailable_value, what each balance’savailableis worth in money.
POST /v1/assets or PATCH /v1/assets/{asset_id} (or pass null to clear it):
Currency assets
If an asset’ssymbol is an uppercase ISO 4217 currency code (such as USD) and its scale matches that currency’s standard decimal places (2 for USD, 0 for JPY), Scrip automatically defaults value_per_unit to {"amount": "1", "currency": "USD"} unless you provide a custom value. For a USD asset with scale: 0 that tracks cents, set {"amount": "0.01", "currency": "USD"} explicitly.
Examples
The table below shows common asset configurations. Symbols are unique in your organization, so each row uses a different one.Asset sharing
An asset can be linked to more than one program, so participants earn the same asset in each of them. To share it from the start, list every program inprogram_ids when you create it:
program_ids lists the programs in the order you sent them. If one is missing or not ACTIVE, no asset is created: the request returns 404 program_not_found or 400 invalid_status, and param names that program, such as program_ids[1].
To link an existing asset to another program, use POST /v1/programs/{program_id}/assets; see Linking assets.
For a PREFUNDED asset, each program has its own wallet balance. Funding one program doesn’t affect another.
If you need to know which program issued the value a participant redeems, create the shared asset as LOT. A SIMPLE shared asset can still report total redemptions by the program they were redeemed through, but not which program issued the redeemed value.
For example, a member earns 100 points through Program A and 50 points through Program B, then redeems 120 points through Program B. With LOT, redemption attribution can report 100 points issued by Program A and 20 issued by Program B, all redeemed through Program B. With SIMPLE, the report can show 120 points redeemed through Program B, but the original issuer split is no longer available.
Updating assets
You can updatename, max_transaction_amount, and value_per_unit, and set status to ARCHIVED to permanently retire the asset. symbol, inventory_mode, issuance_policy, and scale are locked after creation.
200 with the updated asset:
max_transaction_amount as a positive decimal string to set a ceiling, or as null to remove it.
Assets have no DELETE. status accepts only ARCHIVED, so you cannot reactivate an archived asset. An archived asset cannot move value: credits, debits, holds, transfers, and redemptions on it return 422 asset_archived, and an event whose rule moves it fails with that error_code.
Add participants
Create the participants who earn and spend the asset.
Expire or vest credits
How
LOT-mode assets track each credit.