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

# Create invoices

> Create invoices async in batch. Results can be tracked via webhooks with the `invoice.batch.creation_succeeded` and `invoice.batch.creation_failed` events.



## OpenAPI

````yaml post /v2/invoices/batch
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v2/invoices/batch:
    post:
      tags:
        - Invoicing
      summary: Create invoices
      description: >-
        Create invoices async in batch. Results can be tracked via webhooks with
        the `invoice.batch.creation_succeeded` and
        `invoice.batch.creation_failed` events.
      operationId: createInvoices
      requestBody:
        description: Create invoices payload.
        content:
          application/json:
            schema:
              type: object
              properties:
                batch_id:
                  type: string
                  description: ID of the batch request. Generated if not provided.
                  example: f65f58f3-ecb0-4711-be22-1e64102a380d
                invoices:
                  type: array
                  items:
                    allOf:
                      - $ref: '#/components/schemas/CreateInvoice'
                      - type: object
                        properties:
                          batch_invoice_id:
                            type: string
                            description: >-
                              ID of the invoice within the batch, supplied by
                              you.
                            example: invoice-123
                        required:
                          - batch_invoice_id
                  maxItems: 50
                  description: List of invoices to create (max 50).
              required:
                - invoices
      responses:
        '202':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  batch_id:
                    type: string
                    description: ID of the batch request.
                    example: f65f58f3-ecb0-4711-be22-1e64102a380d
                required:
                  - batch_id
      security:
        - bearer: []
components:
  schemas:
    CreateInvoice:
      type: object
      properties:
        customer_id:
          type: string
          description: ID of the customer the invoice is billed to.
          example: cus_Typ0px2W0aiEtl
        currency:
          type: string
          enum:
            - EUR
            - AED
            - AFN
            - XCD
            - ALL
            - AMD
            - AOA
            - ARS
            - USD
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - XOF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - NOK
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - XAF
            - CHF
            - NZD
            - CLP
            - CNY
            - COP
            - CRC
            - CUP
            - CVE
            - ANG
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EGP
            - MAD
            - ERN
            - ETB
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LYD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZN
            - NAD
            - XPF
            - NGN
            - NIO
            - NPR
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - RWF
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SSP
            - STD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TOP
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - UYU
            - UZS
            - VEF
            - VND
            - VUV
            - WST
            - YER
            - ZAR
            - ZMW
            - ZWL
          description: >-
            Currency code of the invoice. See [ISO
            4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
          example: EUR
        status:
          type: string
          enum:
            - to_pay
            - paid
            - draft
            - voided
          default: paid
          description: >
            Status the invoice is created in. Default to `paid`.


            - `draft`: Invoice is in draft mode (not finalized yet).

            - `to_pay`: Invoice is awaiting payment. Requires
            `payment_method_strategy`.

            - `paid`: Invoice is fully paid.

            - `voided`: Invoice is recorded as already voided, to import an
            invoice voided in another system. No credit note is generated, and
            it cannot have transactions or a settlement date.
          example: paid
        invoicing_entity_id:
          type: string
          description: ID of the invoicing entity issuing the invoice.
          example: ive_47484fjdhy5
        number:
          type: string
          description: >-
            Invoice number. If specified, the invoice will be considered as
            imported from an external source and the number will not be
            generated by Hyperline. You are responsible for avoiding duplicates
            and ensuring it does not impact the numbering sequence in Hyperline.
          example: INV-35
        type:
          type: string
          enum:
            - invoice
            - credit_note
            - document
          description: >-
            Type of the invoice.


            - `invoice`: Legal invoice to be paid by your customer.

            - `credit_note`: Legal credit note cancelling an invoice and
            refunding your customer.

            - `document`: Custom document with no legal value. Can be generated
            from a subscription to meet specific needs.
              
          example: invoice
        document_name:
          type: string
          description: >-
            If the invoice is of type `document` you can give it a custom name
            (displayed on the final PDF).
        reference:
          type: string
          description: >-
            Unique identifier to ease reconciliation with payment. Useful for
            bank transfer.
          example: V0KAHOU6J3
        purchase_order:
          type: string
          description: Reference to the purchase order linked to the invoice.
          example: PO-12345
        custom_note:
          type: string
          maxLength: 20000
          description: Custom note added to the invoice.
          example: Thank you for your purchase!
        additional_info:
          type: string
          maxLength: 20000
          description: >-
            Additional information added to the invoice. If not defined, it will
            be inherited from the invoicing entity's settings.
          example: >-
            This invoice must be paid within the payment delay indicated. After
            this period a late payment penalty of 10% will be applied.
        footer:
          type: string
          maxLength: 20000
          description: >-
            Footer added to the invoice. If not defined, it will be inherited
            from the invoicing entity's settings.
          example: ACME (Acme SAS) is a company registered in France | SIREN N°123456
        tax_rate:
          type: number
          minimum: 0
          maximum: 100
          description: Deprecated field, please use `line_items[].tax_rate`.
          deprecated: true
        tax_scheme:
          type: string
          enum:
            - auto
            - not_eligible
          default: auto
          description: |-
            Tax scheme of the invoice.

            - `auto`: Tax is automatically computed and applied.
            - `not_eligible`: Tax collection is disabled for the invoice.
              
          example: auto
        payment_method_strategy:
          type: string
          enum:
            - current
            - external
          description: >

            Payment method strategy used to charge the invoice. Only applies to
            `to_pay` status.


            - `current`: Use the current default payment method of the customer.

            - `external`: Manage the payment of the invoice outside of
            Hyperline.
          example: external
        payment_method_id:
          type: string
          description: >-
            ID of the default payment method used to pay the invoice.
            Transactions related to the invoice may use different payment
            methods.
          example: pm_1ryTrMj4TTAT1N
        bank_account_id:
          type: string
          description: >-
            ID of the bank account displayed on the invoice. Transactions
            related to the invoice may use different bank accounts.
          example: bac_KJyPrMA1toAqRG
        subscription_id:
          type: string
          description: ID of the subscription related to the invoice.
          example: sub_amiaWZ3lzDIWaoT
        emitted_at:
          type: string
          format: date-time
          description: Issue date of the invoice.
          example: '2026-10-13T00:00:00.000Z'
        due_at:
          type: string
          format: date-time
          description: >-
            Due date of the invoice. Computed from the issue date and the
            payment delay configured in your settings.
          example: '2026-11-12T00:00:00.000Z'
        settled_at:
          type: string
          format: date-time
          description: Date the invoice was fully paid.
          example: '2026-10-15T14:01:56.000Z'
        issuing_method:
          type: string
          enum:
            - manual
            - scheduled
          description: >-
            Set to `scheduled` to finalize the draft invoice automatically on
            its issue date (`emitted_at`), resolved to the start of that day in
            the customer timezone. Requires `status` to be `draft` and an issue
            date after today. Default to `manual`.
          example: manual
        send_email:
          type: boolean
          default: true
          description: >-
            Whether to send the paid invoice or credit note email when creating
            with `status: paid` (the default status). Defaults to true and
            respects existing email settings. Set to false to suppress this
            email without suppressing lifecycle events or webhooks. Does not
            affect invoices created as `draft` or `to_pay`, or later email
            requests.
          example: false
        properties:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
              - type: 'null'
              - type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                    - type: 'null'
                    - type: 'null'
              - type: 'null'
          description: Key/value pairs to store any metadata useful in your context.
        custom_properties:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: number
              - type: boolean
              - type: string
                format: date-time
                description: >-
                  UTC date time string in the [ISO
                  8601](https://en.wikipedia.org/wiki/ISO_8601) format.
                example: '2024-12-20T16:04:11Z'
              - type: array
                items:
                  type: string
              - type: 'null'
          description: >-
            Values for custom properties defined for the `invoice` entity, keyed
            by slug.
        additional_display_fields:
          type: array
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - standard
                    description: Display a standard invoice field.
                  field:
                    type: string
                    enum:
                      - customer_id
                      - subscription_id
                      - quote_id
                    description: Standard invoice field to display.
                required:
                  - type
                  - field
                title: Standard field
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - custom_property
                    description: Display an invoice or customer custom property.
                  slug:
                    type: string
                    description: >-
                      Slug of the invoice or customer custom property to
                      display.
                required:
                  - type
                  - slug
                title: Custom property
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - custom
                    description: Display a custom label and value.
                  label:
                    type: string
                    minLength: 1
                    maxLength: 100
                    description: Label displayed on the invoice.
                  value:
                    type: string
                    maxLength: 500
                    description: Value displayed on the invoice.
                required:
                  - type
                  - label
                  - value
                title: Custom text
          maxItems: 20
          description: >-
            Ordered additional fields displayed on the invoice PDF. Invoice and
            customer custom properties are referenced by slug.
        original_invoice_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the reference invoice for a credit note, including an imported
            invoice. Must belong to the same customer, currency and invoicing
            entity. This reference does not apply credit; use `allocations`
            separately.
          example: inv_2QdJDDUej969ev
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/CreateInvoiceLineItem'
          minItems: 1
        allocations:
          type: array
          items:
            $ref: '#/components/schemas/CreditNoteAllocationInput'
          maxItems: 100
          description: >-
            Invoice applications for a credit note, independent of
            `original_invoice_id`. Omit or send an empty array to apply no
            credit. Created atomically with the credit note. Amounts must fit
            the available credit and target balances. For `paid` credit notes,
            non-empty allocations and explicit transactions must settle the full
            amount; no refund transaction is inferred.
        transactions:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  amount:
                    type: number
                    minimum: 0
                    description: Transaction amount.
                    example: 31500
                  process_at:
                    type: string
                    format: date-time
                    description: >-
                      Date corresponding to the processing of the transaction.
                      If in the future, the transaction is scheduled to be
                      processed.
                    example: '2024-11-12T07:38:39.222Z'
                  payment_method_id:
                    type: string
                    description: >-
                      ID of the payment method used to execute the transaction.
                      Only applies to scheduled transactions with a process_at
                      date in the future.
                    example: pm_1xMpj5bwRqN7LM
                required:
                  - amount
                  - process_at
                  - payment_method_id
                title: Payment method
              - type: object
                properties:
                  amount:
                    type: number
                    minimum: 0
                    description: Transaction amount.
                    example: 31500
                  process_at:
                    type: string
                    format: date-time
                    description: >-
                      Date corresponding to the processing of the transaction.
                      If in the future, the transaction is scheduled to be
                      processed.
                    example: '2024-11-12T07:38:39.222Z'
                  payment_method_type:
                    type: string
                    enum:
                      - transfer
                  bank_account_id:
                    type: string
                    description: ID of the bank account linked to the transaction.
                    example: bac_KJyPrMA1toAqRG
                  reference:
                    type: string
                    description: Optional reference identifying the offline payment.
                    example: PAYMENT-2026-001
                required:
                  - amount
                  - process_at
                  - payment_method_type
                title: Bank transfer
              - type: object
                properties:
                  amount:
                    type: number
                    minimum: 0
                    description: Transaction amount.
                    example: 31500
                  process_at:
                    type: string
                    format: date-time
                    description: >-
                      Date corresponding to the processing of the transaction.
                      If in the future, the transaction is scheduled to be
                      processed.
                    example: '2024-11-12T07:38:39.222Z'
                  provider_name:
                    type: string
                    enum:
                      - airwallex
                      - gocardless
                      - mollie
                      - stripe
                    description: Provider name.
                  provider_id:
                    type: string
                    description: >-
                      ID of the connected provider account that processed the
                      transaction. Required if multiple instances of the same
                      provider are connected in Hyperline.
                  provider_transaction_id:
                    type: string
                    description: >-
                      ID of the transaction on the provider's side. If the
                      transaction is pending, Hyperline will automatically
                      refresh it with the latest details until it is settled.
                      Note that the `amount` and `process_at` fields may be
                      overridden by the transaction data.
                required:
                  - provider_name
                  - provider_transaction_id
                title: Provider transaction
              - type: object
                properties:
                  amount:
                    type: number
                    minimum: 0
                    description: Transaction amount.
                    example: 31500
                  process_at:
                    type: string
                    format: date-time
                    description: >-
                      Date corresponding to the processing of the transaction.
                      If in the future, the transaction is scheduled to be
                      processed.
                    example: '2024-11-12T07:38:39.222Z'
                  payment_method_type:
                    type: string
                    enum:
                      - external
                  reference:
                    type: string
                    description: Optional reference identifying the offline payment.
                    example: PAYMENT-2026-001
                required:
                  - amount
                  - process_at
                title: External transaction
        coupons:
          type: array
          items:
            anyOf:
              - type: object
                properties:
                  coupon_id:
                    type: string
                    description: ID of the catalog coupon to apply to the invoice.
                    example: cou_1eTaiytfA0i2Vb
                  name:
                    type: string
                    minLength: 1
                    description: Name of the coupon.
                    example: Black Friday 2026
                  discount_amount:
                    type: number
                    exclusiveMinimum: 0
                    description: >-
                      Amount corresponding to the discounted part of the total
                      amount.
                    example: 500
                  discount_percent:
                    type: number
                    exclusiveMinimum: 0
                    maximum: 100
                    description: >-
                      Percentage overriding the catalog coupon value, applied to
                      the eligible line items amount (excluding tax), between 0
                      (excluded) and 100. Cannot be combined with
                      `discount_amount`.
                    example: 10
                  line_item_indexes:
                    type:
                      - array
                      - 'null'
                    items:
                      type: number
                    description: >-
                      Index of the line items to which the coupon applies. Null
                      means all line items.
                    example:
                      - 0
                      - 1
                required:
                  - coupon_id
                title: Coupon amount
              - type: object
                properties:
                  name:
                    type: string
                    minLength: 1
                    description: Name of the coupon.
                    example: Black Friday 2026
                  discount_amount:
                    type: number
                    exclusiveMinimum: 0
                    description: >-
                      Amount corresponding to the discounted part of the total
                      amount.
                    example: 500
                  line_item_indexes:
                    type:
                      - array
                      - 'null'
                    items:
                      type: number
                    description: >-
                      Index of the line items to which the coupon applies. Null
                      means all line items.
                    example:
                      - 0
                      - 1
                required:
                  - discount_amount
                  - line_item_indexes
                title: Inline coupon
              - type: object
                properties:
                  name:
                    type: string
                    minLength: 1
                    description: Name of the coupon.
                    example: Black Friday 2026
                  discount_percent:
                    type: number
                    exclusiveMinimum: 0
                    maximum: 100
                    description: >-
                      Percentage of the eligible line items amount (excluding
                      tax) to discount, between 0 (excluded) and 100.
                    example: 10
                  line_item_indexes:
                    type:
                      - array
                      - 'null'
                    items:
                      type: number
                    description: >-
                      Index of the line items to which the coupon applies. Null
                      means all line items.
                    example:
                      - 0
                      - 1
                required:
                  - discount_percent
                additionalProperties: false
                title: Inline percent coupon
      required:
        - customer_id
        - line_items
    CreateInvoiceLineItem:
      allOf:
        - type: object
          properties:
            description:
              type: string
              maxLength: 5000
              description: >-
                Description of the line item as it will appear on the invoice.
                Default to the product description.
              example: Access fee from October 13 to November 13, 2026
            product_id:
              type: string
              description: >-
                ID of the product billed by the line item. Required for new
                manual invoice lines when the invoicing entity requires catalog
                products.
              example: itm_KbLcWt2qm5p1S2
            price_configuration_id:
              type:
                - string
                - 'null'
              description: >-
                ID of the catalog price configuration linked to the line.
                Determines the product and revenue classification when
                subscription terms cannot be resolved. Must belong to the
                supplied product, if any. On finalized invoices, changing this
                link never changes amounts or taxes.
              example: pcf_monthly
            units_count:
              type: number
              default: 1
              description: Count of units of the product related to the invoice line item.
              example: 1
            tax_rate:
              type: number
              minimum: 0
              maximum: 100
              description: Tax rate of the invoice line item.
              example: 20
            period_start:
              type: string
              format: date-time
              description: Start date of the line item's service period.
              example: '2026-10-13T00:00:00.000Z'
            period_end:
              type: string
              format: date-time
              description: End date of the line item's service period.
              example: '2026-11-13T00:00:00.000Z'
            revenue_type:
              type: string
              enum:
                - recurring
                - variable
                - one_off
              description: >-
                Revenue classification for custom or imported lines without
                resolvable subscription or catalog billing terms. Derived
                automatically when a source exists; conflicting explicit values
                are rejected. New lines without a source or explicit
                classification default to one_off. Existing lines retain their
                classification unless corrected.
              example: recurring
            revenue_interval_count:
              type:
                - integer
                - 'null'
              exclusiveMinimum: 0
              description: >-
                Number of billing interval periods for recurring or variable
                revenue (e.g., 1 with months for monthly, 1 with years for
                annual). This is separate from the line service dates.
              example: 1
            revenue_interval_period:
              type:
                - string
                - 'null'
              enum:
                - days
                - weeks
                - months
                - quarters
                - years
              description: >-
                Billing interval unit for recurring or variable revenue (days,
                weeks, months, quarters, years). One-off revenue has no billing
                interval.
              example: months
            display_unit_amount:
              type: boolean
              description: >-
                Whether the unit amount is displayed on the invoice PDF.
                Defaults to true.
              example: true
            display_service_period:
              type: boolean
              description: >-
                Whether the service period dates are displayed in the line item
                description on the invoice PDF. Defaults to true.
              example: true
        - anyOf:
            - type: object
              properties:
                product_id:
                  type: string
                name:
                  type: string
                  description: >-
                    Name of the line item as it will appear on the invoice.
                    Default to the product name.
                  example: Platform access
                unit_amount:
                  type: number
                  description: >-
                    Amount of one unit of the product related to the invoice
                    line item. Default to the product price amount. Expressed in
                    currency's smallest unit.
                  example: 24000
              required:
                - product_id
              title: Catalog product
            - type: object
              properties:
                product_id:
                  type: string
                name:
                  type: string
                  description: >-
                    Name of the line item as it will appear on the invoice.
                    Default to the product name.
                  example: Platform access
                unit_amount:
                  type: number
                  description: >-
                    Amount of one unit of the product related to the invoice
                    line item. Default to the product price amount. Expressed in
                    currency's smallest unit.
                  example: 24000
                price_configuration_id:
                  type: string
                  description: >-
                    ID of the catalog price configuration linked to the line.
                    Determines the product and revenue classification when
                    subscription terms cannot be resolved. Must belong to the
                    supplied product, if any. On finalized invoices, changing
                    this link never changes amounts or taxes.
              required:
                - price_configuration_id
              title: Catalog price
            - type: object
              properties:
                name:
                  type: string
                  description: >-
                    Name of the line item as it will appear on the invoice.
                    Default to the product name.
                  example: Platform access
                unit_amount:
                  type: number
                  description: >-
                    Amount of one unit of the product related to the invoice
                    line item. Default to the product price amount. Expressed in
                    currency's smallest unit.
                  example: 24000
              required:
                - name
                - unit_amount
              title: Custom
    CreditNoteAllocationInput:
      type: object
      properties:
        invoice_id:
          type: string
          description: ID of the invoice receiving the credit.
          example: inv_2QdJDDUej969ev
        amount:
          type: integer
          exclusiveMinimum: 0
          description: >-
            Credit amount applied to the invoice, in the currency's smallest
            unit.
          example: 1000
      required:
        - invoice_id
        - amount
      additionalProperties: false
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.