Credit units power credit-based billing for usage-based products, letting you get paid upfront while customers spend credits as they use your product's features. Each credit unit is a customizable consumption unit, such as AI credits or API calls, that you define beyond Chargebee's built-in pricing dimensions.
When should you use credit units?
Credit units are a good fit when:
- Customers have widely varying usage patterns
- Business costs scale with consumption
- Upfront cash flow is preferred
How does it work?
- Create a credit unit (say, "AI Credits")
- Configure credit grants on your plans (e.g., a Pro Plan priced at $20 USD includes 100 AI Credits)
- Track customer usage in real time
- Bill for actual consumption
What happens when credits are exhausted?
Once the provisioned credits are exhausted, further consumption draws from the overdraft balance up to its configured limit. Configure overdraft behavior for a credit unit using is_unlimited and overdraft_amount, so customers can continue consuming, purchase more, or pay for overage depending on your setup.
Sample Credit unitJSON
API Index URL
Credit Units attributes
The current lifecycle status of the credit unit.
Grant configuration for items and grant configuration overrides at subscription layer can be created for active credit units.
Grant configuration for items and grant configuration overrides at subscription layer cannot be created for archived credit units. Already configured grants for credit units continue to be effective.