New in Chargebee: Explore Reveal and understand your payment performance end-to-end.Try Now
Docschargebeedocs
HomeBillingPaymentsRevRecGrowthReveal
Support

Product Updates


  • Release Notes

Getting Started


  • Overview
  • Chargebee Billing Data Centers
  • Object Relationship Model
  • Understanding Sites
  • Chargebee Tech Glossary
  • Articles and FAQ

Implementing Chargebee


  • Implementation Guide
  • Go-live Checklist
  • Articles and FAQ

AI in Chargebee


  • Chargebee Agents
  • Chargebee Copilot
  • Chargebee MCP Server (Model Context Protocol)

Developer Resources


  • Developer Resources Overview
  • Articles and FAQ

Product Catalog


  • Product Catalog Overview
  • Coupons
  • Articles and FAQ

Subscriptions


  • Working with Subscriptions
  • Billing
  • Orders
  • Articles and FAQ

Customers


  • Managing Customers
  • Account Hierarchy
  • Email Notifications
  • Branding
  • Configure Multiple Languages
  • Articles and FAQ

Entitlements


  • Entitlements Overview
  • Features Overview
  • Feature Management
  • Managing Product Entitlements
  • Subscription Entitlements
  • Customer Entitlements
  • Grandfathering Entitlements
  • Articles and FAQ

Usage Based Billing


  • Understanding Usages
  • Setting up Usage Based Billing
    • Ingesting Usage Events into Chargebee
    • Defining Metered Features
    • Linking Pricing for Metered Features
  • Usage Alerts
  • Metered Billing
  • Articles and FAQ

Chargebee CPQ


  • Chargebee CPQ
  • Chargebee CPQ for Salesforce
  • Chargebee CPQ for HubSpot

Invoices, Credit Notes, and Quotes


  • Invoices
  • Credit Notes
  • Quotes [Legacy]
  • Transactions
  • Articles and FAQ

Taxes


  • Overview
  • Configuring Taxes
  • Country-specific Taxes
  • Articles and FAQ

Hosted Capabilities


  • Overview
  • Hosted Checkout
  • Hosted Self-Serve Portal
  • Hosted Pages Features
  • Additional Hosted Pages
  • Payment Components
  • Pricing Table
  • Managing Payments with Chargebee.js
  • Mobile-Optimized Hosted Pages
  • Articles and FAQ

Site Configuration


  • Users & Roles
  • Custom Fields & Metadata
  • Approvals
  • Mandatory Fields
  • File Attachments & Comments
  • Advanced Filter Options
  • Multicurrency Pricing
  • Multi-decimal Support
  • Configuring Reason Codes
  • Events and Webhooks
  • API Keys
  • Time Zone
  • Time Machine
  • Transfer Configurations
  • Articles and FAQ

Multi Business Entity


  • Multi Business Entity Overview
  • Customer Transfer Overview
  • Articles and FAQ

Mobile Subscriptions


  • Overview
  • Omnichannel Subscriptions
  • Omnichannel One-Time Orders
  • Mobile Subscriptions (Legacy)

Reports and Analytics


  • RevenueStory
  • Home Dashboard
  • Frequently Asked Questions
  • FAQs for Classic Reports Sunset
  • Articles and FAQ

Integrations


  • Sales
  • Customer Support and Success
  • Finance
  • Tax
  • Marketing
  • Stitch
  • Collaboration
  • Contract Management
  • Ecommerce Management
  • Articles and FAQ

Data Privacy & Security


  • Two Factor Authentication
  • SAML Single Sign-On
  • System for Cross-Domain Identity Management (SCIM)
  • EU-GDPR
  • Consent Management
  • Personal Data Management
  • Compliance Certificates
  • HIPAA Guidelines
  • PCI Recommendations and Integration Types
  • Articles and FAQ

Data Operations


  • Bulk Operations
  • Migration
  • Articles and FAQ
  1. Billing
  2. Usage Based Billing
  3. Setting up Usage Based Billing
  1. Billing
  2. Usage Based Billing
  3. Setting up Usage Based Billing

Setting up Advanced Usage Based Billing

Introduction

Usage-Based Billing (UBB) allows you to charge customers based on their actual consumption of your product or service. Setting up advanced 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:

  1. Ingest your usage events into Chargebee
  2. Define metered features
  3. Link pricing for metered features

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.

Prerequisites

Before setting up Advanced Usage Based Billing in your Chargebee Billing site for your business, ensure the following prerequisites are met:

  • Currencies and Billing Frequencies: Configure all supported currencies, and billing frequencies for your business.
  • Product Catalog: Setup your product catalog by creating relevant product families, plans, and addons[/billing/2.0/product-catalog/addons]. Specify usage based plans and addons as metered so that you can specify the usage based pricing under on-demand usage.

Ingest your Usage Events into Chargebee

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:

  • Programmatically via API: Send usage events programmatically to Chargebee in real-time or in batches. This method is ideal for automated and large-scale data ingestion.
  • Bulk upload via CSV: Upload usage data in bulk using a supported file format like CSV. This is useful for processing historical data or large volumes of usage records.
  • Manual entry in the UI: Enter usage events manually through the Chargebee Billing User Interface(UI) for smaller datasets or one-off entries.

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.

Define Metered Features

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.

Link Pricing for Metered Features

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

Test Using Time Machine

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 advanced usage based billing workflow using Time machine, follow these steps:

  1. Navigate to Settings > Configure Chargebee > Time Machine and enable Time Machine.
  2. Create a test customer and subscription.
  3. Ingest usage events for the subscription.
  4. Advance time using Time Machine to simulate billing cycle progression.
  5. Review the following:
    • Usage Summary on the subscription
    • Invoices generated
    • Applied charges and pricing calculations

This validation ensures that:

  • Usage events are successfully ingested.
  • Events are mapped correctly to metered features.
  • Included usage and overage pricing are applied accurately.
  • Charges are reflected correctly in invoices.

With this validation complete, you can confidently launch your usage-based pricing model on your Live site.

Advanced Usage Based Billing in Action

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?