Lists finalized invoices.
Required permission
Organisation > Admin > Billing > Read
Query parameters
cursor
stringThe cursor returned from the previous page of results, used to request the next page.perPage
integerThe number of results to display per request. Maximum of 100 results per page.removeLegacyFields
booleanFor a billing entity temporarily receiving the legacy billing API contract, return the current contract instead. Use the current query parameters with this option.
Response body
- {object}Response object.
data
{object} requiredResult data.invoices
[array]- {object}
id
stringIdentifier for the invoice.period
{object}start
numberThe start of the billing period, as a Unix timestamp.end
numberThe end of the billing period, as a Unix timestamp.currency
stringThe currency code.status
stringThe invoice payment status, as reported by Stripe. `open` is finalized and awaiting payment — including while a payment is in flight or awaiting authentication — `uncollectible` has been written off, and `void` has been cancelled. `payment_failed` is only reported for invoices with no Stripe status to defer to.one ofdraft, open, payment_failed, paid, uncollectible, voidtotal
numberThe total cost of the invoice, including tax. Omitted for a team-scoped caller.subTotal
numberThe subtotal before tax and discounts. Omitted for a team-scoped caller.scope
{object}Present when the response is narrowed to the caller's own entity.entityType
stringThe entity the response is limited to.one ofteamentityId
stringIdentifier of that entity.paas
{object}The PaaS price and usage totals for the period. Customer-level, except for a team-scoped caller, where it is that team's own slice — PaaS is the one category with a per-team tier, so it is reported rather than withheld. Drill into it per project and resource on the invoice detail endpoint.price
{object}total
numberThe total PaaS price, rounded to 2 decimal places.cpu
numberThe CPU usage price.memory
numberThe memory usage price.storage
numberThe storage usage price.gpu
numberThe GPU usage price.usage
{object}vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.storageGiBHours
numberStorage GiB-hours consumed.gpuSpotHours
numberSpot GPU hours consumed.gpuOnDemandHours
numberOn-demand GPU hours consumed.build
{object}The share of the usage attributable to builds.vcpuHours
numbermemoryGiBHours
numberrun
{object}The share of the usage attributable to running workloads.vcpuHours
numbermemoryGiBHours
numberbyoc
{object}The customer-level BYOC price and usage totals for the period. Omitted for a team-scoped caller: BYOC is aggregated to the customer and has no per-team tier.price
{object}The customer-level BYOC price total. Always reflects the full customer total, regardless of drill-down filters.total
numberThe total BYOC price, rounded to 2 decimal places.vcpu
numberThe vCPU usage price.memory
numberThe memory usage price.gpuMemory
numberThe GPU memory usage price.cluster
numberThe cluster usage price.usage
{object}Customer-level BYOC usage hours.vcpuHours
numbervCPU hours consumed.memoryGiBHours
numberMemory GiB-hours consumed.clusterHours
numberCluster hours consumed.gpuMemoryGiBHours
numberGPU memory GiB-hours consumed.egressIp
{object}Egress IP spend for the period. Omitted for a team-scoped caller.price
{object}total
numberThe total price, rounded to 2 decimal places.usage
{object}hours
numberHours consumed.loadBalancer
{object}Load balancer spend for the period. Omitted for a team-scoped caller.price
{object}total
numberThe total price, rounded to 2 decimal places.usage
{object}hours
numberHours consumed.pagination
{object} requiredData about the endpoint pagination.hasNextPage
boolean requiredIs there another page of results available?cursor
stringThe cursor to access the next page of results.count
number requiredThe number of results returned by this request.
API
CLI
JS Client
GET /v1/billing/invoices
GET /v1/teams/{teamId}/billing/invoices
Example response
200 OK
A list of invoices.
JSON
{
"data": {
"invoices": [
{
"currency": "usd",
"status": "paid",
"paas": {
"price": {
"total": 69.22
}
}
}
]
},
"pagination": {
"hasNextPage": false,
"count": 1
}
}