# List service billing details

`GET https://console.advinservers.com/api/v1/client/billing/services`

### Overview

Lists billing details for every service on the account, across all teams. Each service includes its billing cycle, recurring amount, next due date and current paid period. Use `server_id` to match a service to its server. Amounts are formatted strings ready to display.

A service in a postpaid team is billed by the hour on the monthly postpaid invoice, not on a cycle of its own. It has no `period` and reads as a free service with a zero `recurring_amount`, but it is charged: `postpaid_monthly_price` is what a full month costs, and the postpaid invoice endpoints show what has been billed. `postpaid_monthly_price` is null for every other service. `period` is also null for one-time purchases and genuinely free services.

### Permissions

Requires the `billing.read` (View billing) permission for the selected team. Resources outside that team return 404.

## Authorization

Send `Authorization: Bearer <token>` with the request. Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

## Response 200

The whole set, as a JSON array. There is no envelope and no paging.

- `service_id` (integer, required): The service id ID.
- `name` (string, required): The name shown to customers.
- `hostname` (string | null, required): The fully qualified hostname.
- `status` (string | null, required): The value of `status`.
- `billing_cycle` (string | null, required): How often the service renews and is billed.
- `recurring_amount` (string | null, required): The amount charged each billing cycle.
- `currency` (string | null, required): The three-letter currency code used for monetary amounts.
- `server_id` (string | null, required): The server id ID.
- `next_due_date` (string | null, required): The value of `next_due_date`.
- `period` (object | null, required): The current billing period, or null for a service that does not renew: a one-time purchase, a free service, or one billed by the hour.
  - `starts_at` (string, required): The date and time for starts at, in UTC.
  - `ends_at` (string, required): The date and time for ends at, in UTC.
  - `total_days` (integer, required): The value of `total_days`.
  - `days_remaining` (integer, required): The value of `days_remaining`.
  - `days_overdue` (integer, required): Zero rather than a negative `days_remaining`, so a caller never has to decide which of the two fields to believe.
  - `remaining_fraction` (number, required): The share of the period still to run.
  - `state` (string, required): `healthy`, `due_soon`, `critical` or `overdue`, named on the server so every surface showing a term agrees about when one has become worth worrying about.
- `postpaid_monthly_price` (string | null, required): What a full month costs while the service is billed by the hour on the monthly postpaid invoice, or null when it is not. Such a service shows no recurring charge of its own, but it is not free.

```json
[
  {
    "service_id": 7312,
    "name": "Standard 4 GB",
    "hostname": "lambda-core.blackmesa.example.com",
    "status": "Active",
    "billing_cycle": "Monthly",
    "recurring_amount": "12.00",
    "currency": "USD",
    "server_id": "ecc6f4f1",
    "next_due_date": "2026-10-02",
    "period": {
      "starts_at": "2026-09-02",
      "ends_at": "2026-10-02",
      "total_days": 30,
      "days_remaining": 18,
      "days_overdue": 0,
      "remaining_fraction": 0.6,
      "state": "healthy"
    },
    "postpaid_monthly_price": null
  }
]
```

## Errors

- `401`: The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- `403`: Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- `429`: Too many requests. The `Retry-After` header says how many seconds to wait. Limits are per account, so several keys on one account share them.

## Example request

```bash
curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/billing/services' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
