Get a server's unpaid 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.
Authorization
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
The server uuid short
Response 200
application/jsonThe record, as a JSON object. There is no envelope.
The id ID.
The value of number.
The value of status.
The date and time for date, in UTC.
The value of due_date.
The value of date_paid.
The value of subtotal.
The available account credit, formatted for display.
The value of tax.
The value of total.
The three-letter currency code used for monetary amounts.
The value of payment_method.
The complete URL.
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.
What is still owed.
The value of items.
Show child attributesHide child attributes
The id ID.
An optional description shown to customers.
A decimal string in the invoice's currency, never a JSON number.
The value of taxed.
The value of transactions.
Show child attributesHide child attributes
The id ID.
The date and time for date, in UTC.
The gateway address for the network.
An optional description shown to customers.
What came in. A decimal string in the invoice's currency.
The value of fees.
The provider's own reference, which is what support quotes back.
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.
The value of tax_rate_2.
The value of tax_amount.
The value of tax_amount_2.
Who the invoice is payable to, or null where the operator has none of it on file.
Show child attributesHide child attributes
The party's name: a person's, or a company's.
Where the party is reachable, or null where no address is on file.
The postal address, one line at a time, in the order it is read.
Who the invoice was raised for, or null where the billing record could not be read.
Show child attributesHide child attributes
The party's name: a person's, or a company's.
Where the party is reachable, or null where no address is on file.
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-Afterheader says how many seconds to wait. Limits are per account, so several keys on one account share them.
Still stuck? Contact our team
View as Markdown