Docs
Let's consider a business "Acme Inc." that provides automation solutions for SaaS companies. Customers are charged based on the number of automation tasks executed every month. Acme targets customers with varying automation needs, wherein most users have a predictable number of requests each month and even customers with high-volume requests.
Let us look at how Chargebee's usage-based billing can be applied for Acme.
Acme adopts a hybrid pricing model combining:
Included Usage (customer is entitled to certain features/quotas via fixed platform fee)
On-demand Usage (customer pays for any excess usage via pay-as-you-go fee)
Let's look at how to automate usage-based billing for Acme using Chargebee:
Acme's product catalog must be set up with the following plans and addons:
| Plans & Addons | Name | Configuration |
|---|---|---|
| Plan 1 (Fixed fee for included usage) | Professional Monthly | Priced at $49/month with 100K tasks as included usage. |
| Plan 2 (Fixed fee for included usage) | Team Monthly | Priced at $99/month with 500K tasks as included usage. |
| Addon 1 (Usage-based fee) | Tasks Monthly | Priced at $0.1 per task (per-unit pricing). |
Acme can send usage events to Chargebee Billing through two API endpoints, Ingest a Usage Event for individual events, and Ingest Usage Events in Batch for bulk submissions.
Alternatively, Acme can also import usage events in bulk using the Chargebee Billing application user interface. The following event details must be passed along with other usage event data.
The following metered feature needs to be created to track the number of the tasks that are automated.
Metered Feature (F1) - Tracks the SUM of tasks executed.
Once the metered feature is created, the next step is to link pricing for the metered feature and map it with relevant plans and addons price points.
Link Items: For Acme's pricing requirement, the following plans and addons need to be linked:
Plans
Addon
Set included usage: This denotes specifying the included usage for the feature for the plan's billing period, in Acme's case specifying the number of tasks per month. Chargebee automatically tracks usage for the feature and when the included usage is exceeded, additional cost is calculated by multiplying the units purchased.
Specify the included usage as follows:
Plans
Addon
Once Acme implements all the steps mentioned above, Chargebee Billing begins to track usage and bills Acme's subscribers appropriately.
Let's take a look into a subscription record to see the usage summary:
Sample Subscription
Assume a customer, John Doe subscribes to the Professional Monthly plan and purchases 100K tasks/month. The subscription details are as follows:
Line Item 1: Professional Monthly
Line Item 2: Tasks Monthly
Usage Tracking
Billing
This setup allows Acme to scale billing based on actual usage while offering predictable pricing for customers within their plan limits.
Let's consider a business, DataStream Inc., that offers real-time data enrichment API to SaaS companies. DataStream’s customers have highly variable usage patterns. While some may make a few thousand API calls per month, others may make millions. To keep pricing simple and fair, DataStream wants to charge customers only for the API calls they make, without offering any bundled or included usage.
DataStream adopts a pure pay-as-you-go pricing model, where:
Let's look at how to automate usage-based billing for DataStream using Chargebee:
DataStream’s product catalog must be set up with the following plans and addons:
| Item Type | Name | Configuration |
|---|---|---|
| Plan | API Access Monthly | $0/month (This is mandatory) |
| Addon | API Calls Monthly | $0.05 per API call (per-unit pricing) |
Note:
DataStream can send usage events to Chargebee Billing whenever an API call is made.
Usage events can be sent using:
Event Trigger An event is triggered whenever a customer makes an API call and each usage event should include the mandatory attributes along with the api consumption data.
A metered feature is required to track API usage.
Metered Feature (F1) - Tracks the SUM of API calls.
This feature aggregates all API call usage recorded for a subscription within a billing cycle.
Once the metered feature is created, the next step is to link pricing for the metered feature and map it with relevant plans and addons price points.
Link Items: For DataStream's pricing requirement, the following plans and addons need to be linked:
Plans
Addon
Let’s walk through how usage is tracked and billed for a customer subscription.
Assume a customer, Jane Smith, subscribes to the API Access Monthly plan.
Subscription Line Items
If Jane makes 120,000 API calls in a billing cycle:
All usage is tracked via metered features and billed strictly based on actual consumption, without entitlements or included limits. This approach gives customers maximum flexibility while ensuring accurate, transparent billing based on real usage.
Was this article helpful?