GET
/
usage
List usage events
curl --request GET \
  --url https://api.paygentic.io/v0/usage \
  --header 'Authorization: Bearer <token>'
{
  "object": "list",
  "data": [
    {
      "id": "<string>",
      "object": "usageEvent",
      "idempotencyKey": "<string>",
      "customerId": "<string>",
      "description": "<string>",
      "merchantId": "<string>",
      "consumerId": "<string>",
      "subscriptionId": "<string>",
      "entitlementId": "<string>",
      "timestamp": "2023-11-07T05:31:56Z",
      "createdAt": "2023-11-07T05:31:56Z",
      "properties": [
        {
          "billableMetricId": "<string>",
          "quantity": 2,
          "price": "<string>"
        }
      ],
      "metadata": {},
      "billing": {
        "price": 123,
        "billingEventId": "<string>"
      }
    }
  ],
  "pagination": {
    "limit": 123,
    "offset": 123,
    "total": 123
  }
}

Authorizations

Authorization
string
header
required

API key authentication

Query Parameters

customerId
string

Filter by customer ID. This is only available if the caller is member of the merchant organization owning this customer.

merchantId
string

Filter by merchant ID. This is only available if the caller is member of the merchant organization.

consumerId
string

Filter by consumer ID. This is only available if the caller is member of the consumer organization.

subscriptionId
string

Filter by subscription ID. This is only available if the caller is member of the consumer or merchant organization owning this subscription.

startTime
string<date-time>
required

Filter events created after or at the specified time. ISO 8601 date-time string

endTime
string<date-time>
required

Filter events created before or at the specified time. ISO 8601 date-time string

limit
integer
default:10

Number of usage events to return

Required range: 1 <= x <= 100
offset
integer
default:0

Number of usage events to skip

Required range: x >= 0

Response

List of usage events

object
enum<string>
Available options:
list
data
object[]
pagination
object

Offset-based pagination response.