Skip to content

Get a server's unpaid invoice

GET/servers/{server}/billing/overdue-invoice

Overview

Returns the oldest unpaid invoice covering this server, overdue or not, with its lines and payments, or null when there is none. Only the account holder can read it. Invoices belong to the account and are never shared with a team. Returns null instead of an error when billing information cannot be loaded. Available while the server is suspended.

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/servers/{server}/billing/overdue-invoice' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
{
  "id": 18342,
  "number": "18342",
  "status": "Unpaid",
  "date": "2026-09-11T00:00:00+00:00",
  "due_date": "2026-10-02T00:00:00+00:00",
  "date_paid": null,
  "subtotal": "12.00",
  "credit": "0.00",
  "tax": "0.00",
  "total": "12.00",
  "currency": "USD",
  "payment_method": "Stripe",
  "url": "https://clients.advinservers.com/viewinvoice.php?id=18342",
  "type": "Type",
  "balance": "12.00",
  "items": [
    {
      "id": 24815,
      "description": "Standard 4 GB - lambda-core.blackmesa.example.com (10/02/2026 - 11/01/2026)",
      "amount": "12.00",
      "taxed": false
    }
  ],
  "transactions": [],
  "tax_rate": null,
  "tax_rate_2": null,
  "tax_amount": "0.00",
  "tax_amount_2": "0.00",
  "pay_to": {
    "name": "Advin Services LLC",
    "email": "company@advinservers.com",
    "address_lines": [
      "3640 Concord Pike #1080",
      "Wilmington, DE 19803",
      "United States"
    ]
  },
  "billed_to": {
    "name": "Gordon Freeman",
    "email": "gordon.freeman@blackmesa.example.com",
    "address_lines": [
      "Black Mesa Research Facility",
      "1 Mesa Road",
      "Sector C, Anomalous Materials Laboratory",
      "Socorro, New Mexico 87801",
      "United States"
    ]
  }
}

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

Path parameters

serverstringrequired

The server uuid short

Response 200

application/json

The record, as a JSON object. There is no envelope.

idintegerrequired

The id ID.

numberstringrequired

The value of number.

statusstringrequired

The value of status.

datestring | nullrequired

The date and time for date, in UTC.

due_datestring | nullrequired

The value of due_date.

date_paidstring | nullrequired

The value of date_paid.

subtotalstringrequired

The value of subtotal.

creditstringrequired

The available account credit, formatted for display.

taxstringrequired

The value of tax.

totalstringrequired

The value of total.

currencystring | nullrequired

The three-letter currency code used for monetary amounts.

payment_methodstring | nullrequired

The value of payment_method.

urlstring | nullrequired

The complete URL.

typestringrequired

prepaid for a service renewing ahead of its period, or anything bought; postpaid for a month of hourly usage in the account's postpaid teams.

balancestring

What is still owed.

itemsobject[] | null

The value of items.

Show child attributes
idintegerrequired

The id ID.

descriptionstringrequired

An optional description shown to customers.

amountstringrequired

A decimal string in the invoice's currency, never a JSON number.

taxedbooleanrequired

The value of taxed.

transactionsobject[] | null

The value of transactions.

Show child attributes
idintegerrequired

The id ID.

datestring | nullrequired

The date and time for date, in UTC.

gatewaystring | nullrequired

The gateway address for the network.

descriptionstring | nullrequired

An optional description shown to customers.

amountstringrequired

What came in. A decimal string in the invoice's currency.

feesstringrequired

The value of fees.

referencestring | nullrequired

The provider's own reference, which is what support quotes back.

tax_ratestring | null

The two levels apart, so a viewer can show "GST 5%" and "PST 7%" as their own lines rather than labelling their sum with the first of the two rates.

tax_rate_2string | null

The value of tax_rate_2.

tax_amountstring

The value of tax_amount.

tax_amount_2string

The value of tax_amount_2.

pay_toobject | null

Who the invoice is payable to, or null where the operator has none of it on file.

Show child attributes
namestring | nullrequired

The party's name: a person's, or a company's.

emailstring | nullrequired

Where the party is reachable, or null where no address is on file.

address_linesstring[]required

The postal address, one line at a time, in the order it is read.

billed_toobject | null

Who the invoice was raised for, or null where the billing record could not be read.

Show child attributes
namestring | nullrequired

The party's name: a person's, or a company's.

emailstring | nullrequired

Where the party is reachable, or null where no address is on file.

address_linesstring[]required

The postal address, one line at a time, in the order it is read.

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.
404
The resource was not found in the selected team. Resources in another account or team also return 404.
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.