LOT-mode assets track every credit separately.
This is useful when points need to expire after a fixed window (e.g., 12 months from issuance), when rewards should vest before becoming spendable (e.g., a referral bonus that unlocks after 30 days), when auth and settlement events need to match by reference_id (the auth/settlement pattern), or when reporting needs to preserve the issuer of redeemed value.
Assets configured with SIMPLE mode do not create lots. They track a single balance per bucket. See SIMPLE vs LOT Mode for a comparison.
How Lots Work
When aLOT-mode asset is credited, a new lot is created:
Lot Lifecycle
A lot moves through a series of statuses from creation to consumption or expiration.Expiration
Setexpires_at on a CREDIT action to give lots a deadline. The value can be a positive relative duration, a fixed timestamp, or a ${{ }} expression that resolves to either. To see when outstanding value will expire across a program or asset, for breakage estimation or forecasting, use the expiration schedule report.
A relative duration counts from the moment the lot is created, which is when the event is processed, not the event’s event_timestamp:
${{ }} expression sets a per-event deadline. The expression must resolve to a string in one of the two forms above. This is how you get occurrence-based or calendar-exact expiry: your backend computes the timestamp and sends it in event_data:
expires_at exactly. From that moment the lot is excluded from every operation that consumes or reserves value, so the credits cannot be spent even before the bookkeeping catches up. The bookkeeping follows within a few minutes: a background sweep marks the lot EXPIRED, posts the forfeited value to breakage as an EXPIRATION journal entry, and emits a balance.expired webhook.
Until the sweep runs, the balances API still includes the expired value in available, so a balance read in that brief window can show credits that can no longer be spent. The expiration schedule report accounts for the same window: value already past expires_at but not yet swept appears under expiring_before_window, then drops out of the report once forfeited.
Durations accept h, d (24 hours), and w (168 hours) units, plus the standard Go units down to seconds and below (m, s, ms). Units can be combined ("1w2d12h") and fractional values are allowed. Months and years are not accepted because their length varies by calendar date. For an approximate policy, use days ("180d" for approximately six months). For an exact calendar policy (“expires on the same day six months later”), compute the date in your backend, include it in event_data, and resolve it through a ${{ }} expression. Use a literal fixed timestamp only when every lot should share the same deadline.
Vesting
Setmatures_at on a CREDIT action to create a vesting period. Lots credited with a future matures_at land in DEFERRED status and automatically transition to AVAILABLE when the date passes. Deferred lots are excluded from debit operations.
DEFERRED cannot be targeted as a bucket for writes. It is read-only and available as a filter in query endpoints (e.g., status=DEFERRED on the lots list, or bucket=DEFERRED on journal entries).
Oldest-First Spending
When debiting aLOT-mode asset, Scrip spends the oldest eligible lots first:
Viewing Lots
Inspect a participant’s lots for a specific asset:Lot-Aware Operations
Hold, release, and forfeit operations onLOT-mode assets are lot-aware:
Lot bucket transitions (
AVAILABLE ↔ HELD) update the lot row in place, preserving the lot UUID across holds, releases, and settles. Partial transitions split the remainder into a new lot.
These operations return a lots_processed array showing which lots were affected and by how much:
SIMPLE vs LOT Mode
The asset’sinventory_mode determines whether credits are tracked individually or as a running total.
Use
SIMPLE for balances with no per-credit lifecycle or provenance needs. Use LOT when expiration, vesting, auth/settlement matching, oldest-first spending, issuer attribution, or partner settlement matters.
expires_at and matures_at fields on CREDIT actions are silently ignored for SIMPLE-mode assets. No error is returned.