# List invoices that can be paid together

`GET https://console.advinservers.com/api/v1/client/invoices/bulk-payment`

### Overview

Lists the account's outstanding invoices, newest first, up to 50. Each says whether it can be paid together with others and, if not, why in `reason`. `balance` is what is still owed. `limit` is the most invoices one payment can cover.

Invoices for services with automatic payments on can be included. Their automatic payments stay on, and the next automatic charge moves to the service's new due date once the invoice is paid. A charge too close to move still goes through, and the overpayment is added to account credit. Add funds invoices, invoices for orders placed in the panel and invoices already being paid are left out. `available` is false when paying invoices together is switched off.

### Permissions

Requires the account permission `invoices.pay` (Pay 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.

## Response 200

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

- `available` (boolean, required): The value of `available`.
- `limit` (integer, required): The value of `limit`.
- `items` (object[], required): The outstanding invoices, newest first.
  - `id` (integer, required): The id ID.
  - `number` (string, required): The value of `number`.
  - `balance` (string, required): The value of `balance`.
  - `currency` (string | null, required): The three-letter currency code used for monetary amounts.
  - `payable` (boolean, required): The value of `payable`.
  - `reason` (string | null, required): The value of `reason`.

```json
{
  "available": true,
  "limit": 20,
  "items": [
    {
      "id": 1042,
      "number": "1042",
      "balance": "12.50",
      "currency": "USD",
      "payable": true,
      "reason": null
    },
    {
      "id": 1041,
      "number": "1041",
      "balance": "8.00",
      "currency": "USD",
      "payable": false,
      "reason": "This invoice is already being paid."
    }
  ]
}
```

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

## Example request

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