> ## 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.

# getUpcomingInvoice

> Get upcoming invoice.



## OpenAPI

````yaml /openapi.yaml get /getUpcomingInvoice
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:
  /getUpcomingInvoice:
    get:
      tags:
        - Payments
      summary: getUpcomingInvoice
      description: Get upcoming invoice.
      operationId: getUpcomingInvoice
      parameters:
        - $ref: '#/components/parameters/api_token'
      responses:
        '200':
          description: Request was successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    $ref: '#/components/schemas/success'
                  response:
                    type: object
                    description: >-
                      Endpoint-specific response payload, or an error message
                      when `success` is false.
                    properties:
                      invoice_id:
                        $ref: '#/components/schemas/nullable_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:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Last update timestamp.
                      created_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Creation timestamp.
                      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: null
                      user_id: user_2
                      description: October - November 2024 Invoices
                      status: pending
                      updated_at: null
                      created_at: null
                      amount: '10000'
                      amount_refunded: '0'
                      source:
                        source_id: 7mb8VEEjb4zCzbU4U-l1Z
                        user_id: user_2
                        type: card
                        direction: in
                        primary: true
                        description: Card (VISA ....4242)
                        name: John Doe
                        city: New York
                        country: US
                        line_one: 123 Sesame St
                        line_two: ''
                        district: NY
                        postal: '10001'
                        status: active
                        updated_at: '2024-10-22T14:18:35.209Z'
                        created_at: '2024-06-10T14:57:33.313Z'
                      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:
    success:
      type: boolean
      description: True when the request succeeded.
    nullable_invoice_id:
      type:
        - string
        - 'null'
      description: Invoice identifier, when one exists.
    user_id:
      type: string
      description: AlphaInsider user identifier.
    source_id:
      type: string
      description: Payment source 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.

````