Skip to main content
GET
/
v2
/
invoices
/
{id}
/
lineItems
Get Line Items
curl --request GET \
  --url https://api.paygentic.io/v2/invoices/{id}/lineItems \
  --header 'Authorization: Bearer <token>'
{
  "invoiceId": "inv_r1s2t3u4v5w6x7y8",
  "lineItems": [
    {
      "billableMetricId": "bm_l5m6n7o8p9q0r1s2",
      "invoiceDisplayName": "Claude Token Consumption",
      "meterEventId": "me_x9y0z1a2b3c4d5e6",
      "metricDescription": "Language model token consumption",
      "metricName": "Token Usage",
      "metricUnit": "tokens",
      "quantity": 2500,
      "taxRate": 0.085,
      "totalAmount": "0.05425",
      "totalPrice": "0.05",
      "totalTax": "0.00425",
      "unitPrice": "0.00002",
      "usageEventId": "usg_a1b2c3d4e5f6g7h8"
    },
    {
      "billableMetricId": "bm_h3i4j5k6l7m8n9o0",
      "invoiceDisplayName": "Storage Usage (GB)",
      "meterEventId": "me_f7g8h9i0j1k2l3m4",
      "metricDescription": "Data warehouse storage allocation",
      "metricName": "Storage Usage",
      "metricUnit": "GB",
      "quantity": 42.3,
      "taxRate": 0.1,
      "totalAmount": "5.59",
      "totalPrice": "5.08",
      "totalTax": "0.51",
      "unitPrice": "0.12",
      "usageEventId": "usg_b2c3d4e5f6g7h8i9"
    }
  ],
  "nextPageToken": null,
  "totalCount": 2
}

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

The invoice ID

Query Parameters

limit
integer
default:100

Maximum number of line items to return

Required range: 1 <= x <= 1000
pageToken
string

Token for pagination to fetch the next page of results

Response

Paginated list of invoice line items

invoiceId
string
required

The invoice ID

lineItems
object[]
required

Array of line items for this page

totalCount
integer
required

Total number of line items across all pages

nextPageToken
string | null

Token for fetching the next page, null if no more pages