Skip to main content
GET
/
v1
/
regions
/
global
/
projects
/
billing
Get project billing
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"
      }
    ]
  }
}

Query Parameters

projectId
string

Project identifier (defaults to current project from auth context)

Response

200 - application/json

Project billing information

success
enum<boolean>
Available options:
true
data
object

Project billing information