Skip to main content
GET
/
v0
/
usage
/
{id}
Get
curl --request GET \
  --url https://api.paygentic.io/v0/usage/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "usg_t3u4v5w6x7y8z9a0",
  "object": "usageEvent",
  "billing": {
    "billingEventId": "bev_p1q2r3s4t5u6v7w8",
    "currency": "USD",
    "price": 6345000000000,
    "totalAmount": 6916050000000,
    "totalTax": 571050000000
  },
  "consumerId": "org_j9k0l1m2n3o4p5q6",
  "createdAt": "2024-05-20T14:45:35Z",
  "customerId": "cus_b1c2d3e4f5g6h7i8",
  "description": "Customer data warehouse storage allocation",
  "entitlementId": "com_z5a6b7c8d9e0f1g2",
  "idempotencyKey": "usg_2024_05_20_xyz789",
  "merchantId": "org_j9k0l1m2n3o4p5q6",
  "metadata": {
    "data_center": "eu-west-1",
    "encryption": "enabled",
    "storage_tier": "premium"
  },
  "properties": [
    {
      "billableMetricId": "bm_h3i4j5k6l7m8n9o0",
      "price": null,
      "quantity": 42.3
    }
  ],
  "subscriptionId": "sub_r7s8t9u0v1w2x3y4",
  "timestamp": "2024-05-20T14:45:30Z"
}

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

Unique identifier for a usage event

Response

Usage event details

id
string

Unique identifier for a usage event

object
enum<string>
Available options:
usageEvent
billing
object

Billing information for the usage event when it has been billed.

consumerId
string
createdAt
string<date-time>
customerId
string
description
string

Readable summary explaining what triggered this consumption event. Sample values: 'Claude language model text generation', 'Customer data warehouse storage allocation', 'DALL-E image creation batch job', 'GPT-4 fine-tuning compute session', 'Vector database query operations'

entitlementId
string

Commitment identifier used for this consumption event. Sample values: 'com_abc123xyz', 'com_789def456'

idempotencyKey
string
merchantId
string
metadata
object
properties
object[]
subscriptionId
string
timestamp
string<date-time>