> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-examples-openclaw-openai-serverless.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# show invoices

> Returns Stripe top-ups, transfers, payouts, coinbase payments, and other billing transactions. For per-instance cost breakdowns, use [show charges](/api-reference/billing/show-charges) instead.

CLI: `vastai show invoices-v1 --invoices`



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v1/invoices/
openapi: 3.1.0
info:
  title: Vast.ai API
  description: >-
    Vast.ai REST API for managing GPU cloud instances, machine operations, and
    AI/ML workflows.


    ## AI Agent Quick-Start


    Install the CLI skill for your agent (Claude Code, Cursor, Windsurf, etc.):
      npx skills add vast-ai/vast-cli

    CLI reference:
    https://raw.githubusercontent.com/vast-ai/vast-cli/master/vastai/SKILL.md

    SDK reference:
    https://raw.githubusercontent.com/vast-ai/vast-cli/master/vastai_sdk/SKILL.md


    ## Auth

    All endpoints require `Authorization: Bearer $VAST_API_KEY`.

    Get your key at: https://cloud.vast.ai/manage-keys/


    ## Key Quirks

    - `gpu_ram` in CLI = GB; in REST API = MB (CLI auto-converts)

    - SSH keys must be registered BEFORE creating an instance (VM: no recovery;
    Docker: can add post-create)

    - `onstart` field is limited to 4048 characters -- gzip+base64 for longer
    scripts

    - `POST /api/v0/asks/{id}/` (create instance) returns `new_contract` as the
    instance ID, not `id`

    - Poll trap: if `actual_status` becomes `exited`, `unknown`, or `offline` it
    will never reach `running` -- destroy and retry
  version: 1.0.0
  contact:
    name: Vast.ai Support
    url: https://discord.gg/vast
servers:
  - url: https://console.vast.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/v1/invoices/:
    get:
      tags:
        - Billing
      summary: show invoices
      description: >-
        Returns Stripe top-ups, transfers, payouts, coinbase payments, and other
        billing transactions. For per-instance cost breakdowns, use [show
        charges](/api-reference/billing/show-charges) instead.


        CLI: `vastai show invoices-v1 --invoices`
      parameters:
        - name: select_filters
          in: query
          required: true
          description: >
            **`when`** (required). Date range in unix seconds (UTC). Operators:
            `gte`, `gt`, `lte`, `lt`.


            **`service`** (optional). Filter by payment service: `transfer`,
            `stripe_payments`, `bitpay`, `coinbase`, `crypto.com`,
            `instance_prepay`, `paypal_manual`, `wise_manual`. Operators: `eq`,
            `neq`, `in`, `notin`.


            **Examples**:

            ```json

            // January 2026, all services

            {"when":{"gte":1767225600,"lte":1769903999}}


            // Only PayPal and Wise payouts

            {"when":{"gte":1767225600,"lte":1769903999},"service":{"in":["paypal_manual","wise_manual"]}}


            // Everything except crypto

            {"when":{"gte":1767225600,"lte":1769903999},"service":{"notin":["bitpay","coinbase","crypto.com"]}}

            ```
          schema:
            type: string
        - name: order_by
          in: query
          required: false
          description: >
            Sort results by column. Columns: `paid_on`, `amount_cents`, `when`.
            Direction: `asc` or `desc` (default `desc`).


            Example: `[{"col":"paid_on","dir":"desc"}]`
          schema:
            type: string
        - name: latest_first
          in: query
          required: false
          description: >-
            Sort newest invoices first. If `order_by` is also set, `order_by`
            takes precedence.
          schema:
            type: boolean
            default: true
            example: true
        - name: limit
          in: query
          required: false
          description: Max results per page.
          schema:
            type: integer
            minimum: 1
            default: 60
            example: 20
        - name: after_token
          in: query
          required: false
          description: >-
            Pass the `next_token` value from the previous response to fetch the
            next page of results. When the response returns `next_token: null`,
            there are no more pages.
          schema:
            type: string
            example: eyJ2YWx1ZXMiOiB7ImlkIjogMjY3MjU5N30sICJvc19wYWdlIjogMH0=
      responses:
        '200':
          description: >-
            Invoice results. A missing or invalid `when` range also returns HTTP
            200 with `success: false`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  count:
                    type: integer
                    description: Number of invoices returned in this page.
                    example: 2
                  total:
                    type: integer
                    description: Total number of invoices matching the filters.
                    example: 42
                  next_token:
                    type: string
                    nullable: true
                    description: Token for the next page. `null` when no more pages.
                    example: eyJ2YWx1ZXMiOiB7ImlkIjogMjE4OTM4N30sICJvc19wYWdlIjogMH0=
                  results:
                    type: array
                    description: List of invoice entries.
                    items:
                      type: object
                      properties:
                        start:
                          type: number
                          description: Invoice creation time (unix seconds UTC).
                          example: 1761980044
                        end:
                          type: number
                          nullable: true
                          description: Payment time (unix seconds UTC). `null` if unpaid.
                          example: 1761980301
                        type:
                          type: string
                          description: >-
                            Invoice type. `credit`, `transfer`, `payout`,
                            `refund`, `reserved`.
                          example: credit
                        source:
                          type: string
                          description: >-
                            Payment source, e.g. `stripe`, `coinbase`, or sender
                            email for transfers.
                          example: stripe
                        description:
                          type: string
                          example: Manual Billing from MASTERCARD ...7376
                        amount:
                          type: number
                          description: >-
                            Amount in dollars. Negative for charges, positive
                            for transfers/payouts.
                          example: -25
                        metadata:
                          type: object
                          description: Additional details depending on service type.
                          properties:
                            invoice_id:
                              type: integer
                              example: 2185418
                            service:
                              type: string
                              example: stripe_payments
                        items:
                          type: array
                          description: Always empty for invoices.
                          example: []
              examples:
                success:
                  summary: Successful invoice listing
                  value:
                    success: true
                    count: 2
                    total: 42
                    next_token: eyJ2YWx1ZXMiOiB7ImlkIjogMjE4OTM4N30sICJvc19wYWdlIjogMH0=
                    results:
                      - start: 1761980044
                        end: 1761980301
                        type: credit
                        source: stripe
                        description: Manual Billing from MASTERCARD ...7376
                        amount: -25
                        metadata:
                          invoice_id: 2185418
                          service: stripe_payments
                        items: []
                invalid_date_range:
                  summary: Missing or invalid `when` range
                  value:
                    success: false
                    error: Invalid date range
                    count: 0
                    total: 0
                    results: []
                    next_token: null
        '400':
          description: Invalid request, e.g. malformed `after_token`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                error: invalid_token
                msg: Invalid pagination token
        '401':
          description: >-
            Unauthorized. May be returned in framework-level authentication
            failure cases.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden. Returned when no `Authorization` header is provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                error: auth_error
                msg: This action requires login.
        '404':
          description: >-
            Not Found. Returned when the supplied API key does not match any
            user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                success: false
                error: auth_error
                msg: Invalid user key
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: API requests too frequent endpoint threshold=3.0
      security:
        - BearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        msg:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key must be provided in the Authorization header

````