Accounts & Users
Learn how Credits accounts map to your end-users and how to integrate account creation into your app.
What is an account?
An account in Credits represents one of your end-users or customers. Each account has its own credit balance, transaction history, and plan assignments. Think of it as a 1:1 mapping to a user in your system.
External IDs
Every account can have an external_id that links it back to your own user system. This lets you look up a Credits account using the same ID you already use in your database (e.g. your auth provider's user ID, a Stripe customer ID, or any unique identifier).
When to create an account
Create a Credits account when a new user signs up in your app. This is typically done in your signup handler or webhook — right after you create the user in your own database, make an API call to create a corresponding Credits account with the user's external ID.
Example integration flow
- User signs up in your application
- Your backend creates a Credits account with the user's ID as
external_id - Assign a plan to the account (e.g. a free tier with starter credits)
- Use the external ID in all subsequent API calls to check balance, reserve credits, etc.