ChargebeeAPI
Using AI coding agents like Claude Code or Cursor? Try the official Chargebee Agent Skills to speed up your development.Try now

Usage summary

Usage summary exposes aggregated usage data for a metered feature in a subscription over a specified reporting period. Use this resource to analyze feature-level usage for reporting or analytics purposes, independent of billing or invoicing.

Each usage summary entry is scoped to a subscription and a metered feature and includes the total usage aggregated over the selected reporting window.

Each usage summary entry includes:

The reporting window is defined using timeframe_start and timeframe_end. If these parameters are not provided, the reporting window defaults to the start of the current subscription term and the current time.

When window_size is specified, the response returns usage data as time-based aggregates for the reporting window. Otherwise, the response returns a single aggregate value for the entire period.

API Index URL

https://[site].chargebee.com/api/v2/usage_summary

Usage summary attributes

subscription_id
required, string, max chars=50

Unique identifier of the subscription for which usage is reported.

feature_id
required, string, max chars=100

Unique identifier of the metered feature for which usage is aggregated.

aggregated_value
required, string, max chars=33
aggregated_from
required, timestamp(UTC) in seconds

Start timestamp (inclusive) of the window used to compute total_usage.

aggregated_to
required, timestamp(UTC) in seconds

End timestamp (exclusive) of the window used to compute total_usage.