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
}'
| Field | Required | Description |
|---|
program_id | Yes | Links the asset to a program on creation |
name | Yes | Display name (1-255 characters) |
symbol | Yes | Short code like PTS, NIGHTS, USD (1-16 alphanumeric characters, unique per org) |
inventory_mode | Yes | SIMPLE or LOT |
issuance_policy | Yes | UNLIMITED or PREFUNDED |
scale | Yes | Decimal precision, 0 to 18 |
max_transaction_amount | No | Optional 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
| Mode | Behavior | Use when |
|---|
SIMPLE | Tracks a single balance per account. Credits and debits adjust the total. | Basic points or credits without expiration |
LOT | Each 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
| Policy | Behavior | Use when |
|---|
UNLIMITED | Credits mint new value on demand. No program wallet funding needed. | Open-ended programs where supply doesn’t need to be capped |
PREFUNDED | Credits 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.
| Scale | Example | Common use |
|---|
0 | 100 | Whole units: loyalty points, nights, referral credits |
2 | 49.99 | Currency: dollars, euros, cashback |
8 | 0.00000001 | High-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.
| Asset | Symbol | Scale | Mode | Policy | Description |
|---|
| Loyalty points | PTS | 0 | SIMPLE | UNLIMITED | Earn and redeem whole points |
| Cashback | USD | 2 | SIMPLE | UNLIMITED | Dollar-denominated rewards |
| Expiring points | PTS | 0 | LOT | UNLIMITED | Points that expire after 12 months |
| Vesting rewards | TOKENS | 2 | LOT | UNLIMITED | Credits that unlock after a waiting period |
| Promotional credits | PROMO | 2 | SIMPLE | PREFUNDED | Fixed-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.