What is Credit-Based Billing?
Credit-Based Billing gives you a flexible system to issue credit entitlements to customers as part of your products. Instead of charging per-use or limiting access through feature flags, you allocate a pool of credits that customers draw from as they use your service. Credits are ideal for:- AI and LLM platforms: Grant tokens or generation credits per plan tier
- API services: Allocate API call credits with overage pricing
- Infrastructure platforms: Issue compute hours or storage credits
- Communication services: Provide message or minute credits per subscription
- SaaS with consumption tiers: Bundle included usage into credit pools

Credits appear as entitlements on your products and show in checkout, customer portal, and subscription details.
Core Concepts
Credit Types
When creating a credit, you choose between two types:- Custom Unit
- Fiat Credits
Credit Lifecycle
Credits follow a clear lifecycle from issuance through consumption:Credits Issued
Credits Consumed
Credits Expire or Roll Over
Overage Handling
Grant Sources
Credits can be granted from multiple sources:Creating Credits
Create credit entitlements in the Products → Credits section of your dashboard. Each credit defines the unit, precision, expiry rules, and lifecycle behavior.
The Credits tab under Products shows all your credit entitlements.
Navigate to Credits
Configure Basic Information

The credit creation form with all configuration sections.
Set General Settings
- Custom Unit - Define your own metric (tokens, API calls, compute hours). Requires a Unit Name (e.g., “Platform tokens”) and a Precision setting.
- Fiat Credits - Credits represent real currency value. Requires a Unit Currency selection (USD, EUR, GBP, INR, etc.).
0- Whole numbers (best for countable items like API calls)1- One decimal (0.0)2- Two decimals (0.00) - default3- Three decimals (0.000)
- 7 days, 30 days (default), 60 days, 90 days, Custom, or Never
Configure Subscription Settings (Optional)
- Max Rollover Percentage (0–100%) - Limit how much carries over
- Rollover Timeframe - How long rolled-over credits remain valid (e.g., 1 Month)
- Max Rollover Count - Maximum consecutive rollovers before credits are forfeited
- Overage Limit - Maximum credits customers can consume beyond their balance
- Price Per Unit - Cost per additional credit when overage is enabled (with currency selector)
- Forgive overage at reset (default) - Usage beyond the credit limit is tracked but not billed. Balance resets each cycle.
- Bill overage at billing - Usage beyond the credit limit is charged on the next invoice, then the balance resets.
- Carry over deficit - Usage beyond the credit limit carries forward as a negative balance into the next cycle.
- Carry over deficit (auto-repay) - Deficit carries forward and is automatically repaid from new credits in the next cycle.
Create Credit
Attaching Credits to Products
Créditos são anexados aos produtos como direitos no fluxo de criação ou edição do produto. Você pode anexar até 5 créditos por produto. Créditos funcionam com todos os três tipos de precificação.Subscription Products
For subscriptions, credits are issued per billing cycle and can be configured with proration, trial credits, and cycle-specific settings.Create or Edit a Subscription Product
Open Entitlements Section

The Entitlements section in the product form with Credits, License Key, and Digital Product Delivery options.
Select Credits to Attach

The Add Credits panel lets you select existing credits or create new ones.
Configure Credit Settings

Credit configuration showing per-cycle amount, trial credits, proration, and custom settings.
Review and Add

Review attached credits before adding them to the subscription.
One-Time Payment Products
For one-time payments, credits are issued once at the time of purchase.Create a One-Time Product

Single Payment pricing selected for a one-time credit product.
Attach Credits
Usage-Based Billing Products
For usage-based products, credits are linked to meters and automatically deducted based on real-time consumption events.Create a Usage-Based Product

Usage Based Billing pricing type with meter configuration.
Add a Meter

The Select Meter panel with meter configuration and credit toggle.
Enable Credit Billing on the Meter
1000, then 1,000 API calls consume 1 credit.
Credit attached to a meter with per-unit conversion rate.
Configure Credit Issuance

Configure how many credits to issue and whether to use default settings.
Verify Attachment

Meter with credit attached showing price, threshold, and credit name.
Credit Settings
Rollover
Rollover lets unused credits carry forward to the next billing cycle instead of expiring.Overage
Overage controls what happens when a customer’s credit balance reaches zero mid-cycle.Expiration
CreditExpired ledger entry. If rollover is enabled, the rollover percentage is applied before expiration, and only the remainder expires.Usage Billing with Credits
When credits are linked to usage meters, the system creates a powerful consumption-based billing model. Customers receive a credit allocation, and usage events automatically deduct from their balance.
The Usage Billing dashboard shows meter events with units consumed, credits consumed, and customer details.
How Meter-Based Credit Deduction Works
- Seu aplicativo envia eventos de uso - Cada evento inclui um ID de cliente, nome de evento e metadados
- Medições agregam eventos - Usando Contagem, Soma, Máximo ou Último
- Créditos são deduzidos automaticamente - Um trabalhador em segundo plano processa eventos a cada minuto, converte unidades de medição em créditos usando sua taxa configurada e deduz do saldo do cliente usando FIFO (primeiro a entrar, primeiro a sair)
- Excedente é monitorado - Se o saldo de crédito chegar a zero e o excedente estiver habilitado, o sistema rastreia o uso excedente para faturamento no final do ciclo
Meters Panel
The Usage Billing dashboard includes a Meters panel listing all defined meters with their aggregation type:Customer Experience
Checkout
When a customer purchases a product with attached credits, the checkout page displays the included credits as part of the product offering.
Checkout shows included credits with the product, making the value proposition clear.
Customer Portal
Customers can view and manage their credit balances in the Customer Portal under the Credits section.
The Customer Portal shows available balance and full transaction history.
- Available Balance - Current credit balance displayed prominently
- Credit Tabs - Switch between different credit types (e.g., “OpenAI Credits”, “Usage Tokens”)
- Recent Transactions - Full history with date, transaction ID, type, amount, and running balance
Subscription Details
The subscription detail page shows credit entitlements alongside other plan information.
Subscription details show credit allocation, remaining balance, and renewal date.
- Credit allocation per billing cycle (e.g., “1000 credits each cycle”)
- Remaining balance (e.g., “7500 credits remaining”)
- Renewal date for next credit issuance
- Usage History tab with meter-level breakdown showing units consumed, thresholds, unit prices, and total costs
Transaction Details
Payment transaction pages include an Entitlements section showing all entitlements delivered with the payment, including credits.
Transaction details show credits alongside other entitlements like license keys and digital downloads.
Managing Credits
Dashboard Views
Credit Entitlements List
View all your credit entitlements in Products → Credits. The table shows credit name, expiry settings, and provides quick actions for editing or archiving.
Credits listing with total count, creation button, and management actions.
Customer Credit Details
View a specific customer’s credit balances and transaction history from Customers → [Customer Name] → Credits.
Customer detail page showing credit balance and full transaction ledger.
- Credit Selector - Switch between different credit entitlements
- Available Balance - Current balance in large, prominent display
- Apply Credit/Debit - Button to manually adjust the customer’s balance
- Recent Transactions - Full ledger with date, transaction ID, type, amount, and running balance
Manual Adjustments
You can manually credit or debit a customer’s balance directly from the dashboard:Navigate to Customer
Open Credits Tab
Apply Credit or Debit
Confirm
ManualAdjustment ledger entry with full audit trail.Credit Ledger
Every credit operation is recorded in the credit ledger, providing a complete audit trail:Webhooks
Credit-Based Billing fires webhook events for every credit lifecycle change. Use these to keep your application in sync with credit balances, trigger notifications, or build custom billing workflows.credit.added até credit.manual_adjustment) incluem a carga completa CreditLedgerEntry com saldo antes/depois, excesso antes/depois, referência de origem e o metadata da assinatura ou pagamento da fonte da concessão (vazio para concessões criadas diretamente via API). O evento credit.balance_low inclui a configuração de limite e o saldo atual.
Credit Webhook Payloads
API Management
Create Credit Entitlements
Create Credit Entitlements
Create Credit Entitlement
List Credit Entitlements
Manage Credit Entitlements
Manage Credit Entitlements
Get Credit Entitlement
Update Credit Entitlement
Delete Credit Entitlement
Undelete Credit Entitlement
Grant and Adjust Credits
Grant and Adjust Credits
Create Ledger Entry
Query Balances and Ledger
Query Balances and Ledger
List Balances
Get Customer Balance
List Customer Grants
List Customer Ledger
Integration Example
Initialize the Dodo Payments client:Real-World Examples
AI SaaS Platform
AI SaaS Platform
- Credit Type: Custom Unit (“AI Tokens”)
- Precision: 0 (whole tokens)
- Rollover: 25% max, 1-month timeframe
- Overage: Enabled, bill overage at billing
- Meter:
ai.generationwith Sum aggregation ontokensfield
API Gateway
API Gateway
- Credit Type: Custom Unit (“API Calls”)
- Precision: 0 (whole calls)
- Rollover: Disabled
- Overage: Developer+ plans allow overage (forgive at reset), Free plan disables overage
- Meter:
api.requestwith Count aggregation
Cloud Storage Service
Cloud Storage Service
- Credit Type: Custom Unit (“GB-hours”)
- Precision: 2 (two decimal places)
- Rollover: 50% max, carries over once
- Overage: Enabled with 200% limit
- Meter:
storage.usagewith Sum aggregation
Best Practices
- Start simple: Begin with a single credit type and no rollover. Add complexity based on customer feedback and usage patterns.
- Set clear expectations: Display credit allocations, remaining balances, and overage pricing prominently in your product pages and customer portal.
- Use meaningful units: Name credits after what they represent (e.g., “API Calls”, “AI Tokens”) rather than generic terms. This helps customers understand value.
- Configure expiry thoughtfully: Short expiry windows (7 days) drive urgency but may frustrate customers. Longer windows (30–90 days) are more customer-friendly for most SaaS products.
- Monitor low balances: Set low balance thresholds to alert customers before they run out, reducing surprise overage charges.
- Test in test mode: Create credits, attach them to test products, and simulate the full purchase → usage → deduction → expiration cycle before going live.