Introducing the Better Auth Chargebee plugin: Use it to handle subscriptions, billing, and auth seamlessly.
Chargebeechargebee API

List ledger operations

Returns a list of operations meeting all the conditions specified in the filter parameters below.

Sample Request

Sample Result[JSON]

URL Format

GET https://[site].chargebee.com/api/v2/ledger_operations

Input Parameters

limit
optional, integer, default=10, min=1, max=100

Specifies the maximum number of resources to return per page.

Default and Hard Cap

  • Optional parameter; if omitted, a server-defined default is applied.
  • Values exceeding the server's maximum limit are capped (clamped) to the allowed maximum.

Example → limit = "50"

offset
optional, string, max chars=1000

Opaque cursor indicating the current position in the result set for pagination.

Behavior

  • To fetch the next page, pass the next_offset value returned in the previous response.
  • The value is opaque and must not be parsed, modified, or constructed manually.

Example → offset = "["1771176208000","96000000006"]"

sort_by[<sort-order>]
optional, object

optional, string filter

Specifies the field used to sort the result set.

Supported attributes

  • created_at

Sort Order

  • asc (ascending order)
  • desc (descending order)

Example → sort_by[desc] = "created_at"

This sorts operations by created_at in descending order (most recent first).

Filter Params

For operator usages, see the Pagination and Filtering section.
subscription_id[<operator>]

required, string filter

Filters results by subscription identifier. This is the subscription whose operations you are listing.

Supported operators : is

Example → subscription_id[is] = "1mGETgZVF2umUZq"

Supported operators: is
unit_id[<operator>]

optional, string filter

Filters results by unit identifier. For example, a credit unit id such as ai_credits.

Supported operators : is

Example → unit_id[is] = "ai_credits"

Supported operators: is
created_at[<operator>]

optional, timestamp(UTC) in seconds filter

Filter by when the operation was recorded (created_at).

Supported operators : after, before, on, between (per List operations).

Example → created_at[between] = "[1771175750, 1771175800]"

Supported operators: after, before, on, between
type[<operator>]

optional, string filter

Filters results by operation type.

Supported operators : is, in

Example → type[is] = "capture"

Supported operators: in, is

Returns

next_offset
optional, string, max chars=1000

This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.

Ledger operation object
Resource object representing ledger_operation