StoredValueInstrument
object type
A StoredValueInstrument — a balance-bearing money instrument: gift_card (purchasable, reloadable-by-field, bearer) · gift_certificate (fixed-amount) · store_credit (refund/goodwill-born, customer-BOUND, never purchasable as a line). Dual-birth: immediate active (the issue entry rides the create) or staged inactive printed stock (activated at sale via the Order line arm, or directly via activateStoredValueInstrument). Selling/reloading one is an Order line (untaxed — basis instrument_sale; engine-invisible); redeeming one is an applyTender step-5 internal tender; store credit from a return mints via refundReturn method=store_credit. Doom is gated by CONFLICT/BALANCE_OUTSTANDING while value remains (zero via reason-coded adjust first — no silent money destruction).
Fields
| Field | Type | Notes |
|---|---|---|
id | ID ID! | The record’s id — a UUID the platform assigned when the record was created; every reference to this record uses it. |
sysId | String String! | The human-readable id, shaped like SV-… — stable for the record’s life. |
type | String String! | The kind of record — always StoredValueInstrument here. |
caption | String String! | The record’s display name — what people see it called. |
status | String String! | The record’s current state — one of active, inactive, depleted or doomed. |
parentId | ID ID! | The parent org group; for a StoredValueInstrument parentId === rootId (group-scoped — any org in the group redeems it). |
rootId | ID ID! | The id of your organization group — every record of yours carries the same one. |
createdAt | String String! | When the record was created, as a UTC timestamp. |
updatedAt | String String! | When the record last changed, as a UTC timestamp. |
revisionNum | Int Int! | How many times this record has been edited; the first save is 0. |
revision | ID ID! | The id of the record’s current edit — send it back with a change so an edit made in the meantime is refused instead of overwritten. |
refCaptions | RefCaption [RefCaption!]! | The captions of the records this one refers to, composed for you — one row per referenced id; see RefCaption. |
instrumentType | StoredValueInstrumentType StoredValueInstrumentType! | The canned type — immutable at birth. |
code | String String! | The normalized code (trim+uppercase; A–Z/0–9 start then A–Z/0–9/_/-, 4..64 — a money key needs collision room) — immutable at birth; burned at doom. |
reloadable | Boolean Boolean! | The reload law: true ⟺ a reloadable gift_card; forced false on certificate/credit (strict both ways). |
balanceMinor | Int Int! | The cached ledger sum (minor units) — stamped in the same transaction as every StoredValueEntry; never negative; never directly editable (adjust/redeem/reload are the only balance surfaces). |
currency | String String! | The instrument currency — the issuing org default stamped at birth. |
customer | OrderCustomer | The inline customer binding. |