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
  • Setting up Usage Based Billing
    • Ingesting Usage Events into Chargebee
      • Ingesting Usage from Amazon S3
    • 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
  4. Ingesting Usage Events into Chargebee
  1. Billing
  2. Usage Based Billing
  3. Setting up Usage Based Billing
  4. Ingesting Usage Events into Chargebee

Ingesting Usage Events into Chargebee

Introduction

Chargebee Billing makes it easy to ingest and manage usage data for your products or services. You don't need to set up complex configurations or create metering in advance to start bringing in your usage data. Simply upload your data as-is, and then use it to enable usage-based billing or gain valuable insights.

Chargebee Billing is built to handle high-volume usage ingestion reliably, while giving you full visibility into how usage events are processed and consumed. It also supports:

  • schemaless ingestion.
  • up to 100 million usage events per month.
  • throughput of up to 12,000 events per second.

Core Concepts for Usage Ingestion

Understanding the following concepts will help you ingest usage events accurately and avoid common errors.

  • De-duplication ID Each usage event must include a de-duplication ID. A de-duplication ID is a unique identifier for a usage event that occurred within a subscription at a specific millisecond. Chargebee uses this ID to ensure that duplicate usage events are not recorded. For example, if two usage events occur for the same subscription at 2026-01-10T10:15:30.123, each event must have a unique de-duplication ID. If both events share the same ID, only one event is recorded.

  • Usage Timestamp and Ingestion Timestamp Chargebee tracks both usage time and ingestion time in milliseconds.

ConceptDescriptionUsed For
Usage TimestampThe usage timestamp represents the time when the customer consumed the service / when the usage occurred.Billing, reporting, processed event filters
Ingestion TimeThe Ingestion Time represents the time when Chargebee received the event.Failed event filters

Generating Timestamps for Testing: For testing or manual entry, you can use an epoch timestamp converter to generate timestamps in milliseconds. Ensure that the value you use is in milliseconds, and not seconds.

Ingesting Usage Events

Chargebee offers three straightforward methods to bring your usage events into the system:

  • Using the Usage Events API
  • Importing Usage Events in Bulk
  • Adding Usages Manually via UI

These methods ensure you can bring in usage events efficiently and accurately, whether you prefer automation, bulk import, or manual entry.

Usage Events API

You can use the Usage events API resource to send your usage data to Chargebee Billing. It supports both individual and batch ingestion of usage events, accommodating your data as-is without requiring adherence to a specific schema. Regardless of your business type, you can easily send usage data for your products or services to Chargebee. This is a one-time setup with no ongoing maintenance required.

Importing Usage Events in Bulk

Chargebee Billing allows you to import usage events in bulk, making it easy to upload large volumes of usage data quickly and efficiently. This method is ideal for your business if you have accumulated historical usage data, or you need to process a significant volume of usage records at once using the application.

To import usage events in bulk, simply prepare your data in a supported file format, ensuring it includes required attributes such as:

  • Deduplication ID
  • Subscription ID
  • Usage timestamp in milliseconds

Note

  • Please note that there are no validations in place to check and map usage data that gets imported.
  • Ensure that the size of the file that you import does not exceed 5 mb.

Once your data file is ready, follow the steps below to import your usage events into Chargebee Billing:

  1. Navigate to Usages > Usage Events > Add Usages. Select the Import .CSV file tab. Alternatively, you can click Settings > Import & Export Data > Choose a Bulk Operation in your Chargebee Billing site. Select Usages > Create a Usage and click Proceed.
  2. Drag and drop your data file into the web interface, or click Browse to select your file and upload it. Click Review and import.
  3. On the next screen, you can review your data and make changes if required. You can:
    • Click Edit Data to modify any values.
    • Click Add Column to add missing fields for the data.
    • Click Add Row to add more usage events.
  4. Once you have reviewed the data, click Complete Import.

Your usage events data will get imported into your Chargebee Billing site. You can use the All Processed Events tab to view usage events that were successfully processed.

Chargebee Billing immediately allows you to filter the usage events based on the event details/properties with which they were imported. Click the Event_id to view the usage event record in detail. The usage event details can be viewed both in Properties and JSON format.

Usage events that were not imported are listed under the Failed Events tab along with the failure reason. You can correct the respective data and attempt to import them again.

Adding Usages Manually via UI

Chargebee Billing gives you the flexibility to manually add usage events for smaller datasets or to make quick updates directly within the application user interface. This method is particularly useful for you when you occasionally need to record usage data without relying on automated or bulk processes.

To add usage events manually in your Chargebee Billing site:

  1. Click Usages > Usage Events > Add Usages. Select the Manually Enter Data tab.

    image
  2. On the Add Usage page, enter the required details such as the usage event identifier, timestamp, and quantity.

  3. Click Save.

Your usage data gets recorded successfully.

You can now start tracking and managing usage data in a way that works best for your business.

Read Next

  • Defining metered features
  • Link pricing for metered features

See also

API References

  • Ingest a Usage Event
  • Ingest Usage Events in Batch
  • Ingest Usage Files

Was this article helpful?