# Add funds to the account

`POST https://console.advinservers.com/api/v1/client/billing/deposits`

### Overview

Creates an invoice and checkout for an account credit top-up. **Payment is required.** Send a decimal `amount` within the published `minimum`, `maximum` and remaining balance limit, and, when the account credit reports `withdrawal_waiver_required` (billing addresses in the EU, the EEA or the UK), `waives_withdrawal: true` to confirm you give up your right of withdrawal once the credit is added.

Credit is added only after the invoice is paid and the payment is processed. Use `billing.checkout_uuid` to pay in the panel, or `billing.invoice_url` as a fallback. Adding credit does not purchase a service.

Only one top-up waits for payment at a time. Starting another cancels the one still waiting, unless a payment for it is already being processed, in which case the request is rejected. A top-up that is not paid within the payment window is cancelled automatically.

### Permissions

Requires the account permission `billing.manage` (Manage billing).

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

## Body

Sent as `application/json`.

- `amount` (number, required): The amount in the currency shown by `currency`. 0.01 to 1000000
- `waives_withdrawal` (boolean): The value of `waives_withdrawal`.

## Response 201

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

- `uuid` (string, required): The uuid UUID.
- `uuid_short` (string, required): The value of `uuid_short`.
- `status` (string, required): The value of `status`. One of: `pending_payment`, `credited`, `expired`, `cancelled`.
- `status_label` (string, required): The status in the customer's words, written once on the enum.
- `payment_in_progress` (boolean, required): Paid or being paid at a checkout, before the top-up shows it. The dialog reads it to stop a second payment; the list shows only Unpaid or Paid.
- `billing` (object, required): The value of `billing`.
  - `service_id` (integer | null, required): The customer's service number, once a recurring service exists.
  - `invoice_id` (integer | null, required): The customer's invoice number, once an invoice exists.
  - `invoice_url` (string | null, required): A complete URL where the invoice can be paid.
  - `checkout_uuid` (string | null, required): The checkout UUID, or null when no checkout is available.
  - `checkout_uuid_short` (string | null, required): The value of `checkout_uuid_short`.
  - `invoice_status` (string | null, required): The current invoice status, or null before an invoice exists.
  - `amount` (string | null, required): The amount in the currency shown by `currency`.
  - `currency` (string | null, required): The three-letter currency code used for `amount`.
  - `billing_cycle` (string | null, required): How often the service renews, or null for a one-time charge.
  - `payment_due_at` (string | null, required): When payment is due before the reservation is released.
  - `payment_window_minutes` (integer | null, required): How many minutes the original payment window allowed.
  - `paid_at` (string | null, required): When the charge was paid, or null while payment is outstanding.
- `credited_at` (string | null, required): The date and time for credited at, in UTC.
- `cancelled_at` (string | null, required): The date and time for cancelled at, in UTC.
- `created_at` (string | null, required): The date and time for created at, in UTC.

```json
{
  "uuid": "20a09a3f-a6cf-4470-b078-7330235aa5d5",
  "uuid_short": "Uuid short",
  "status": "pending_payment",
  "status_label": "Unpaid",
  "payment_in_progress": true,
  "billing": {
    "service_id": null,
    "invoice_id": 18386,
    "invoice_url": "https://clients.advinservers.com/viewinvoice.php?id=18386",
    "checkout_uuid": "53a832f9-e85e-44b5-af03-2ef26110686d",
    "invoice_status": "Unpaid",
    "amount": "25.00",
    "currency": "USD",
    "billing_cycle": null,
    "payment_due_at": "2026-09-14T17:12:09+00:00",
    "payment_window_minutes": null,
    "paid_at": null
  },
  "credited_at": null,
  "cancelled_at": null,
  "created_at": "2026-09-14T16:42:09+00:00"
}
```

## 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.
- `422`: A field is missing or invalid, or the resource cannot accept this change in its current state. Check `message` for details. Field validation also includes an `errors` object keyed by field name.
- `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 POST \
  --url 'https://console.advinservers.com/api/v1/client/billing/deposits' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": "25.00"
}'
```
