How it works
The wallet is keyed to an identity, typically a user id or email, and holds a balance for each credit type the product uses. Purchases, grants, and refunds add to it; usage, holds, and expiry take from it. The wallet itself is a view over the ledger rather than a separate store of truth.
Identity is the subtle part. If the same person signs in to two of your apps with different user ids, they get two wallets unless the wallet is keyed to something stable they share, such as their verified email. Some products also attach an on-chain address so a wallet's credits can be represented as tokens.
Example
A user holds 1,200 "AI tokens" credits and 15 "export" credits. They export a report (−1 export) and run a summary (−30 AI tokens). The wallet now shows 1,170 AI tokens and 14 exports, and both deductions appear in its history with their references.
Credit wallet in Cred
Each end user has a balance per credit type in your project. Issuing with user_email gives one wallet across all your apps in the same project, whatever user_id each app uses, and users can also carry an EVM wallet address for credit types deployed as ERC-20 tokens.
Managing Credits docsQuestions
- Is a credit wallet a crypto wallet?
- Not by default. A credit wallet is an account in your product's database. It only involves a blockchain if you choose to represent credits as on-chain tokens, in which case the user also needs a crypto wallet address.
- Can one wallet be shared across apps?
- Yes, if the apps use the same credit system and key the wallet to a shared identity such as email. That lets customers buy once and spend in any of your products.