Skip to content

List automatic payments

GET/billing/subscriptions

Overview

Lists automatic payment subscriptions across the account's teams. Subscription details are refreshed from the payment provider when requested. If the provider is unavailable, the last known details are returned.

Amounts are decimal strings excluding tax. Tax is calculated using the customer's location at the time of payment. is_ending identifies a subscription that has been stopped but has not reached its end date. Display it separately from active and cancelled subscriptions. sells_subscriptions indicates whether automatic payments are available, even when the list is empty.

Permissions

Requires the account permission billing.read (View billing).

curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/billing/subscriptions' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
{
  "sells_subscriptions": true,
  "items": [
    {
      "uuid": "a216c52c-ccea-430f-b3bf-09aaf1025a44",
      "uuid_short": "Uuid short",
      "provider": "card",
      "status": "active",
      "is_healthy": true,
      "is_cancelled": false,
      "is_ending": false,
      "description": "Standard 4 GB · Kansas City, MO · Monthly",
      "billing_cycle": "monthly",
      "amount": "12.00",
      "currency": "USD",
      "next_charge_at": "2026-10-02T19:15:08+00:00",
      "ends_at": null,
      "cancelled_at": null,
      "last_paid_at": "2026-09-02T19:15:08+00:00",
      "can_cancel": true,
      "services": [
        {
          "service_id": 7312,
          "name": "Standard 4 GB",
          "hostname": "lambda-core.blackmesa.example.com",
          "status": "Active",
          "next_due_date": "2026-10-02",
          "server_id": "ecc6f4f1",
          "server": {
            "id": "ecc6f4f1",
            "name": "lambda-core",
            "hostname": "lambda-core.blackmesa.example.com",
            "location": "Kansas City, MO",
            "windows": false,
            "template_name": "Ubuntu 24.04",
            "template_icon_url": "/assets/icons/ubuntu.png"
          },
          "is_known": true
        }
      ],
      "cancellation_service_id": null,
      "paypal_account": "Paypal account"
    }
  ]
}

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 record, as a JSON object. There is no envelope.

sells_subscriptionsbooleanrequired

The value of sells_subscriptions.

itemsobject[]required

Subscriptions, active ones first, with the service covered and the next payment date.

Show child attributes
uuidstringrequired

The uuid UUID.

uuid_shortstringrequired

The value of uuid_short.

providerstringrequired

The payment provider, such as card, paypal, or stripe.

statusstringrequired

The payment provider's current status.

is_healthybooleanrequired

Whether the resource is healthy.

is_cancelledbooleanrequired

Whether the resource is cancelled.

is_endingbooleanrequired

Whether the resource is ending.

descriptionstring | nullrequired

What it was bought as. The fallback name for a row whose services have gone away.

billing_cyclestring | nullrequired

How often the service renews and is billed.

amountstring | nullrequired

Excludes tax.

currencystring | nullrequired

The three-letter currency code used for monetary amounts.

next_charge_atstring | nullrequired

The next charge date, or null if no further payments are scheduled. Ending subscriptions have no next charge date. If the payment provider has not reported a date, this is the next due date of the earliest service covered.

ends_atstring | nullrequired

When the agreed cancellation actually takes effect.

cancelled_atstring | nullrequired

The date and time for cancelled at, in UTC.

last_paid_atstring | nullrequired

The date and time for last paid at, in UTC.

can_cancelbooleanrequired

Whether the subscription can still be cancelled through its payment provider.

servicesobject[]required

The value of services.

Show child attributes
service_idintegerrequired

The service id ID.

namestring | nullrequired

The name shown to customers.

hostnamestring | nullrequired

The fully qualified hostname.

statusstring | nullrequired

The value of status.

next_due_datestring | nullrequired

The value of next_due_date.

server_idstring | nullrequired

The server id ID.

serverobject | nullrequired

The machine itself, where the account still holds one for this service. Null for anything else a subscription pays for, and for a server that has since been handed back.

Show child attributes
idstringrequired

The id ID.

namestringrequired

The name shown to customers.

hostnamestringrequired

The fully qualified hostname.

locationstringrequired

The city the server stands in, e.g. "Nuremberg, DE".

windowsbooleanrequired

The value of windows.

template_namestring | nullrequired

The value of template_name.

template_icon_urlstring | nullrequired

The value of template_icon_url.

is_knownbooleanrequired

Whether the resource is known.

cancellation_service_idinteger | nullrequired

For external payments, use the service autopay cancellation endpoint.

paypal_accountstring | nullrequired

The email address of the saved PayPal account it is charged to, when it is one.

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.