Creating a Program
A program only requires a name. You can set the enrollment policy and other options at creation or update them later.
The response returns a
program_id that you’ll use when sending events, creating rule sets and rules, and querying balances. Scrip also creates a default rule set for the program. Rules that omit rule_set_id are assigned to it.
See Rule sets when you need separate tracking, earning, or maintenance groups inside one program.
Redemption fulfillment
fulfillment_mode controls redemption creates that omit capture. INSTANT
captures during the create request. ASYNC authorizes the participant value
and returns a PENDING redemption for later completion, failure, or
cancellation.
pending_redemption_ttl supplies the program deadline for asynchronous
redemptions. If a request also supplies expires_at or ttl_seconds, the
earlier request or program deadline wins. When neither is set, Scrip uses 90
days. See Redemption lifecycle for the full
deadline and expiration contract.
The Program Wallet
Every program has a wallet. How it’s used depends on the asset’s issuance policy:- UNLIMITED credits mint new value directly. The wallet is bypassed. This is what most programs use.
- PREFUNDED credits draw from the wallet. You fund it up front, and every credit to a participant debits the wallet. When the wallet is empty, credits fail. This is how you enforce a fixed budget.
Linking Assets
Assets exist at the organization level. To use an asset in a program, it must be linked. When you create a new asset with aprogram_id, the link happens automatically. To share an existing asset across programs, link it manually:
An asset cannot be unlinked from a program if any ledger entries exist for that asset in that program.
Program State
Programs support the same state types as participants: tags, counters, and attributes. Use them for global logic that isn’t tied to any one participant. For example, a “first 1,000 signups” cap using a program-level counter:Program Status
You can pause or retire a program by updating its status:status to ACTIVE or SUSPENDED. To change behavioral settings such as on_unknown_participant or redemption targets, reactivate the program first.
Enrollment
Existing participants are automatically enrolled in a program the first time an event targets them in that program. This applies across all identity paths and requires no configuration. Inactive enrollments are reactivated. Enrollment status is per-program and separate from the participant’s ownstatus; see Participants: Auto-enrollment of existing participants.
The on_unknown_participant setting controls what happens when an event arrives for a participant that doesn’t exist yet:
Most programs use
CREATE for simplicity. Use REJECT when you need strict control over who can participate.
Automations
Programs can have automations that generate events on a schedule, at a specific time, or in response to participant state changes. Automations are scoped to a program and managed viaPOST /v1/programs/{id}/automations. See Automations for details.