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

# Create an invoice

> Creates an invoice using your organization’s invoice settings. Monetary inputs and outputs are integer cents. The API computes totals, reuses or creates an invoice recipient by email, and sends email only when requested. See the [invoice guide](/developers/invoices) for prerequisites.



## OpenAPI

````yaml /api-reference/openapi.json post /invoices
openapi: 3.1.0
info:
  title: Karat Payout API
  description: >-
    Your gateway to seamless, automated, and scalable payment solutions. The
    Karat Payout API lets you create recipients, send payouts, track payment
    status, manage tax documents and invoices, record external payments, and
    subscribe to webhook events.
  version: 1.0.0
servers:
  - url: https://payouts.api.trykarat.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Retrieve payout source accounts, balances, and payout totals.
  - name: Payments
    description: Create and manage outgoing payouts to recipients.
  - name: Recipients
    description: Manage the payees you send payouts to.
  - name: Tax
    description: Retrieve recipient tax forms (W-9) and download links.
  - name: External Payments
    description: Record and manage payments made outside of Karat.
  - name: Webhooks
    description: Subscribe to event notifications for payout activity.
  - name: Invoices
    description: >-
      Create, list, retrieve, cancel, and send reminders for invoices; retrieve
      temporary PDF links.
paths:
  /invoices:
    post:
      tags:
        - Invoices
      summary: Create an invoice
      description: >-
        Creates an invoice using your organization’s invoice settings. Monetary
        inputs and outputs are integer cents. The API computes totals, reuses or
        creates an invoice recipient by email, and sends email only when
        requested. See the [invoice guide](/developers/invoices) for
        prerequisites.
      operationId: createInvoice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInvoiceRequest'
            example:
              invoiceNumber: INV-2026-001
              recipient:
                name: Acme Inc
                email: billing@example.com
              lineItems:
                - description: Design services
                  quantity: 2
                  unitPrice: 12500
              invoiceDate: '2026-10-05'
              dueDate: '2026-11-04'
              sender:
                name: Example Studio
                email: billing@example.org
              destinationAccountId: 4f266e59-5dae-49f7-9ef9-9bdf6d2b7c86
              sendEmailToRecipient: false
      responses:
        '201':
          description: Create an invoice.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/CreatedInvoice'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    CreateInvoiceRequest:
      type: object
      required:
        - invoiceNumber
        - recipient
        - lineItems
        - invoiceDate
        - dueDate
      properties:
        invoiceNumber:
          type: string
          minLength: 1
          maxLength: 50
          description: Must not contain '/', '\', or '..'.
        recipient:
          type: object
          required:
            - name
            - email
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            email:
              type: string
              format: email
              description: >-
                Trimmed and lowercased; an existing invoice recipient in your
                organization is reused by email, otherwise one is created.
            ccEmails:
              type: array
              maxItems: 20
              items:
                type: string
                format: email
            address:
              $ref: '#/components/schemas/InvoiceAddress'
        lineItems:
          type: array
          minItems: 1
          maxItems: 250
          items:
            $ref: '#/components/schemas/InvoiceLineItemInput'
          description: >-
            Total is computed as the sum of quantity × unitPrice and must be a
            safe integer (at most 9007199254740991 cents).
        invoiceDate:
          type: string
          format: date
        dueDate:
          type: string
          format: date
          description: A valid YYYY-MM-DD date on or after invoiceDate.
        poNumber:
          type: string
          maxLength: 100
        payerMemo:
          type: string
          maxLength: 2000
          description: Omitted or blank values use the configured default payment memo.
        paymentInstructions:
          type: string
          maxLength: 2000
          description: Omitted or blank values use configured default payment instructions.
        destinationAccountId:
          type: string
          format: uuid
          description: >-
            Required when automatic reconciliation is disabled in invoice
            settings. Select an eligible destination account belonging to your
            organization.
        sendEmailToRecipient:
          type: boolean
          default: false
          description: Set true to request invoice email delivery to the recipient.
        sender:
          type: object
          required:
            - name
            - email
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            email:
              type: string
              format: email
          description: >-
            Optional when invoice settings supply both sender name and email;
            otherwise provide both fields.
    CreatedInvoice:
      allOf:
        - $ref: '#/components/schemas/Invoice'
        - type: object
          required:
            - emailSent
          properties:
            emailSent:
              type: boolean
              description: Whether the invoice email was sent.
    InvoiceAddress:
      type: object
      required:
        - line1
        - city
        - state
        - postalCode
        - country
      properties:
        line1:
          type: string
          maxLength: 200
          minLength: 1
        line2:
          type: string
          maxLength: 200
        city:
          type: string
          maxLength: 100
          minLength: 1
        state:
          type: string
          maxLength: 100
          minLength: 1
        postalCode:
          type: string
          maxLength: 30
          minLength: 1
        country:
          type: string
          maxLength: 100
          minLength: 1
    InvoiceLineItemInput:
      type: object
      required:
        - description
        - quantity
        - unitPrice
      properties:
        description:
          type: string
          minLength: 1
          maxLength: 500
        quantity:
          type: integer
          minimum: 1
          maximum: 9007199254740991
        unitPrice:
          type: integer
          description: Amount in cents.
          minimum: 0
          maximum: 9007199254740991
    Invoice:
      type: object
      required:
        - id
        - invoiceNumber
        - status
        - recipient
        - total
        - paidAmount
        - lineItems
        - invoiceDate
        - dueDate
        - poNumber
        - payerMemo
        - paymentInstructions
        - paymentAccount
        - automaticReconciliationEnabled
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
        invoiceNumber:
          type: string
        status:
          $ref: '#/components/schemas/InvoiceStatus'
        recipient:
          type: object
          required:
            - id
            - name
            - email
          properties:
            id:
              type:
                - string
                - 'null'
              format: uuid
            name:
              type: string
            email:
              type: string
              format: email
        total:
          type: integer
          description: Amount in cents.
        paidAmount:
          type: integer
          description: Amount in cents.
        lineItems:
          type: array
          items:
            type: object
            required:
              - description
              - quantity
              - unitPrice
              - amount
            properties:
              description:
                type: string
              quantity:
                type: integer
              unitPrice:
                type: integer
                description: Amount in cents.
              amount:
                type: integer
                description: Amount in cents.
        invoiceDate:
          type: string
          format: date
        dueDate:
          type: string
          format: date
        poNumber:
          type:
            - string
            - 'null'
        payerMemo:
          type:
            - string
            - 'null'
        paymentInstructions:
          type:
            - string
            - 'null'
        paymentAccount:
          oneOf:
            - type: object
              required:
                - accountNumber
                - routingNumber
              properties:
                accountNumber:
                  type: string
                routingNumber:
                  type: string
            - type: 'null'
        automaticReconciliationEnabled:
          type: boolean
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      description: Standard error envelope returned for all non-2xx responses.
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
          required:
            - message
      required:
        - error
    InvoiceStatus:
      type: string
      enum:
        - open
        - paid
        - paid_via_stripe
        - overdue
        - cancelled
  responses:
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: 'amount: amount must be positive'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Invalid api key
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Pass your API key as a bearer token: `Authorization: Bearer <API_KEY>`.'

````