Introducing the Chargebee CLI

Understanding Usage Based Billing

Introduction

Usage data is critical to your business as it provides clear insights into how customers consume and interact with your products or services. Usage refers to any measurable aspect of a customer's consumption of your product or service.

For example, usage could be:

  • Number of users accessing a SaaS platform.
  • Number tokens processed by the LLM(Large Language Model).

The usages mentioned here are valuable for monetization, billing, and cost tracking purposes. They do not refer to product analytics, which typically involves clickstream data.

Chargebee Billing allows you to track usage data for your products and services accurately. As the single source of truth for your raw usage data, Chargebee empowers you to track usage based patterns, make important decisions about product packaging, pricing, and manage usage based billing.

Most businesses understand which features of their product or service they want to monetize. However, the full potential often remains untapped without analyzing customer usage patterns. Chargebee unlocks this potential with usage data. If you already know what you want to monetize, Chargebee enables you to move forward with confidence. Additionally, Chargebee's usage events data provides valuable insights, allowing you to identify the features or services that are best suited for monetization.

Usage Based Billing Terminology in Chargebee Billing

Following are some key terms around usage tracking and billing that you can familiarize yourselves with:

Usage Events: "Usage Events" are specific actions triggering usage measurements. For Artificial Intelligence tools, events could include input tokens and output tokens. In cloud storage, events could include data uploads, downloads, storage duration, API calls, and data transfers.

The associated usage event data for these actions are sent Chargebee Billing to be tracked. Let's look at some examples:

The usage event data for a Data Upload event includes properties like storage, file type, region, and so on.

{
  "event_type": "file_upload",
  "timestamp": "2025-01-15T12:34:56Z",
  "customer_id": "12345",
  "file_size_gb": 0.5,
  "file_type": "image/jpeg",
  "region": "us-east-1"
}

Similarly for API call event, the usage event data includes properties like api method, size of request, and so on.

{
  "event_type": "api_request",
  "timestamp": "2025-01-15T14:15:32Z",
  "customer_id": "12345",
  "api_method": "get_file_metadata",
  "request_size_kb": 1.4,
  "response_size_kb": 10.5
}

Note that Usage Events are NOT the same as Chargebee Billing Events.

Ingestion: This refers to the process of bringing usage events data into Chargebee Billing that triggers usage measurements for billing and data analytics. For example, each data upload into a cloud storage or processing service or each photo edited by an AI tool can be considered a usage event. Bringing this usage event data into Chargebee Billing for usage computation refers to ingestion. The data ingestion for Chargebee Billing can be done via Usages API, bulk import via UI, or manual data addition via UI.

Metered Features: Metered features are specific capabilities or aspects of your product or service that can be tracked based on customer usage along with predefined entitlements. After configuring filtering and aggregation rules, metered features can be associated with:

  • Usage based items: When associated with usage based items, all the usage is referred to as on-demand usage and customers get charged accordingly.
  • Non-usage based items: When associated with non-usage based items, entitlement limits can be defined which is referred to as included usage in the item purchased.

Metered feature creation is a pre-requisite for aggregation. Aggregation happens based on the mathematical operation defined in the metered feature. Some examples of metered features are API Calls(charging customers based on the number of API requests they make), Data Usage(billing based on the amount of data consumed in GB), No. of users(billing based on the number of users who have signed up).

Aggregation: This refers to the process of combining and summarizing usage data over a specific period or across multiple instances. It involves gathering individual usage measurements from various sources or data ingestions and consolidating them into a cohesive view for billing and analytics purposes. For example, it could be sum of input/output tokens in an AI bot, count of images edited by an AI tool or sum of number of characters translated by an AI tool. It helps you generate accurate invoices by presenting a comprehensive overview of the resources consumed by subscription during a specified time period.

Credit unit: Prepaid credits is a monetization model in which customers pay in advance for a balance of credits and then spend those credits as they use your product's features. The currency you define for the credits, for example, AI Credits is called a credit unit.

Entitlements: An entitlement is the included usage allowance granted per metered feature/ product to a customer by the plan or addon they subscribe to. Each metered feature carries its own limit, and as usage events are ingested, they draw down against that limit. Any usage beyond that limit is considered as an overage.

Usage Based Billing: While standard billing typically involves a fixed monthly fee or a predetermined pricing tier, Usage Based Billing(UBB) is a pricing model where customers are billed based on their actual usage of your product or service. In Chargebee Billing you can track usage and bill your customers for the following pricing models:

  • Entitlement based pricing model (Included usage defined per product)
  • Pay-As-You-Go pricing model (On-demand usage)
  • Prepaid credits (Common credit grant used across multiple products)
  • Hybrid pricing models (Included entitlement usage + On-demand usage) and (Included credit grant + On-demand credit usage)

Refer to the solution guides to set up your pricing model in Chargebee Billing.

Usage Analytics: Chargebee tracks usage data accurately, aligning it with your business logic and operational needs. It helps you generate meaningful usage based insights, empowering you to understand customer behavior, usage trends, and billing dynamics effortlessly. With usage metrics, you can:

  • Track how/how much of your product features are being used by different customer cohorts.
  • Create personalized pricing plans, improve resource allocation, and develop targeted upsell or cross-sell strategies.
  • Understand peak demand or dull periods, and uncover opportunities to optimize your services as required.
  • Minimize billing disputes or revenue leakage with scale when your business grows and customer needs evolve.

You can track the included usages granted and consumption, credit grant and drawdown via the credit ledger, and the overages with their charges.

Key features

The following are the key capabilities of usage based billing in Chargebee Billing:

  1. Schemaless usage ingestion
  2. Metered features for usage data aggregation
  3. Entitlement based billing for included usages on a product level
  4. Prepaid credits to be used against multiple products
  5. Alerting on defined threshold of included usage/ credit grant/ spend amount.
  6. Custom contract management through entitlement/ credit override

Usage based billing limits

The following limits are advisory guidelines for usage based billing on your Chargebee Billing site. They are not hard caps — Chargebee supports higher volumes and throughput, and most of these limits can be raised on request.

Test Site

  • Throughput (ingestion rate): Up to 50 requests per second (can be increased on request for high-throughput testing).
  • Backdated ingestion:
    • Via API: 12 hours.
    • Via S3 or file upload: 365 days.

Live Site

  • Usage events volume: Generous free tier with up to 100M usage events per month included.
  • Throughput (ingestion rate): Up to 200,000 requests per second.
  • Backdated ingestion:
    • Via API: 12 hours (configurable on request).
    • Via S3 or file upload: 30 days.

If your business requires higher volumes, throughput, or backdating windows, contact us. We can support larger volumes and discuss pricing based on your needs.

Fair usage policy

The Fair Usage Policy (FUP) applies only to the raw usage event data you ingest into Chargebee. It does not apply to your billing data, such as subscriptions, invoices, credit notes, or reports. That data is retained under Chargebee's standard data policies and is never affected by the FUP.

The storage and retention limits for raw usage events are standard defaults. They can be negotiated as part of custom and high-volume contracts.

Raw data storage

Each site includes 2 TB of raw usage event storage.

How many events fit in 2 TB depends on the size of each event's payload. We recommend keeping payloads under 2 KB; most are between 0.5 KB and 1 KB.

Average payload sizeApproximate events in 2 TB
0.5 KB4 billion
1 KB2 billion
2 KB1 billion

If you need more storage or longer retention, contact your account team.

Raw data retention

Raw usage events are retained for 2 years from the date of ingestion, on a rolling basis. After that, they are removed. This 2-year retention also applies to custom UBB deals. Removing raw events does not change any invoices or other billing records already generated from them.

Enable advanced usage based billing

Test site

Usage based billing is enabled by default in new test sites. If you are an existing customer, you can enable this feature in your test site following these steps:

  1. Log in to your Chargebee Billing account.
  2. Navigate to Settings > Configure Chargebee > Billing LogIQ > Metered Billing and Advanced Usage Based Billing.
  3. Enable Advanced Usage Based Billing.
  4. Once enabled you can see Usages in your left nav.

Live site

To enable this feature in your live site, submit an access request.