# Get an invoice

`GET https://console.advinservers.com/api/v1/client/invoices/{invoice}`

### Overview

Returns an invoice with its line items, recorded payments and remaining balance. These details are omitted from the invoice list. Use the account's numeric invoice ID, not a UUID. Invoices belonging to another account return 404.

### Permissions

Requires the account permission `invoices.read` (View invoices).

## Authorization

Send `Authorization: Bearer <token>` with the request. 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.

## Path parameters

- `invoice` (string, required): The invoice number shown on the account.

## Response 200

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

- `id` (integer, required): The id ID.
- `number` (string, required): The value of `number`.
- `status` (string, required): The value of `status`.
- `date` (string | null, required): The date and time for date, in UTC.
- `due_date` (string | null, required): The value of `due_date`.
- `date_paid` (string | null, required): The value of `date_paid`.
- `subtotal` (string, required): The value of `subtotal`.
- `credit` (string, required): The available account credit, formatted for display.
- `tax` (string, required): The value of `tax`.
- `total` (string, required): The value of `total`.
- `currency` (string | null, required): The three-letter currency code used for monetary amounts.
- `payment_method` (string | null, required): The value of `payment_method`.
- `url` (string | null, required): The complete URL.
- `type` (string, required): `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.
- `balance` (string): What is still owed.
- `items` (object[] | null): The value of `items`.
  - `id` (integer, required): The id ID.
  - `description` (string, required): An optional description shown to customers.
  - `amount` (string, required): A decimal string in the invoice's currency, never a JSON number.
  - `taxed` (boolean, required): The value of `taxed`.
- `transactions` (object[] | null): The value of `transactions`.
  - `id` (integer, required): The id ID.
  - `date` (string | null, required): The date and time for date, in UTC.
  - `gateway` (string | null, required): The gateway address for the network.
  - `description` (string | null, required): An optional description shown to customers.
  - `amount` (string, required): What came in. A decimal string in the invoice's currency.
  - `fees` (string, required): The value of `fees`.
  - `reference` (string | null, required): The provider's own reference, which is what support quotes back.
- `tax_rate` (string | 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_2` (string | null): The value of `tax_rate_2`.
- `tax_amount` (string): The value of `tax_amount`.
- `tax_amount_2` (string): The value of `tax_amount_2`.
- `pay_to` (object | null): Who the invoice is payable to, or null where the operator has none of it on file.
  - `name` (string | null, required): The party's name: a person's, or a company's.
  - `email` (string | null, required): Where the party is reachable, or null where no address is on file.
  - `address_lines` (string[], required): The postal address, one line at a time, in the order it is read.
- `billed_to` (object | null): Who the invoice was raised for, or null where the billing record could not be read.
  - `name` (string | null, required): The party's name: a person's, or a company's.
  - `email` (string | null, required): Where the party is reachable, or null where no address is on file.
  - `address_lines` (string[], required): The postal address, one line at a time, in the order it is read.

```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"
    ]
  }
}
```

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

## Example request

```bash
curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/invoices/{invoice}' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
