Skip to main content
GET
/
api
/
billing
/
usage
List usage records
curl --request GET \
  --url https://api.example.com/api/billing/usage \
  --cookie better-auth.session_token=
[
  {
    "id": "<string>",
    "ledgerId": "<string>",
    "resourceType": "<string>",
    "resourceId": "<string>",
    "ownerType": "user",
    "ownerId": "<string>",
    "billingType": "hourly",
    "quantity": 123,
    "ratePerUnit": 123,
    "amount": 123,
    "currency": "<string>",
    "invoiceId": "<string>",
    "recordedAt": "<string>"
  }
]

Authorizations

better-auth.session_token
string
cookie
required

Query Parameters

organizationId
string

Response

200 - application/json

Default Response

id
string
required
ledgerId
string
required
resourceType
string
required
resourceId
string
required
ownerType
required
Available options:
user
ownerId
string
required
billingType
required
Available options:
hourly
quantity
number
required
ratePerUnit
number
required
amount
number
required
currency
string
required
invoiceId
string | null
required
recordedAt
string
required