Billing & FinOps

Preview — pending review

This reference is generated from the platform API contract and is still under review. Operations, fields, and descriptions can change before publication.

Retrieve the invoice detail read model

GET
/scopes/{scopeId}/billing/invoices/{invoiceId}

Returns the full invoice detail read model consumed by the invoice detail page: the invoice header (number, period, status, subtotal/tax/total in ten-thousandths of the currency unit, issue and due dates), the per-meter line items, the same lines grouped by service bucket for the grouped table, the billing metadata panel (PO number, payment method label, payment terms, billing contact, tax id, credits applied) and the payment-status timeline of ISSUED/SENT/VIEWED/REMINDER/PAID/OVERDUE/CANCELLED/FAILED events. Line items always foot exactly to the invoice subtotal (a proration/rounding adjustment line absorbs any difference). Validation: invoiceId must reference an invoice visible in the active scope (otherwise 404 NOT_FOUND); the caller must hold billing read access in the scope (otherwise 403 FORBIDDEN). Async & state: Synchronous read; no state change. No SSE frames are emitted. Errors: 401 unauthenticated; 403 caller lacks billing read access; 404 unknown invoiceId in the scope; 500 on backend read-model failure. Idempotency/Concurrency: Safe, cacheable; no idempotency key required. The response carries an ETag usable for change detection by polling clients.

Authorization

bearerToken
headerAuthorizationBearer <token>

An API token (pc_live_…) or a service-account key (sak_live_…), created in Identity & Access Management and sent as Authorization: Bearer <token>. Requests are rate limited per credential and per tenant: every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, and a refused request gets 429 RATE_LIMITED with Retry-After.

Path Parameters

scopeId*string

Opaque ownership+authorization scope resolving to tenant + subscription + project.

invoiceId*string

Identifier of the invoice to retrieve.

Response Body

Invoice detail read model with lines, service groups, metadata and payment timeline.

application/json
  1. response

Read model backing the invoice detail page — invoice header plus lines, service groups, metadata and payment timeline.

invoice*

An invoice issued for the scope, with amounts in ten-thousandths of the subscription currency's unit.

lines*array<>
serviceGroups*array<>
meta*

Invoice detail metadata panel (purchase order, payment terms, contacts, applied credits).

timeline*array<>
prepaidItems?array<>

Amounts already paid that this invoice records but does not charge -- each commitment upfront settled in the invoice period, with its net, VAT and the charge transaction it was paid through.

curl -X GET "https://example.com/scopes/string/billing/invoices/string"
{  "invoice": {    "id": "inv-2026-06",    "number": "STC-2026-1042",    "description": "Cloud services — June 2026 (current)",    "currency": "USD",    "subtotal": 0,    "tax": 0,    "total": 0,    "prepaid": 0,    "prepaidNet": 0,    "prepaidTax": 0,    "status": "PAID",    "issuedAt": "2019-08-24T14:15:22Z",    "dueAt": "2019-08-24T14:15:22Z",    "period": "June 2026 (current)"  },  "lines": [    {      "id": "inv-2026-06-l0",      "description": "Compute — vCPU hours",      "detail": "G-series virtual machines",      "quantity": 0,      "unit": "vCPU-hr",      "unitPrice": 0,      "amount": 0,      "unpriced": false    }  ],  "serviceGroups": [    {      "service": "Compute",      "color": "var(--color-brand)",      "lines": [        {          "id": "inv-2026-06-l0",          "description": "Compute — vCPU hours",          "detail": "G-series virtual machines",          "quantity": 0,          "unit": "vCPU-hr",          "unitPrice": 0,          "amount": 0,          "unpriced": false        }      ],      "subtotal": 0    }  ],  "meta": {    "poNumber": "PO-ACME-8841",    "paymentMethodLabel": "Visa •••• 4242",    "paymentTerms": "Net 14",    "billingContactEmail": "billing@acme.example",    "taxId": "VAT DE811234567",    "creditsApplied": 0,    "creditsAppliedAfterTax": 0,    "subsidiary": {      "id": "string",      "country": "string",      "name": "Acme Cloud Türkiye",      "legalName": "Sun and Bulut Bilişim A.Ş.",      "address": "Maslak Mah. No:1, İstanbul, Türkiye",      "email": "faturalama@publiccloud.example",      "phone": "+90 212 000 0000",      "taxId": "1234567890"    },    "billTo": {      "name": "Acme Industries",      "company": "Acme Industries LLC",      "email": "billing@acme.example",      "addressLine": "100 Market St, Suite 200",      "city": "San Francisco",      "state": "CA",      "postalCode": "94103",      "country": "US",      "taxId": "US-99-1234567"    },    "taxName": "KDV",    "taxRateBps": 2000  },  "timeline": [    {      "id": "inv-2026-06-ISSUED",      "kind": "ISSUED",      "label": "Invoice issued",      "at": "2019-08-24T14:15:22Z",      "detail": "string",      "done": true    }  ],  "prepaidItems": [    {      "chargeId": "string",      "commitmentId": "string",      "description": "Commitment upfront — compute-1y",      "net": 0,      "tax": 0,      "gross": 0,      "settledAt": "2019-08-24T14:15:22Z"    }  ]}