---
title: "Amount due, cost so far and the estimated bill"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Billing API › Billing

`GET /v1/organizations/{orgId}/billing/summary`

## Authentication

Requires one of the following:

- `apiKey`, http, header `Authorization`
- `oauth`, http, header `Authorization`
- `sessionCookie`, apiKey, in cookie

## Path parameters

- `GetBillingSummary.path.orgId` (string, required)
  - format `uuid`

## Code samples

### cURL

```curl
curl --request GET \
  --url https://billing.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/summary \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://billing.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/summary';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://billing.ezghcloud.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/summary"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "organizationId": "string",
  "currency": "string",
  "amountDueMicros": "string",
  "costSoFarMicros": "string",
  "estimatedBillCents": "string",
  "period": {
    "start": "2019-08-24T14:15:22Z",
    "end": "2019-08-24T14:15:22Z",
    "issuesAt": "2019-08-24T14:15:22Z"
  },
  "openInvoices": 0,
  "overdueInvoices": 0,
  "overdueCents": "string"
}
```

- `GetBillingSummary.response.200.organizationId` (string, required)
- `GetBillingSummary.response.200.currency` (string, required)
- `GetBillingSummary.response.200.amountDueMicros` (string, required) — What's owed on issued invoices, in micros.
  - pattern `^-?[0-9]+(\.[0-9]+)?$`
- `GetBillingSummary.response.200.costSoFarMicros` (string, required) — The open billing period's charges so far, in micros.
  - pattern `^-?[0-9]+(\.[0-9]+)?$`
- `GetBillingSummary.response.200.estimatedBillCents` (string, required) — The upcoming invoice's total, in cents.
  - pattern `^-?[0-9]+(\.[0-9]+)?$`
- `GetBillingSummary.response.200.period` (object, required) — The open billing period.
  - `GetBillingSummary.response.200.period.start` (string, required)
    - format `date-time`
  - `GetBillingSummary.response.200.period.end` (string, required) — Exclusive.
    - format `date-time`
  - `GetBillingSummary.response.200.period.issuesAt` (string, required) — When the period's invoice is issued.
    - format `date-time`
- `GetBillingSummary.response.200.openInvoices` (integer, required)
- `GetBillingSummary.response.200.overdueInvoices` (integer, required)
- `GetBillingSummary.response.200.overdueCents` (string, required) — What's overdue, in cents.
  - pattern `^-?[0-9]+(\.[0-9]+)?$`

### 401

unauthenticated: no valid credential.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `GetBillingSummary.response.401.error` (object, required)
  - `GetBillingSummary.response.401.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `GetBillingSummary.response.401.error.message` (string, required) — What went wrong, for people.
  - `GetBillingSummary.response.401.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `GetBillingSummary.response.401.error.issues.path` (string, required)
    - `GetBillingSummary.response.401.error.issues.message` (string, required)

### 403

access_denied: the caller isn't allowed to (the message names the action); forbidden_origin: a cookie-authenticated write from another site.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `GetBillingSummary.response.403.error` (object, required)
  - `GetBillingSummary.response.403.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `GetBillingSummary.response.403.error.message` (string, required) — What went wrong, for people.
  - `GetBillingSummary.response.403.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `GetBillingSummary.response.403.error.issues.path` (string, required)
    - `GetBillingSummary.response.403.error.issues.message` (string, required)

### 404

not_found: the organization (or one the caller doesn't belong to), or the resource, doesn't exist.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `GetBillingSummary.response.404.error` (object, required)
  - `GetBillingSummary.response.404.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `GetBillingSummary.response.404.error.message` (string, required) — What went wrong, for people.
  - `GetBillingSummary.response.404.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `GetBillingSummary.response.404.error.issues.path` (string, required)
    - `GetBillingSummary.response.404.error.issues.message` (string, required)

### 429

too_many_requests: slow down.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `GetBillingSummary.response.429.error` (object, required)
  - `GetBillingSummary.response.429.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `GetBillingSummary.response.429.error.message` (string, required) — What went wrong, for people.
  - `GetBillingSummary.response.429.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `GetBillingSummary.response.429.error.issues.path` (string, required)
    - `GetBillingSummary.response.429.error.issues.message` (string, required)

### 500

internal_error: a bug; the details are in the logs, under the request ID.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `GetBillingSummary.response.500.error` (object, required)
  - `GetBillingSummary.response.500.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `GetBillingSummary.response.500.error.message` (string, required) — What went wrong, for people.
  - `GetBillingSummary.response.500.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `GetBillingSummary.response.500.error.issues.path` (string, required)
    - `GetBillingSummary.response.500.error.issues.message` (string, required)

### 503

unavailable, ledger_unavailable or payments_unavailable: retry later.

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "issues": [
      {
        "path": "string",
        "message": "string"
      }
    ]
  }
}
```

- `GetBillingSummary.response.503.error` (object, required)
  - `GetBillingSummary.response.503.error.code` (string, required) — What went wrong, for programs: branch on this, never on message.
  - `GetBillingSummary.response.503.error.message` (string, required) — What went wrong, for people.
  - `GetBillingSummary.response.503.error.issues` (array<object>, optional) — With invalid_request: each invalid field.
    - `GetBillingSummary.response.503.error.issues.path` (string, required)
    - `GetBillingSummary.response.503.error.issues.message` (string, required)


Source: https://docs.ezghcloud.com/billing-api/Billing/GetBillingSummary/index.md
