Skip to main content
An asset defines the unit of value participants earn and spend. Points, cashback dollars, hotel nights, referral credits, promotional tokens. Each asset has its own ledger, and every credit has a corresponding debit somewhere in the system. Three settings define how an asset behaves: inventory mode, issuance policy, and scale. All three are set at creation and cannot be changed afterward.

Creating an Asset

curl -X POST https://api.scrip.dev/v1/assets \
  -H "Authorization: Bearer $SCRIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "program_id": "{program_id}",
    "name": "Loyalty Points",
    "symbol": "PTS",
    "inventory_mode": "SIMPLE",
    "issuance_policy": "UNLIMITED",
    "scale": 0
  }'
FieldRequiredDescription
program_idYesLinks the asset to a program on creation
nameYesDisplay name (1-255 characters)
symbolYesShort code like PTS, NIGHTS, USD (1-16 alphanumeric characters, unique per org)
inventory_modeYesSIMPLE or LOT
issuance_policyYesUNLIMITED or PREFUNDED
scaleYesDecimal precision, 0 to 18
max_transaction_amountNoOptional per-transaction ceiling. Any single credit or debit exceeding this value is rejected. Positive decimal string.
Assets are created at the organization level and automatically linked to the specified program. They can be shared across programs.

Inventory Mode

ModeBehaviorUse when
SIMPLETracks a single balance per account. Credits and debits adjust the total.Basic points or credits without expiration
LOTEach credit creates a separate lot with optional expiration and vesting dates. Debits consume lots in FIFO order.You need point expiration, vesting periods, or vintage tracking
Use LOT when you need per-credit lifecycle tracking. For example, an airline program where points expire 18 months after they’re earned. Each credit creates a lot with its own expires_at, and expired lots are automatically excluded when the participant spends. If you just need a running balance, SIMPLE is simpler and faster. See Lots & Expiration for more on how lots work.

Issuance Policy

PolicyBehaviorUse when
UNLIMITEDCredits mint new value on demand. No program wallet funding needed.Open-ended programs where supply doesn’t need to be capped
PREFUNDEDCredits draw from the program wallet, which must be funded first. Credits fail if the wallet is empty.Fixed budgets or strict supply control
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 from 0 to 18.
ScaleExampleCommon use
0100Whole units: loyalty points, nights, referral credits
249.99Currency: dollars, euros, cashback
80.00000001High-precision tokens
Amounts that exceed the configured scale are rounded to fit. For example, crediting "1.009" on an asset with scale: 2 records "1.01". No error is returned. Use the round() function in CEL expressions when you need explicit control over precision before the amount reaches the ledger.
Working in cents: If your processor operates in minor units (e.g., 200 = $2.00), use scale: 0 and treat the asset as cents. Your application handles the display conversion. Alternatively, use scale: 2 and pass dollar amounts directly.

Examples

The table below shows common asset configurations. These are just examples to illustrate how the settings combine.
AssetSymbolScaleModePolicyDescription
Loyalty pointsPTS0SIMPLEUNLIMITEDEarn and redeem whole points
CashbackUSD2SIMPLEUNLIMITEDDollar-denominated rewards
Expiring pointsPTS0LOTUNLIMITEDPoints that expire after 12 months
Vesting rewardsTOKENS2LOTUNLIMITEDCredits that unlock after a waiting period
Promotional creditsPROMO2SIMPLEPREFUNDEDFixed-budget campaign with a capped pool

Asset Sharing

Assets can be linked to multiple programs. This lets participants earn the same asset across different campaigns.
POST /v1/programs/{programId}/assets
{"asset_id": "{asset_id}"}
When using PREFUNDED assets, each program maintains its own wallet balance independently. Funding one program doesn’t affect another.

Updating Assets

You can update an asset’s name, symbol, status, and max_transaction_amount after creation. inventory_mode, issuance_policy, and scale are locked because they affect ledger behavior.
PATCH /v1/assets/{id}
{"name": "Premium Points", "max_transaction_amount": "5000.00"}
Set max_transaction_amount to null to remove the ceiling.