> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arct.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Account Credit

> Credit balance, transactions and paying with account credit.

Account credit is a prepaid USD balance. It pays a new server, a resize or an invoice in full; there are no partial payments.

> [!NOTE]
>
> `400 credit_unavailable` means account credit isn't enabled for your account.

## Balance

`GET /account` returns:

| Field | Description |
| - | - |
| `credit_balance` | Account credit, USD. |
| `credit_autopay` | `true` if credit pays due renewal invoices automatically. Card-billed servers keep charging the card. Set in the dashboard. |

## Transactions

`GET /credit-transactions` lists your transactions, newest first, [paginated](/api-reference/pagination.md).

```bash theme={null}
curl https://api.arct.cloud/v1/credit-transactions \
  -H "Authorization: Bearer $ARCT_TOKEN"
```

| Field | Description |
| - | - |
| `type` | `topup`, `order_payment`, `invoice_payment`, `invoice_refund`, `adjustment`, `refund_payout`. |
| `amount` | USD, signed: positive adds credit, negative spends or removes it. |
| `balance_after` | Your credit right after this entry. |
| `description` | Short text, such as the invoice number. |
| `invoice_id`, `order_id` | Related invoice or order, else `null`. |

## Pay With Credit

Needs a `read_write` token and a verified email (`403 email_not_verified`). Counts against the [Paid limit](/api-reference/rate-limits.md).

| Action | Request |
| - | - |
| Create a server | `POST /servers` with `"payment_method": "credit"`. No saved card needed. |
| Resize a server | `POST /servers/{server_id}/resize` with `"payment_method": "credit"`. Returns `200` with `status` `applied`. |
| Pay an invoice | `POST /invoices/{invoice_id}/pay` with `{"payment_method": "credit"}`. |

If credit doesn't cover the full amount: `402 insufficient_credit`, `details.shortfall` is the USD missing. Nothing is charged or reserved.

### Pay an Invoice

Pays a `pending` invoice, including a failed card renewal. Returns the paid invoice with `payment_method` `credit`.

```bash theme={null}
curl -X POST https://api.arct.cloud/v1/invoices/$INVOICE_ID/pay \
  -H "Authorization: Bearer $ARCT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"payment_method": "credit"}'
```

| Response | Meaning |
| - | - |
| `200` | Paid. |
| `400 credit_unavailable` | Account credit isn't enabled for your account. |
| `400 invoice_not_payable` | Not pending, or a resize invoice; pay a resize with `POST /servers/{server_id}/resize`. |
| `402 insufficient_credit` | Add at least `details.shortfall` in credit. |
| `404 not_found` | Unknown invoice, or not yours. |
| `409 payment_in_progress` | A card payment for this invoice is still running. |
| `503 billing_unavailable` | Nothing debited. Retry later. |

## Add Credit

Add credit in the dashboard under **Billing > Account credits**, by card, Alipay or crypto. Adding credit, auto pay and credit refunds aren't in the API.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.