The Subscription Item Object

A subscription item is an object that links a price to a subscription and also contains quantity information.


A subscription item belongs to a Subscription and a Price and can have many Usage Records records.

Attributes

subscription_id

The ID of the Subscription associated with this subscription item.


price_id

The ID of the Price associated with this subscription item.


quantity

A positive integer representing the unit quantity of this subscription item.

Will be 0 if the related subscription product/variant has usage-based billing enabled.


is_usage_based

A boolean value indicating whether the related subscription product/variant has usage-based billing enabled.


created_at

An ISO 8601 formatted date-time string indicating when the subscription item was created.


updated_at

An ISO 8601 formatted date-time string indicating when the subscription item was last updated.

{
  "type": "subscription-items",
  "id": "1",
  "attributes": {
    "subscription_id": 1,
    "price_id": 1,
    "quantity": 1,
    "is_usage_based": false,
    "created_at": "2023-07-18T12:16:24.000000Z",
    "updated_at": "2023-07-18T12:16:24.000000Z"
  },
  "relationships": {
    "subscription": {
      "links": {
        "related": "https://api.lemonsqueezy.com/v1/subscription-items/1/subscription",
        "self": "https://api.lemonsqueezy.com/v1/subscription-items/1/relationships/subscription"
      }
    },
    "price": {
      "links": {
        "related": "https://api.lemonsqueezy.com/v1/subscription-items/1/price",
        "self": "https://api.lemonsqueezy.com/v1/subscription-items/1/relationships/price"
      }
    },
    "usage-records": {
      "links": {
        "related": "https://api.lemonsqueezy.com/v1/subscription-items/1/usage-records",
        "self": "https://api.lemonsqueezy.com/v1/subscription-items/1/relationships/usage-records"
      }
    }
  },
  "links": {
    "self": "https://api.lemonsqueezy.com/v1/subscription-items/1"
  }
}

Was this page helpful?