Retrieve Subscription Item's Current Usage

GET

/v1/subscription-items/:id/current-usage

Retrieves the unit usage for a subscription item for the current billing period.


curl "https://api.lemonsqueezy.com/v1/subscription-items/1/current-usage" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}'

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.

{
  "jsonapi": {
    "version": "1.0"
  },
  "meta": {
    "period_start": "2023-08-10T13:08:16+00:00",
    "period_end": "2023-09-10T13:03:16+00:00",
    "quantity": 5,
    "interval_unit": "month",
    "interval_quantity": 1
  }
}

Was this page helpful?