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

# vastai search invoices

Search for invoices using custom query

## Usage

```bash theme={null}
vastai search invoices [--help] [--api-key API_KEY] [--raw] <query>
```

## Arguments

<ParamField path="query" type="string" required>
  Search query in simple query syntax (see below)
</ParamField>

## Description

**Query syntax**

```
query      = comparison comparison...
comparison = field op value
field      = <name of a field>
op         = one of: <, <=, ==, !=, >=, >, in, notin
value      = <bool, int, float, string> | 'any' | [value0, value1, ...]
bool       = True | False
```

* Wrap `>` and `<` in quotes on the command line
* For string values (e.g. `gpu_name`), replace spaces with underscores: `RTX_3090` not `RTX 3090`

## Examples

```bash theme={null}
vastai search invoices 'amount_cents>3000'
```

## Available Fields

| Field              | Type   | Description                                     |
| ------------------ | ------ | ----------------------------------------------- |
| `id`               | int    | invoice unique ID                               |
| `user_id`          | int    | user ID                                         |
| `when`             | float  | UTC epoch timestamp of initial invoice creation |
| `paid_on`          | float  | actual payment date (UTC epoch timestamp)       |
| `payment_expected` | float  | expected payment date (UTC epoch timestamp)     |
| `amount_cents`     | int    | amount of payment in cents                      |
| `is_credit`        | bool   | is a credit purchase                            |
| `is_delayed`       | bool   | is not yet paid                                 |
| `balance_before`   | float  | balance before payment                          |
| `balance_after`    | float  | balance after payment                           |
| `original_amount`  | int    | original amount of payment                      |
| `event_id`         | string | associated event ID                             |
| `cut_amount`       | int    | cut amount                                      |
| `cut_percent`      | float  | cut percentage                                  |
| `extra`            | json   | extra metadata                                  |
| `service`          | string | type of payment                                 |
| `stripe_charge`    | json   | Stripe charge object                            |
| `stripe_refund`    | json   | Stripe refund object                            |
| `stripe_payout`    | json   | Stripe payout object                            |
| `error`            | json   | error details if any                            |
| `paypal_email`     | string | email for PayPal/Wise payments                  |
| `transfer_group`   | string | transfer group identifier                       |
| `failed`           | bool   | payment failed                                  |
| `refunded`         | bool   | payment refunded                                |
| `is_check`         | bool   | is a check payment                              |

## Global Options

The following options are available for all commands:

| Option          | Description                                           |
| --------------- | ----------------------------------------------------- |
| `--url URL`     | Server REST API URL                                   |
| `--retry N`     | Retry limit                                           |
| `--raw`         | Output machine-readable JSON                          |
| `--explain`     | Verbose explanation of API calls                      |
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |
