Skip to content

List service billing details

GET/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.

curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/billing/services' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/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
  }
]

Authorization

Authorizationstringheaderrequired

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.

Send it as Bearer <token>.

Response 200

application/json

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

service_idintegerrequired

The service id ID.

namestringrequired

The name shown to customers.

hostnamestring | nullrequired

The fully qualified hostname.

statusstring | nullrequired

The value of status.

billing_cyclestring | nullrequired

How often the service renews and is billed.

recurring_amountstring | nullrequired

The amount charged each billing cycle.

currencystring | nullrequired

The three-letter currency code used for monetary amounts.

server_idstring | nullrequired

The server id ID.

next_due_datestring | nullrequired

The value of next_due_date.

periodobject | nullrequired

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.

Show child attributes
starts_atstringrequired

The date and time for starts at, in UTC.

ends_atstringrequired

The date and time for ends at, in UTC.

total_daysintegerrequired

The value of total_days.

days_remainingintegerrequired

The value of days_remaining.

days_overdueintegerrequired

Zero rather than a negative days_remaining, so a caller never has to decide which of the two fields to believe.

remaining_fractionnumberrequired

The share of the period still to run.

statestringrequired

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_pricestring | nullrequired

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.

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.