New in Chargebee: Explore Reveal and understand your payment performance end-to-end.Try Now
Docschargebee docs
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
    • Usecases
    • Mid-term Subscription Changes
    • Frequently Asked Questions
  • Setting up Usage Based Billing
  • 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. Understanding Usages
  4. Usecases
  1. Billing
  2. Usage Based Billing
  3. Understanding Usages
  4. Usecases

Usecases

Use Case 1: Automating Task-Based Billing for SaaS

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.

Pricing Model

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)

Configuration in Chargebee Billing

Let's look at how to automate usage-based billing for Acme using Chargebee:

Step 1: Product Catalog

Acme's product catalog must be set up with the following plans and addons:

Plans & AddonsNameConfiguration
Plan 1 (Fixed fee for included usage)Professional MonthlyPriced at $49/month with 100K tasks as included usage.
Plan 2 (Fixed fee for included usage)Team MonthlyPriced at $99/month with 500K tasks as included usage.
Addon 1 (Usage-based fee)Tasks MonthlyPriced at $0.1 per task (per-unit pricing).

Step 2: Usage Events

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.

  • Event Trigger
    • An event is triggered whenever an automation is executed by Acme.
  • Event Attributes
    • id: Universally Unique Identifier(UUID) to identify an event.
    • usage_timestamp: Captures the time when the event occurred (critical for billing and usage insights).
    • subscription_id: Identifies the subscription to which the event is attributed.
    • automation_id: Identifies the executed automation.
    • number_of_tasks: Records the number of tasks executed in the automation.

Step 3: Metered Feature Creation

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.

Step 4: Link Pricing for Metered Feature

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

  • F1 -> Professional Monthly
  • F1 -> Team Monthly

Addon

  • F1 -> Tasks Monthly

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

  • F1 -> Professional Monthly: 100,000 tasks/month.
  • F1 -> Team Monthly: 500,000 tasks/month.

Addon

  • F1 -> Additional Tasks Monthly: On-demand usage(entitlement limit is automatically associated due to usage-based configuration).

Once Acme implements all the steps mentioned above, Chargebee Billing begins to track usage and bills Acme's subscribers appropriately.

Usage Tracking and Billing in Chargebee

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

  • Base price for 100K tasks: $49.

Line Item 2: Tasks Monthly

  • Usage over 100K tasks is billed at $0.1 per task.

Usage Tracking

  1. Customer John Doe executes an automation, triggering an event.
  2. Event records the number of tasks executed.
  3. SUM of tasks (F1) is calculated for John Doe for the billing cycle.

Billing

  1. If the total tasks exceed the included usage which is 100K tasks/month, overages are billed at $0.1 per task via the Tasks Monthly addon.
  2. Usage and billing insights are updated in real-time based on recorded events.
  3. Upon renewal, a pending invoice gets generated and events continue to be recorded for upto 30 days in the past even after invoice generation. Once the invoice is finalised, any additional events will not be billed.
  4. John Doe is invoiced with the usage summary doc.

This setup allows Acme to scale billing based on actual usage while offering predictable pricing for customers within their plan limits.

Use Case 2: Implementing Pure Pay-As-You-Go Usage-Based Billing

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.

Pricing Model

DataStream adopts a pure pay-as-you-go pricing model, where:

  • There is no included usage.
  • Every unit of usage is billed.
  • Pricing is based entirely on usage recorded during the billing period.

Configuration in Chargebee Billing

Let's look at how to automate usage-based billing for DataStream using Chargebee:

Step 1: Product Catalog

DataStream’s product catalog must be set up with the following plans and addons:

Item TypeNameConfiguration
PlanAPI Access Monthly$0/month (This is mandatory)
AddonAPI Calls Monthly$0.05 per API call (per-unit pricing)

Note

  • The plan does not include any usage or usage-based pricing.
  • All usage charges are driven entirely by the addon which is linked to the metered feature while creating the addon itself.

Step 2: Usage Events

DataStream can send usage events to Chargebee Billing whenever an API call is made.

Usage events can be sent using:

  • Ingest a Usage Event API (for real-time ingestion)
  • Ingest Usage Events in Batch API (for bulk submission)
  • Bulk import via the Chargebee Billing UI

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.

Step 3: Metered Feature Creation

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.

Step 4: Link Pricing for Metered Feature

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

  • F1 -> API Access Monthly: $0/month

Addon

  • F1 -> API Calls Monthly: $0.05 per API call (per-unit pricing)

Usage Tracking and Billing in Chargebee

Let’s walk through how usage is tracked and billed for a customer subscription.

Sample Subscription

Assume a customer, Jane Smith, subscribes to the API Access Monthly plan.

Subscription Line Items

  • Line Item 1: API Access Monthly
    • Price: $0/month
  • Line Item 2: API Calls Monthly
    • Price: $0.05 per API call

Usage Tracking

  1. Jane makes an API call.
  2. DataStream sends a usage event to Chargebee.
  3. The event records one API call.
  4. Chargebee aggregates usage for Metered Feature F1 (SUM of API calls).
  5. All recorded usage is considered billable since there is no included usage.

Billing Behavior

  • Usage charges accumulate throughout the billing cycle.
  • Charges are calculated by multiplying total API calls by the addon price.
  • Usage and billing insights update in near real-time.
  • At renewal:
    • A pending invoice is generated.
    • Usage events can still be recorded for up to 30 days in the past after invoice generation.
    • Once the invoice is finalized, any additional events are not billed.
  • Jane receives an invoice that includes a detailed usage summary.

Example Invoice Calculation

If Jane makes 120,000 API calls in a billing cycle:

  • API Calls: 120,000 × $0.05
  • Total Usage Charge: $6,000

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?