TypeScript
const options = {method: 'GET'}; fetch('https://api.example.com/v1/regions/global/projects/billing', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "success": true, "data": { "projectId": "<string>", "status": "active", "currentPeriod": { "start": "2023-11-07T05:31:56Z", "end": "2023-11-07T05:31:56Z" }, "usage": { "compute": 123, "storage": 123, "network": 123, "total": 123, "currency": "USD" }, "invoices": [ { "id": "<string>", "number": "<string>", "status": "draft", "amount": 123, "currency": "<string>", "periodStart": "2023-11-07T05:31:56Z", "periodEnd": "2023-11-07T05:31:56Z", "dueDate": "2023-11-07T05:31:56Z", "createdAt": "2023-11-07T05:31:56Z" } ] } }
Get billing information for the current project, including usage summary and recent invoices
Project identifier (defaults to current project from auth context)
Project billing information
true
Show child attributes
Was this page helpful?