Skip to main content
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 a customer_id and you’re done. Everything else is optional.

Options

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 an at parameter.

Listing accounts

Supports cursor-based pagination with 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.
Closing is permanent. If you might need the account later, freeze it instead.

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.