Retrieve Subscription Item's Current Usage
/v1/subscription-items/:id/current-usage
Retrieves the unit usage for a subscription item for the current billing period.
Note
This endpoint is only for subscriptions with usage-based billing enabled. It will return a 404 Not Found
response if the related subscription product/variant does not have usage-based billing enabled.
Returns
Returns a meta object containing usage information.
period_start
An ISO 8601 formatted date-time string indicating the start of the billing period.
period_end
An ISO 8601 formatted date-time string indicating the end of the billing period.
quantity
A positive integer representing the usage total.
interval_unit
The interval unit of the subscription’s variant. One of
day
week
month
year
interval_quantity
The interval count of the subscription’s variant.
For example, a subscription item with interval_unit=month
and interval_quantity=3
would mean the subscription renews every a three months.