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

# getInvoices

> Get invoices.



## OpenAPI

````yaml /openapi.yaml get /getInvoices
openapi: 3.1.0
info:
  title: AlphaInsider
  version: '1.0'
  description: >-
    The official API and websocket documentation for
    [AlphaInsider.com](https://alphainsider.com/)
servers:
  - url: https://alphainsider.com/api
security: []
tags:
  - name: Introduction
  - name: Authentication
  - name: Users
  - name: Strategies
  - name: Subscriptions
  - name: Payments
  - name: Withdrawals
  - name: Timelines
  - name: Stocks
  - name: Trades
  - name: Webhooks
  - name: Bots
  - name: Websockets
paths:
  /getInvoices:
    get:
      tags:
        - Payments
      summary: getInvoices
      description: Get invoices.
      operationId: getInvoices
      parameters:
        - $ref: '#/components/parameters/api_token'
        - name: invoice_id[]
          in: query
          schema:
            type: array
            description: Array of invoice IDs. Leave empty to get all invoices.
            maxItems: 100
            items:
              $ref: '#/components/schemas/invoice_id'
        - name: source_id
          in: query
          schema:
            $ref: '#/components/schemas/source_id'
        - name: status
          in: query
          schema:
            type: string
            description: Invoice status.
            enum:
              - pending
              - paid
              - failed
              - chargeback
        - name: limit
          in: query
          schema:
            $ref: '#/components/schemas/limit'
        - name: offset_id
          in: query
          schema:
            $ref: '#/components/schemas/offset_id'
      responses:
        '200':
          description: Request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    $ref: '#/components/schemas/success'
                  response:
                    type: array
                    description: >-
                      Endpoint-specific response payload, or an error message
                      when `success` is false.
                    items:
                      type: object
                      properties:
                        invoice_id:
                          $ref: '#/components/schemas/invoice_id'
                        user_id:
                          $ref: '#/components/schemas/user_id'
                        description:
                          type: string
                          description: Human-readable description.
                        status:
                          type: string
                          enum:
                            - pending
                            - paid
                            - failed
                            - chargeback
                          description: Current status.
                        updated_at:
                          $ref: '#/components/schemas/updated_at'
                        created_at:
                          $ref: '#/components/schemas/created_at'
                        amount:
                          type: string
                          description: Amount.
                        amount_refunded:
                          type: string
                          description: Amount refunded.
                        source:
                          type: object
                          description: Source.
                          properties:
                            source_id:
                              $ref: '#/components/schemas/source_id'
                            user_id:
                              $ref: '#/components/schemas/user_id'
                            type:
                              type: string
                              enum:
                                - card
                              description: Type or category for this object.
                            direction:
                              type: string
                              enum:
                                - in
                                - out
                              description: Direction.
                            primary:
                              type: boolean
                              description: Primary.
                            description:
                              type: string
                              description: Human-readable description.
                            name:
                              type: string
                              description: Display name.
                            city:
                              type: string
                              description: City.
                            country:
                              type: string
                              description: Country.
                            line_one:
                              type: string
                              description: Line one.
                            line_two:
                              type: string
                              description: Line two.
                            district:
                              type: string
                              description: District.
                            postal:
                              type: string
                              description: Postal.
                            status:
                              type: string
                              enum:
                                - pending
                                - active
                                - deleted
                              description: Current status.
                            updated_at:
                              $ref: '#/components/schemas/updated_at'
                            created_at:
                              $ref: '#/components/schemas/created_at'
                        retryable:
                          type: boolean
                          description: Retryable.
              examples:
                '200':
                  value:
                    success: true
                    response:
                      - invoice_id: NJ9Fo2OSoM5MRy5ithwnw
                        user_id: user_1
                        description: Pro Account Monthly Subscription
                        status: paid
                        updated_at: '2024-10-22T20:59:25.765Z'
                        created_at: '2024-10-22T20:59:22.304Z'
                        amount: '5000'
                        amount_refunded: '0'
                        source:
                          source_id: ta-fz_Z_fkHau1d5k3HUR
                          user_id: user_1
                          type: card
                          direction: in
                          primary: true
                          description: Card (VISA ....4242)
                          name: fds fds
                          city: fds
                          country: US
                          line_one: fds
                          line_two: fds
                          district: fd
                          postal: '33132'
                          status: active
                          updated_at: '2024-10-21T17:51:08.576296+00:00'
                          created_at: '2024-08-30T13:41:24.478454+00:00'
                        retryable: false
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
components:
  parameters:
    api_token:
      in: header
      name: Authorization
      description: User API token.
      required: true
      schema:
        type: string
        format: JWT
  schemas:
    invoice_id:
      type: string
      description: Invoice identifier, when one exists.
    source_id:
      type: string
      description: Payment source identifier.
    limit:
      type: number
      description: Number of results to return.
    offset_id:
      type: string
      description: Offet by ID. Used for pagination.
    success:
      type: boolean
      description: True when the request succeeded.
    user_id:
      type: string
      description: AlphaInsider user identifier.
    updated_at:
      type: string
      format: date-time
      description: Last update timestamp.
    created_at:
      type: string
      format: date-time
      description: Creation timestamp.
  responses:
    '400':
      description: Request failed.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                description: False when the request failed.
              response:
                type: string
                description: Error message.
          examples:
            '400':
              value:
                success: false
                response: Request failed.
    '401':
      description: Authentication failed.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                description: False when the request failed.
              response:
                type: string
                description: Error message.
          examples:
            '401':
              value:
                success: false
                response: Authentication failed.

````