Docs
Usage-Based Billing (UBB) allows you to charge customers based on their actual consumption of your product or service. Setting up usage based billing in Chargebee is straightforward, enabling you to ingest and track usage, observe customer behavior, then define pricing, and generate invoices seamlessly. You can do this in the following key steps:
The test site is your sandbox environment to explore and validate the full flow of UBB. This guide will give you a quick summary of the steps to configure Usage Based Billing for your business. Visit the respective documents for detailed step-by-step configuration.
Before setting up Usage Based Billing in your Chargebee Billing site for your business, ensure the following prerequisites are met:
Everything begins with usage data. These events capture how your customers consume your product — such as an API call, a gigabyte of storage used, a message sent, or a seat activated. You may not choose to monetize every event immediately. However, ingesting usage data enables you to analyze consumption patterns, identify trends, and make informed monetization decisions over time.
The first and often the most challenging step in usage tracking and billing is data ingestion. Chargebee ensures that data ingestion is no longer a roadblock but a streamlined starting point for your usage tracking/usage based billing journey. You can seamlessly ingest your usage data into Chargebee without the need to reformat or modify it to fit specific templates or schema. Chargebee's usage ingestion is schemaless, designed to work with raw data, capturing and processing it directly as you provide it. This minimizes the need for manual intervention and streamlines your workflow. Chargebee supports three simple methods for importing usage events:
Each method ensures that your usage data is recorded accurately and ready for billing. Learn how to bring in your usage events into Chargebee Billing.
Once your raw (or relevant) usage data is flowing into Chargebee, the next step is to determine which aspects of that usage you want to track and potentially monetize. This is where metered features come in.
For example:
If you ingest API call events, you can define a metered feature such as “Number of API Calls.”
If you track storage consumption, you can create a metered feature like “Storage (GB).”
Metered features act as the bridge between raw usage data and monetization. They transform granular event data into measurable units that can be priced, billed, and reported on. Learn how you can define metered features in your Chargebee Billing site.
Once you’ve defined the usage you want to track (metered features), you can link pricing to each metered feature through plans and addons to determine how customers are charged based on their usage.
This is where you configure how a metered feature is associated with a plan or addon — including any included usage and how overages are charged. This mapping determines how customer consumption translates into billable amounts. By defining included quantities, pricing tiers, or overage rates, you establish the logic that governs how customers are charged based on their usage. Learn how you can link pricing for metered features in your Chargebee Billing site
This is an optional step. Once your usage ingestion, metered features, and pricing configuration are set up, the final step is to validate the billing flow. Waiting for your actual billing cycles can delay testing. You can use Chargebee Billing Time Machine, a testing utility that allows you to simulate billing period transitions in your test site.
Note:
Once you enter the Time Machine feature, the existing subscriptions and customer details will be erased, leaving you with an empty site. If you wish to take a backup of the data, we recommend you to export the data.
To test your usage based billing workflow using Time machine, follow these steps:
This validation ensures that:
With this validation complete, you can confidently launch your usage-based pricing model on your Live site.
Once your setup is complete, Chargebee automates the usage based billing process. Usage attributes are tracked via metered features for relevant subscriptions/customers. At the end of each billing period, Chargebee computes the invoice amount based on the customer's usage of the metered feature and price defined in the respective plan/addon.
Navigate to the Usage Summary section in the Subscription/Customer details page to review the usages.
Chargebee Billing Invoice clearly displays a break up of all charges based on customer's usages against each metered item.
Was this article helpful?