Store Credit
Create, retrieve, update, and list store credit balances for customers.
Store credit is a balance of credit applied to a customer's future purchases. When a customer has available store credit, it can be automatically applied at checkout to reduce the amount charged to their payment method.
Illustrative content. Hand-authored to demonstrate the Standard/Advanced pattern; the production page will be generated from the VINR OpenAPI spec (roadmap item #1). Field names are representative.
The store credit objectAsk
idstringUnique identifier for the store credit record, e.g. sc_4Bk9mQ.
customerobjectExpandableThe customer this store credit belongs to. Expand to retrieve the full customer object.
amountintegerOriginal credit amount issued, in the smallest currency unit (e.g. cents).
currencystringThree-letter ISO currency code, e.g. USD.
balance_remainingintegerAmount of credit still available to redeem, in the smallest currency unit.
expires_atintegerUnix timestamp at which this credit expires and can no longer be redeemed, or null if it does
not expire.
createdintegerUnix timestamp when this store credit record was created.
Create store creditAsk
Issue store credit to a customer. Specify an amount, currency, and optionally an expiry date.
Retrieve store creditAsk
Fetch a store credit record by its ID.
Update store creditAsk
Update the expiry date on an existing store credit record. The balance_remaining is read-only and
adjusted automatically as the credit is applied to purchases.
| Parameter | Type | Description |
|---|---|---|
expires_at | integer | New Unix timestamp for expiry. Set to null to remove expiry. |
List store creditAsk
Returns a paginated list of store credit records. Use the customer filter to scope results to a
single customer.
| Parameter | Type | Description |
|---|---|---|
customer | string | Filter records by customer ID. |
limit | integer | Number of results to return. Default 10, max 100. |
Related eventsAsk
store_credit.created and store_credit.updated. See Events.