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

Meters

A meter captures the usage measurement configuration of a metered feature.

Sample MeterJSON

API Index URL

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

Meters attributes

id
required, string, max chars=50

A unique identifier for the meter. This is the same as feature.id.

name
required, string, max chars=50

A case-sensitive name for the meter. For example: API Calls, Input Tokens.

description
optional, string, max chars=500

A brief description of the meter.

type
required, enumerated string

The type of meter that determines how usage is measured for the meter.

Enum Values
simple

Usage is computed from the SQL query over usage_event properties.

compound

Usage is computed from a mathematical formula combining other meters.

status
optional, enumerated string

The current status of the meter.

Enum Values
active

The meter is active and new entitlements can be created towards it.

archived

No new entitlements can be created towards the meter. However, any pre-existing entitlements from the time that the meter was active remain effective.

deleted

The meter has been permanently deleted.

query
required, string, max chars=500

The SQL query used to measure usage from usage_event properties. For example: SELECT SUM(api_calls) FROM events.

column_definitions

Definitions of the columns or properties referenced by the meter's query. Each entry describes one column used to measure usage.

features

The feature associated with this meter. This array has only one element since any given meter is associated with only one feature.