Customer Credits is in Experimental preview.
What is an account?
An account holds a credit balance for one customer. Think of it as a digital wallet — you create it, add credits to it, and debit from it when the customer uses them. Most customers need just one account. But you can create multiple per customer for different purposes:loyalty_points
Earned from purchases
referral_credits
Earned from inviting friends
promo_credits
Given during campaigns
Creating accounts
Pass acustomer_id and you’re done. Everything else is optional.
Options
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id | string | ✅ | The customer this account belongs to |
name | string | A label for this account. Default: "default". Unique per customer | |
unit_label | string | What to call the units — “points”, “gems”, “credits”. Default: "credits" | |
initial_balance | string | Seed the account with credits on creation |
If you set
initial_balance and the initial credit fails, the account isn’t
created either. No orphaned accounts.Checking balance
One call to see what’s available.Point-in-time balance
Need to know what the balance was last Tuesday? Pass anat parameter.
Listing accounts
limit, starting_after, and ending_before.
Getting a single account
Account lifecycle
Accounts have three states. You can move between them as needed.Freeze — pause an account
Temporarily block all credits and debits. The account stays readable.Unfreeze — resume an account
Close — permanently retire an account
Balance and history stay readable forever, but no new transactions are allowed.| Status | Can credit/debit? | Can read? | Use case |
|---|---|---|---|
active | ✅ | ✅ | Default |
frozen | ❌ | ✅ | Temporarily paused |
closed | ❌ | ✅ | Permanent |
Next steps
Transactions
Credit, debit, reverse, and view history.
Recipes
Step-by-step guides for common patterns.
API Reference
Full endpoint schemas.
Introduction
Back to overview.