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

# Billing

> Complete reference for HopX CLI billing commands - view balance, billing history, invoices, and auto-recharge settings.

Manage billing and payments using the `billing` command. View account balance, billing history, invoices, and configure auto-recharge.

## Command Syntax

```bash theme={null}
hopx billing <subcommand> [options]
```

## Subcommands

### `balance`

View account balance.

**Syntax:**

```bash theme={null}
hopx billing balance [OPTIONS]
```

**Examples:**

```bash theme={null}
# View balance
hopx billing balance
```

**Expected Output:**

```
┌─────────────┬─────────────────────────────────────┐
│ Property    │ Value                               │
├─────────────┼─────────────────────────────────────┤
│ Balance     │ $150.00                             │
│ Credits     │ 1500                                │
│ Currency    │ USD                                 │
└─────────────┴─────────────────────────────────────┘
```

**Exit Codes:**

* `0` - Success
* `3` - Authentication error

### `history`

View billing history.

**Syntax:**

```bash theme={null}
hopx billing history [OPTIONS]
```

**Options:**

* `--limit INTEGER` - Number of records to show
* `--output, -o FORMAT` - Output format: `table`, `json`, `plain` (default: `table`)

**Examples:**

```bash theme={null}
# View billing history
hopx billing history

# View with limit
hopx billing history --limit 10
```

**Expected Output:**

```
┌──────────────┬──────────────┬─────────────┐
│ Date         │ Amount      │ Description │
├──────────────┼──────────────┼─────────────┤
│ 2025-01-27   │ $50.00      │ Payment     │
│ 2025-01-20   │ -$10.00     │ Usage       │
└──────────────┴──────────────┴─────────────┘
```

**Exit Codes:**

* `0` - Success
* `3` - Authentication error

### `invoices`

List invoices.

**Syntax:**

```bash theme={null}
hopx billing invoices [OPTIONS]
```

**Options:**

* `--limit INTEGER` - Number of invoices to show
* `--output, -o FORMAT` - Output format: `table`, `json`, `plain` (default: `table`)

**Examples:**

```bash theme={null}
# List invoices
hopx billing invoices

# List with limit
hopx billing invoices --limit 5
```

**Expected Output:**

```
┌──────────────┬──────────────┬─────────────┐
│ Invoice ID   │ Date         │ Amount      │
├──────────────┼──────────────┼─────────────┤
│ inv_abc123   │ 2025-01-27   │ $50.00      │
│ inv_def456   │ 2025-01-20   │ $30.00      │
└──────────────┴──────────────┴─────────────┘
```

**Exit Codes:**

* `0` - Success
* `3` - Authentication error

### `auto-recharge`

Configure auto-recharge settings.

**Syntax:**

```bash theme={null}
hopx billing auto-recharge [OPTIONS]
```

**Examples:**

```bash theme={null}
# Configure auto-recharge
hopx billing auto-recharge
```

**Expected Output:**

```
Auto-recharge configuration
✓ Auto-recharge enabled
```

**Exit Codes:**

* `0` - Success
* `3` - Authentication error

## Related

* **[CLI Quickstart](/cli/quickstart)** - Get started with CLI
* **[Usage Statistics](/cli/commands/usage)** - Monitor usage
* **[Organization Commands](/cli/commands/org)** - Manage organizations

## Next Steps

* Learn about [Usage Statistics](/cli/commands/usage) to monitor resource usage
* Explore [Organization Management](/cli/commands/org) to manage organization settings
* Review [Dashboard](https://console.hopx.dev) for billing management
