> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-preview-pr-398.mintlify.site/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

note: to pass '>' and '\<' on the command line, make sure to use quotes
note: to encode a string query value (ie for gpu\_name), replace any spaces ' ' with underscore '\_'

## Examples

```bash theme={null}
# search for somewhat reliable single RTX 3090 instances, filter out any duplicates or offers that conflict with our existing stopped instances
        vastai search invoices 'amount_cents>3000  '

    Available fields:

  Name                  Type       Description

id                  int,
user_id             int,
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
balance_after       float,          balance after
original_amount     int,            original amount of payment
event_id            string,
cut_amount          int,
cut_percent         float,
extra               json,
service             string,         type of payment
stripe_charge       json,
stripe_refund       json,
stripe_payout       json,
error               json,
paypal_email        string,         email for paypal/wise payments
transfer_group      string,
failed              bool,
refunded            bool,
is_check            bool,
```

## 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`) |
