New in Chargebee: Explore Reveal and understand your payment performance end-to-end.Try Now
Docschargebee docs
HomeBillingCPQPaymentsRevRecGrowthReveal
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

Agentic AI


  • Chargebee Copilot
  • Catalog Setup Assistant
  • MCP Servers

Developer Resources


  • Developer Resources Overview
  • API Explorer
  • Articles and FAQ

Chargebee Apps


  • Chargebee Apps CLI Developer Guide

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


  • Overview
  • Use Cases
    • Annual included usage with monthly overages
    • Pay-as-you-go pricing
  • Setting up Usage Based Billing
  • Usage Alerts
  • Prepaid credits
  • Mid-term Subscription Changes
  • FAQs

Invoices and Credit Notes


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

Taxes


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

E-Invoicing


  • Overview
  • Enabling E-Invoicing

Hosted Capabilities


  • Overview
  • Hosted Checkout
  • Hosted Self-Serve Portal
  • Hosted Pages Features
  • Additional Hosted Pages
  • Payment Components
  • Pricing Table
  • Mobile SDKs and Wrappers
  • 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 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
  • E-Invoicing
  • 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. Use Cases
  4. Annual included usage with monthly overages
  1. Billing
  2. Usage Based Billing
  3. Use Cases
  4. Annual included usage with monthly overages

Bill annually with annual included usage and monthly overages

Overview

Longer-term contracts are often prepaid annually for the platform fee, but overages still need to be invoiced as they happen so billing stays aligned with consumption. This guide shows you how to build that hybrid model in Chargebee Billing: an annual plan that grants a full-year usage quota, paired with a monthly metered addon that bills every unit consumed beyond the quota.

Year-long timeline for a $490 annual plan with 10,000 included image generations, usage crossing the quota in August, and a $300 overage invoice on September 1

This is the implementation companion to the Included usage with overages recipe for billing administrators and developers who are implementing it end-to-end in the Chargebee Billing app and with the API. See Usage-based billing use cases for other billing cadence combinations.

Throughout this guide, you configure the model for a single running example. Acme Inc. signs an annual contract on the Professional plan: $490 per year, with 10,000 image generations included for the year. If Acme exceeds 10,000 image generations during the annual term, the excess is invoiced monthly at $0.10 per image generation.

How this billing model works

The model depends on one subscription holding items that bill on two different cadences. The illustration below explains how this billing model works:

Three-step model: ingest usage events, define a metered feature, then pair a yearly prepaid plan with a monthly metered overage addon

Before you start

Note

Confirm your access. You need an admin role to change site configuration and build the Product Catalog.

The following settings are enabled by default for new Chargebee Billing sites. If you are an existing user, enable these features before you build the model:

  • Advanced Usage-Based Billing
  • Multi-Frequency Billing

Validate before go-live

Before enabling this on a live site, validate the full annual cycle on a test site. You can test your billing setup in Chargebee's test site using Time Machine. A test site offers a one-year Time Machine option, which is enough to validate a full annual subscription cycle end-to-end, from the initial annual invoice through monthly overages to renewal.

Note

When you enter Time Machine, existing subscriptions and customer details on the test site are erased. Export the data first if you need a backup.

Implementation steps

Follow these steps in order. Each step shows how to do the task in the Chargebee Billing app and with the API.

1. Send usage into Chargebee Billing

Start by streaming your product's usage into Chargebee Billing before you've decided what to charge for. For Acme, a usage event is generated every time an image is generated, and it includes a number_of_image_generations property. For your business, this could be an API call, a file upload, a message sent, data storage, and so on.

Chargebee's ingestion is schemaless. While this example uses the number of image generations as the value metric, you can track usage for additional parameters as required for your business.

You can add any additional properties relevant to your product, such as image_generation_id or user_id. Chargebee Billing stores them alongside the required attributes, deduplicates repeated events, and keeps the raw stream queryable.

You can start sending raw usage before finalizing included quotas or overage rates. Track adoption patterns over time, then use those insights to define the metered feature, included quota, and overage pricing.

You can send usage in one of the following ways, based on how your product emits usage:

Using the app

CSV bulk upload. Export a CSV from your data warehouse and upload it in Chargebee Billing. Each row must include a deduplication ID, subscription ID, and usage timestamp in milliseconds.

  1. Go to Usages > Usage Events > Add Usage Events.
  2. Select the Quick file upload tab, or go to Settings > Import & Export Data > Choose a Bulk Operation, then select Usages > Create a Usage.
  3. Upload the file and click Proceed to review.
  4. Review the data, then click Import Events.

You can also add a small number of events manually: go to Usages > Usage Events > Add Usage Events, select Enter usage events, and click Import Events.

Using the API

Send events in real time or in micro-batches as they happen. You can send both raw and aggregated usage events using Ingest a usage event and Ingest usage events in batch. Usage events use the ingest host ({site}.ingest.chargebee.com), not the standard Chargebee API host.

Ingest a single usage event

curl  https://{site}.ingest.chargebee.com/api/v2/usage_events \
     -u {site_api_key}:\
     --header 'Content-Type: application/json;charset=UTF-8' \
     --data '{
     "deduplication_id": "usage-img-0001",
     "subscription_id": "{subscription_id}",
     "usage_timestamp": "1737612931000",
     "properties": {
          "number_of_image_generations": 12,
          "image_generation_id": "img_1001"
     }
}'

Ingest usage events in batch (up to 500 events per request)

curl  https://{site}.ingest.chargebee.com/api/v2/batch/usage_events \
     -u {site_api_key}:\
     --header 'Content-Type: application/json;charset=UTF-8' \
     --data '{
     "events": [
          {
               "deduplication_id": "usage-img-0001",
               "subscription_id": "{subscription_id}",
               "usage_timestamp": "1737612931000",
               "properties": {
                    "number_of_image_generations": 12
               }
          },
          {
               "deduplication_id": "usage-img-0002",
               "subscription_id": "{subscription_id}",
               "usage_timestamp": "1737612991000",
               "properties": {
                    "number_of_image_generations": 8
               }
          }
     ]
}'
Using Amazon S3

Upload usage event files from an S3 bucket. Chargebee Billing picks them up and processes them automatically. See Ingesting usage from Amazon S3.

Note

Backdated ingestion limits differ by method and site type. On a live site, the Usage Events API accepts events from the last 12 hours (configurable on request); CSV and S3 uploads accept events from the last 30 days. On a test site, the API window is 12 hours and file uploads accept events from the last year. See Usage-Based Billing limits.

2. Define the unit of value your product delivers

Now that usage is flowing, decide what you'll actually charge for — the unit of value your product delivers, whether that's pages, API calls, image generations, or any other metric. In Chargebee Billing, you capture that unit by defining a metered feature.

A metered feature tells Chargebee how to aggregate your raw events into a single billable number for each period. You set the aggregation rule on the feature, and from that point Chargebee rolls up matching events against it.

For Acme, create a metered feature named Image Generations with the aggregation method SUM on the number_of_image_generations property. From this point, Chargebee aggregates matching events against the feature.

Using the app
  1. Go to Usages > Metered Features and click Create Metered Feature.
  2. Enter a name for the feature, such as Image Generations.
  3. Under Usage Calculation, select Sum and select the number_of_image_generations event property.
  4. Review the usage calculation formula and preview, then click Create.
FieldValue
NameImage Generations
Feature IDimage-generations
TypeMetered
Aggregation methodSUM. You can select Sum, Count, Min, Max, Average, or Count Distinct.
Event property to aggregatenumber_of_image_generations
Using the API

Use Create a metered feature.

The aggregation method is expressed as a SQL query over usage event properties. Chargebee Billing returns a meter whose id is also the feature ID you use in later entitlement and usage calls.

curl  https://{site}.chargebee.com/api/v2/metered_features \
     -u {site_api_key}:\
     -d name="Image Generations" \
     -d feature_unit="image_generation" \
     -d description="Number of image generations consumable." \
     -d query="SELECT SUM(number_of_image_generations) from events" \
     -d "column_definitions[column_name][0]"="number_of_image_generations" \
     -d "column_definitions[data_type][0]"="NUMBER"

3. Package your offerings into a plan

This step establishes the annual plan, sets its price point, and defines how many image generations are included for the year.

3a. Create the plan

Create a Professional plan that carries the prepaid annual platform fee, and link pricing to the plan in the next step.

Using the app
  1. Go to Product Catalog > Plans > + Create Plan.
  2. Select a product family, enter the plan details, and click Create.
FieldValue
Internal NameProfessional
Plan IDprofessional
Using the API

Create the plan item with Create an item. Replace {item_family_id} with your product family ID.

curl  https://{site}.chargebee.com/api/v2/items \
     -u {site_api_key}:\
     -d id="professional" \
     -d name="Professional" \
     -d type="PLAN" \
     -d item_family_id="{item_family_id}"

3b. Define the plan price point

Once the plan is saved, create a price point for it.

Using the app
  1. Open the plan details page. In the Pricing section, click Set Price for the yearly frequency and currency you want.
  2. Configure the pricing as follows, then click Create.
FieldValue
Pricing modelFlat fee
Price$490
Billing frequencyYearly
Using the API

Create the yearly price point with Create an item price. price is in the minor unit of the currency: 49000 is $490.00.

curl  https://{site}.chargebee.com/api/v2/item_prices \
     -u {site_api_key}:\
     -d id="professional-USD-yearly" \
     -d item_id="professional" \
     -d name="Professional USD yearly" \
     -d pricing_model="FLAT_FEE" \
     -d price=49000 \
     -d currency_code="USD" \
     -d period_unit="YEAR" \
     -d period=1

3c. Grant features and define included usage

Link the Image Generations metered feature you created in Step 2 and set the included usage.

Using the app
  1. Go to Usages > Metered Features and select Image Generations.
  2. Click Link to items.
  3. Select the Professional plan and click Next: Set Included Usage.
  4. Set the included usage, then click Link to Items.
FieldValue
FeatureImage Generations
Included usage10,000 image generations

The full 10,000 image generations quota is granted on the subscription start date and tracked cumulatively across the year. Chargebee Billing does not reset or refresh this quota mid-term; it is a single annual entitlement.

Using the API

Grant the included quota with Manage entitlements for a feature. Use the metered feature ID returned when you created the feature.

curl  https://{site}.chargebee.com/api/v2/entitlements \
     -u {site_api_key}:\
     -d action="UPSERT" \
     -d "entitlements[feature_id][0]"="image-generations" \
     -d "entitlements[entity_id][0]"="professional" \
     -d "entitlements[entity_type][0]"="PLAN" \
     -d "entitlements[value][0]"="10000"

4. Define how to measure overages

Metered addons are catalog items that let you measure and rate metered features beyond the included usage granted through the plan. In this case, the addon bills customers for every image generation consumed after their annual included quota of 10,000 image generations is exhausted.

4a. Create the addon

Using the app
  1. Go to Product Catalog > Addons > + Create Addon.
  2. Enter the addon details below, select This addon is metered, and click Create.
FieldValue
Internal NameOn-demand Image Generations
Addon IDon-demand-image-generations
MeteredYes
Metered featureImage Generations
Using the API

Create the metered addon with Create an item. Set metered to true.

curl  https://{site}.chargebee.com/api/v2/items \
     -u {site_api_key}:\
     -d id="on-demand-image-generations" \
     -d name="On-demand Image Generations" \
     -d type="ADDON" \
     -d item_family_id="{item_family_id}" \
     -d metered=true

Then link the addon to the metered feature as on-demand usage with Manage entitlements for a feature. Entitlements on metered addons are unlimited by default so every unit beyond the plan quota is billable:

curl  https://{site}.chargebee.com/api/v2/entitlements \
     -u {site_api_key}:\
     -d action="UPSERT" \
     -d "entitlements[feature_id][0]"="image-generations" \
     -d "entitlements[entity_id][0]"="on-demand-image-generations" \
     -d "entitlements[entity_type][0]"="ADDON" \
     -d "entitlements[value][0]"="unlimited"

4b. Define the addon price point

Once the addon is created, create a monthly price point for it.

Using the app
  1. Open the addon details page. In the Pricing section, click Set Price for the monthly frequency.
  2. Configure the pricing as follows, then click Create.
FieldValue
Pricing modelPer Unit. You can also use Tiered, Staircase, or Volume based on your business needs.
Price$0.10 per image generation
Billing frequencyMonthly

Note

With Multi-Frequency Billing, only on-demand addons with per-unit pricing are supported for included usage and overages.

Using the API

Create the monthly price point with Create an item price. price is in the minor unit of the currency: 10 is $0.10.

curl  https://{site}.chargebee.com/api/v2/item_prices \
     -u {site_api_key}:\
     -d id="on-demand-image-generations-USD-monthly" \
     -d item_id="on-demand-image-generations" \
     -d name="On-demand Image Generations USD monthly" \
     -d pricing_model="PER_UNIT" \
     -d price=10 \
     -d currency_code="USD" \
     -d period_unit="MONTH" \
     -d period=1

5. Create the customer and subscription

With the catalog in place, create the customer and their subscription. A customer record must exist before a subscription can be created. You can create it first, or create both together in the same flow. Create the subscription for Acme's contact, John Doe, on the annual plan, and attach the metered addon so overages can be invoiced monthly while the plan fee stays annual.

Using the app
  1. Go to Customers and create a customer record for John Doe (Acme Inc.) if one doesn't already exist.
  2. From the customer, create a subscription and add the Professional yearly plan item price.
  3. Attach the On-demand Image Generations monthly addon item price.
  4. Review and create the subscription.
Using the API

Create the customer with Create a customer:

curl  https://{site}.chargebee.com/api/v2/customers \
     -u {site_api_key}:\
     -d first_name="John" \
     -d last_name="Doe" \
     -d company="Acme Inc." \
     -d email="jdoe@example.com"

Create the subscription with Create a subscription for items. Attach both the annual plan price and the monthly metered addon price:

curl  https://{site}.chargebee.com/api/v2/customers/{customer_id}/subscription_for_items \
     -u {site_api_key}:\
     -d "subscription_items[item_price_id][0]"="professional-USD-yearly" \
     -d "subscription_items[item_price_id][1]"="on-demand-image-generations-USD-monthly"

When you create the subscription, you can override the plan's default entitlement grants to give this customer a custom included quota. This is useful for negotiated enterprise deals where the included usage differs from the standard plan — for example, granting Acme 15,000 image generations instead of the standard 10,000 without creating a new plan. You can set the override at creation or update it any time after.

curl  https://{site}.chargebee.com/api/v2/subscriptions/{subscription_id}/entitlement_overrides \
     -X POST \
     -u {site_api_key}:\
     -d action="UPSERT" \
     -d "entitlement_overrides[feature_id][0]"="image-generations" \
     -d "entitlement_overrides[value][0]"="15000"

See Upsert or remove entitlement overrides for a subscription.

Your active subscription looks like this:

Line itemBilling frequencyInvoicing
Professional (non-metered)Yearly$490 invoiced immediately, prepaid for Jan 1–Dec 31, granting 10,000 included image generations.
On-demand Image Generations (metered)Monthly$0.10 per image generation invoiced monthly, only after the 10,000 image generations yearly quota is exhausted.

6. Usage visibility and alerts

Use the following options to monitor usage, review billed consumption, and act before customers exceed their limits.

Monitor usage during the current term

Using the app

Open the subscription to view cumulative image generations against the 10,000-image generation annual quota under the Usage summary section.

Using the API

Retrieve usage summary to show consumed usage for a feature over a reporting window. If you omit timeframe_start and timeframe_end, Chargebee Billing defaults to the start of the current subscription term through now.

curl  https://{site}.chargebee.com/api/v2/subscriptions/{subscription_id}/usage_summary \
     -G \
     -u {site_api_key}:\
     --data-urlencode feature_id="image-generations"

See Retrieve usage summary for a subscription.

Retrieve usage charges to show accrued overage charges before the monthly invoice is generated. This returns the current unbilled snapshot, including included usage, total usage, and the overage amount when a metered addon is attached.

curl  https://{site}.chargebee.com/api/v2/subscriptions/{subscription_id}/usage_charges \
     -u {site_api_key}:

See Retrieve usage charges for a subscription.

Review usage after invoicing

Using the app

Open the invoice and select View Usage PDF to review or share an itemized usage breakdown.

Using the API

Use Retrieve usage charges for a subscription to retrieve current unbilled usage charges for reconciliation or display in your application. This endpoint does not return historical, billed, or invoice-backed usage.

Configure usage and spend alerts

Set alerts in Chargebee Billing and connect them to webhooks to automate downstream actions. For example, when a free-plan customer reaches 100%, you can block access and show an upgrade prompt.

Using the app
  1. Go to Usages > Alerts and click Create Alert.
  2. Define thresholds, such as 75% and 100% of Acme's quota. You can also set spend thresholds for accrued usage charges.
  3. Set the scope: apply the alert globally, filter it by plan, or override it for a subscription. For example, block access and show an upgrade prompt when a free-plan customer reaches 100%, while allowing an enterprise customer to continue into paid overages.
  4. Choose the response. Route the webhook to email, an in-app prompt, Slack, your CRM, or another workflow. The 75% alert provides time to act before overages begin; the 100% alert confirms that the included quota is exhausted.
  5. Click Save Alert.
Using the API

Create a percentage-based usage alert with Create an alert. This example fires when usage reaches 75% of the included quota and applies globally to subscriptions on the Professional yearly price:

curl  https://{site}.chargebee.com/api/v2/alerts \
     -u {site_api_key}:\
     -d type="USAGE_EXCEEDED" \
     -d name="Image generations 75 percent" \
     -d description="Notify when usage crosses 75 percent of the annual quota" \
     -d metered_feature_id="image-generations" \
     -d "threshold[mode]"="PERCENTAGE" \
     -d "threshold[value]"=75 \
     -d "filter_conditions[field][0]"="PLAN_PRICE_ID" \
     -d "filter_conditions[operator][0]"="EQUALS" \
     -d "filter_conditions[value][0]"="professional-USD-yearly"

Create a second alert with "threshold[value]"=100 for the exhausted-quota notification. To scope an alert to one subscription instead of a plan filter, pass subscription_id and omit filter_conditions.

Related use cases

Manage upgrades, downgrades, and cancellations

Subscriptions on this model can change over time; customers move tiers or cancel. For upgrades and downgrades, Chargebee Billing prorates the new plan price based on the time remaining in the billing period. In every plan change, the remaining entitlements from the current plan are added to the full entitlements granted by the new plan.

ActionWhenWhat Chargebee does to chargesEntitlementsHow to trigger
UpgradeMid-cycleProrates the new plan price for the remaining term.Remaining entitlements from the current plan are added to the full entitlements granted by the new plan.Using the app: Go to the subscription, change the plan, and apply the change Immediately or on a Specific date. Using the API: Update a subscription for items
DowngradeMid-cycleProrates the new plan price for the remaining term; any resulting credit applies to future invoices.Remaining entitlements from the current plan are added to the full entitlements granted by the new plan.Using the app: Go to the subscription, change the plan, and apply the change Immediately or on a Specific date. Using the API: Update a subscription for items
CancellationImmediatelyIssues a prorated credit for the unused annual period and invoices any accrued overages.Revoked immediately.Using the app: Go to the subscription, cancel the subscription, and select Immediately. Using the API: Cancel a subscription

For an upgrade or downgrade at the end of the term, schedule the change using Subscription Ramps. The current plan remains unchanged until renewal, when the new plan, price, and entitlements take effect automatically. You can also use ramps to schedule other future subscription changes, such as planned price increases.

For the full proration and entitlement behavior, see Mid-term subscription changes.

Add a usage top-up

To grant extra included usage without changing the plan, create a $0 non-metered addon that entitles the same metered feature, then set its billing cycles to 1 when you attach it to the subscription so that it does not recur. One-time charges cannot grant included usage; the addon is what increases the quota. For accurate revenue recognition, collect the top-up fee with a one-time charge.

Example

Acme has consumed most of its 10,000 annual image generations by November and wants to buy 1,000 extra image generations for a flat $50, collected in full immediately.

Attaching a $50 yearly addon in November would prorate that $50. A one-time charge can collect $50 in full, but it cannot grant the extra quota. Split the purchase into two line items:

Line itemWhat it doesConfiguration
Image Generations Top-up (non-metered addon)Grants the extra quota for the remainder of the annual term.$0 yearly flat fee, 1,000 included image generations, billing cycles = 1.
One-time chargeCollects the $50 top-up fee in full. Does not grant usage.$50 invoiced immediately with Create Quick Charge, or +Add Charge if you use a catalog charge.

Manage overage invoices

At the end of each monthly billing period, Chargebee Billing creates the overage invoice in a Pending state. While an invoice is pending, you can still ingest usage events dated within the accepted backdating window, and they're included in the final charge. Pending invoices don't trigger payment collection.

You manage how pending overage invoices close under Settings > Configure Chargebee > Billing LogIQ > Usage Based Billing. Two behaviors are available:

  • Manual close. Review all usage, then close the invoice yourself.
  • Auto-close. Chargebee Billing closes the invoice automatically at a time you define.

Once an invoice is closed, no further usage can be added to it, and payment collection begins. If you need to correct a closed invoice, void it and regenerate it with the updated usage.

See Actions for pending invoices, the Invoices API, and the Credit Notes API.

Offer a trial period with specific included usage

Create a separate trial plan for the required duration and define custom entitlements for that period. Initially, the subscription holds this trial plan. At the end of one billing cycle, automatically update the subscription to the Professional yearly plan. You can schedule that change with Subscription Ramps.

Summary

This guide showed you how to:

  • Turn raw usage into a metered feature, then configure an annual plan with included usage and a monthly addon for overages.
  • Create the subscription, monitor usage and alerts, manage billing changes, and validate the complete cycle with Time Machine.

See also

  • Usage-based billing use cases
  • Understanding usages
  • Multi-Frequency Billing
  • Usage Alerts
  • Usage Events API

Was this article helpful?