Skip to content

List services with payment settings

GET/billing/managed-services

Overview

Lists account services with automatic payment details and available actions. A false can_* flag means the corresponding action will be rejected. A true can_change_cycle flag does not guarantee that a change will succeed: an unpaid invoice can still prevent it.

sells_subscriptions indicates whether automatic payments are available. cancellations_withdrawable indicates whether pending cancellations can be withdrawn here. account_credit_switchable indicates whether credit payments can be enabled or disabled per service. cancellation_types lists accepted cancellation values and their labels.

A service billed by the hour in a postpaid team has a non-null postpaid_monthly_price. It shows no period or recurring amount of its own, but it is charged on the monthly postpaid invoice.

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/managed-services' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
{
  "sells_subscriptions": true,
  "cancellations_withdrawable": true,
  "account_credit_switchable": true,
  "cancellation_types": [
    {
      "value": "immediate",
      "label": "Immediately"
    },
    {
      "value": "end_of_billing",
      "label": "At the end of the billing period"
    }
  ],
  "items": [
    {
      "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"
      },
      "autopay": true,
      "autopay_ending": false,
      "subscription": {
        "uuid": "a216c52c-ccea-430f-b3bf-09aaf1025a44",
        "uuid_short": "Uuid short",
        "status": "active",
        "next_charge_at": "2026-10-02T19:15:08+00:00",
        "ends_at": null,
        "amount": "12.00",
        "currency": "USD",
        "paypal_account": "Paypal account",
        "payment_card": "Payment card"
      },
      "cancellation": null,
      "can_start_subscription": false,
      "can_cancel_subscription": true,
      "can_change_cycle": true,
      "can_cancel_service": true,
      "can_withdraw_cancellation": false,
      "immediate_refund": "7.20",
      "pays_from_credit": true,
      "can_change_credit": true,
      "autopay_provider": "card",
      "autopay_details": "active",
      "suspension_reason": null,
      "autopay_by_account": true,
      "credit_by_account": true,
      "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 record, as a JSON object. There is no envelope.

sells_subscriptionsbooleanrequired

The value of sells_subscriptions.

cancellations_withdrawablebooleanrequired

The value of cancellations_withdrawable.

account_credit_switchablebooleanrequired

The value of account_credit_switchable.

cancellation_typesobject[]required

The value of cancellation_types.

Show child attributes
valuestringrequired

The value of value.

labelstringrequired

A short label shown to customers.

itemsobject[]required

Account services with their billing periods, automatic payments, pending cancellations and available actions.

Show child attributes
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 value of period.

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.

autopaybooleanrequired

Whether anything will be charged automatically. The tick or the cross in the Autopay column.

autopay_endingbooleanrequired

Autopay that has been turned off but has not stopped yet. Its own state, drawn between the tick and the cross.

subscriptionobject | nullrequired

The value of subscription.

Show child attributes
uuidstringrequired

The uuid UUID.

uuid_shortstringrequired

The value of uuid_short.

statusstringrequired

The payment provider's current status.

next_charge_atstring | nullrequired

Null once nothing further will be charged, including for a subscription that is merely winding down.

ends_atstring | nullrequired

When an agreed cancellation actually takes effect.

amountstring | nullrequired

Excludes tax.

currencystring | nullrequired

The three-letter currency code used for monetary amounts.

paypal_accountstring | nullrequired

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

payment_cardstring | nullrequired

The saved card it is charged to, such as "Visa ending 4242", when it is one.

cancellationobject | nullrequired

The value of cancellation.

Show child attributes
requested_atstring | nullrequired

The date and time for requested at, in UTC.

typestring | nullrequired

The type of operation or resource.

type_labelstring | nullrequired

The value of type_label.

reasonstring | nullrequired

The value of reason.

can_start_subscriptionbooleanrequired

Whether the customer can start subscription.

can_cancel_subscriptionbooleanrequired

Whether the customer can cancel subscription.

can_change_cyclebooleanrequired

Whether the customer can change cycle.

can_cancel_servicebooleanrequired

Whether the customer can cancel service.

can_withdraw_cancellationbooleanrequired

Whether the customer can withdraw cancellation.

immediate_refundstring | nullrequired

What stopping this service today would put back on the account, in the currency beside it.

pays_from_creditbooleanrequired

Whether renewals of this service are paid out of the account's credit balance where there is one. True unless the customer has turned it off, which is what the balance does by default.

can_change_creditbooleanrequired

Whether that can be changed from here. False where the installation does not offer account credit at all, or cannot enforce the answer per service.

autopay_providerstring | nullrequired

The value of autopay_provider.

autopay_detailsstring | nullrequired

The value of autopay_details.

suspension_reasonstring | nullrequired

The value of suspension_reason.

autopay_by_accountbooleanrequired

Whether it is charged because automatic payments are on for the whole account, which is where they are turned off.

credit_by_accountbooleanrequired

Whether the credit setting is the account's, chosen on Billing while automatic payments are on for the whole account, rather than this service's own.

postpaid_monthly_pricestring | nullrequired

The value of postpaid_monthly_price.

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.