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": [
    {
      "eventType": "usage",
      "eventId": "usg_a1b2c3d4e5f6g7h8",
      "eventSourceId": "bm_l5m6n7o8p9q0r1s2",
      "invoiceDisplayName": "Claude Token Consumption",
      "lineItemType": "charge",
      "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"
    },
    {
      "eventType": "fee",
      "eventId": "fee_b2c3d4e5f6g7h8i9",
      "eventSourceId": "fee_h3i4j5k6l7m8n9o0",
      "invoiceDisplayName": "Platform Fee",
      "meterEventId": "",
      "metricDescription": "Monthly platform fee",
      "metricName": "Platform Fee",
      "metricUnit": "charge",
      "quantity": 1,
      "taxRate": 0.1,
      "totalAmount": "5.50",
      "totalPrice": "5.00",
      "totalTax": "0.50",
      "unitPrice": "5.00"
    }
  ],
  "nextPageToken": null,
  "totalCount": 3
}

Documentation Index

Fetch the complete documentation index at: https://docs.paygentic.io/llms.txt

Use this file to discover all available pages before exploring further.

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