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

# Create Invoice

> Create an invoice for a connected account.



## OpenAPI

````yaml post /stripe/connect/accounts/{accountId}/invoices
openapi: 3.0.1
info:
  title: ChatDash API Documentation
  description: API Documentation for the ChatDash Server
  version: 2.0.0
servers:
  - url: https://api.chat-dash.com/v1/public
security: []
paths:
  /stripe/connect/accounts/{accountId}/invoices:
    post:
      tags:
        - Stripe Connect
      summary: Create Invoice
      description: Create an invoice for a connected account.
      parameters:
        - name: Authorization
          in: header
          required: true
          description: >-
            All requests to the ChatDash API must be validated with the agency
            API Key found on your agency profile
          schema:
            type: string
        - name: accountId
          in: path
          required: true
          description: The Stripe connected account ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  type: object
                  required:
                    - clientId
                    - productId
                    - collection_method
                  properties:
                    clientId:
                      type: string
                      description: The client ID (must have an admin member assigned)
                      example: 64abc123def456789012345a
                    productId:
                      type: string
                      description: The Stripe product ID (must have a one-time price)
                      example: prod_ABC123XYZ
                    collection_method:
                      type: string
                      enum:
                        - charge_automatically
                        - send_invoice
                      description: >-
                        How to collect payment. If 'send_invoice',
                        days_until_due is required.
                      example: send_invoice
                    days_until_due:
                      type: integer
                      description: >-
                        Number of days until the invoice is due. Required when
                        collection_method is 'send_invoice'.
                      example: 30
            example:
              data:
                clientId: 64abc123def456789012345a
                productId: prod_ABC123XYZ
                collection_method: send_invoice
                days_until_due: 30
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The invoice ID
                    example: in_1ABC123DEF456GHI
                  amount:
                    type: integer
                    description: Amount in smallest currency unit (e.g., cents for USD)
                    example: 10000
                  currency:
                    type: string
                    description: Three-letter ISO currency code
                    example: usd
                  status:
                    type: string
                    description: Invoice status
                    example: draft
                  number:
                    type: string
                    nullable: true
                    description: Invoice number
                    example: GJXQAHMC-0001
                  customer:
                    type: object
                    properties:
                      id:
                        type: string
                        example: cus_ABC123XYZ
                      email:
                        type: string
                        example: customer@example.com
                      name:
                        type: string
                        example: John Doe
                  description:
                    type: string
                    description: Invoice description
                    example: ''
                  created:
                    type: integer
                    description: Unix timestamp of when the invoice was created
                    example: 1700000000
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: An unexpected error occurred

````