The Usage Record Object
A usage record reports the usage amount for a subscription item with usage-based billing.
A usage record belongs to a Subscription Item.
Attributes
subscription_item_id
The ID of the subscription item this usage record belongs to.
quantity
A positive integer representing the usage to be reported.
action
The type of record. One of
increment
- The provided quantity was added to existing records for the current billing period.set
- The provided quantity was set as the total usage for the current billing period.
created_at
An ISO 8601 formatted date-time string indicating when the object was created.
updated_at
An ISO 8601 formatted date-time string indicating when the object was last updated.
{
"type": "usage-records",
"id": "1",
"attributes": {
"subscription_item_id": 1,
"quantity": 5,
"action": "increment",
"created_at": "2023-07-24T14:44:38.000000Z",
"updated_at": "2023-07-24T14:44:38.000000Z"
}
}