---
title: "Create invoices"
method: POST
path: "/v2/invoices/batch"
tags: ["Invoices"]
---

# Create invoices

`POST /v2/invoices/batch`

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

## Request body

- object
  - `batch_id` string — Optional identifier for the batch request. If not provided, a unique ID will be generated.
  - `invoices` object[], required — List of invoices to create (max 50).
    - `customer_id` string, required — Customer ID.
    - `currency` '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' — Currency code of the invoice. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
    - `status` 'to_pay' | 'paid' | 'draft' — Current invoice status. - `draft`: Invoice is in draft mode (not finalized yet). - `open`: Invoice for the current billing period, which will be issued at the end of the period (used for invoices with usage-based data). - `grace_period`: Invoice is in a review period after being issued for the billing period and before becoming due for payment. - `to_pay`: Invoice is awaiting payment. - `partially_paid`: Invoice is partially paid. - `paid`: Invoice is fully paid. - `voided`: Invoice has been voided and is no longer valid. - `closed`: Invoice was not issued and has been discarded. - `error`: Invoice failed to be paid. - `archived`: A previous version of an invoice. - `charged_on_parent`: Invoice is charged on the parent customer. - `pending_parent_concat`: Invoice is pending invoices concatenation on the parent customer to be grouped. - `uncollectible`: Invoice is uncollectible (bad debt). Only metadata (properties, custom_note, custom_properties) can be updated in this status.
    - `invoicing_entity_id` string — ID of the invoicing entity attached to the invoice.
    - `number` string — 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.
    - `type` 'invoice' | 'credit_note' | 'document' — 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.
    - `document_name` string — If the invoice is of type `document` you can give it a custom name (displayed on the final PDF).
    - `reference` string — Unique identifier to ease reconciliation with payment. Useful for bank transfer.
    - `purchase_order` string — Reference to the purchase order linked to the invoice.
    - `custom_note` string — Custom note added to the invoice.
    - `additional_info` string — Additional information added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.
    - `footer` string — Footer added to the invoice. If not defined, it will be inherited from the invoicing entity's settings.
    - `tax_rate` number — Deprecated field, please use `line_items[].tax_rate`.
    - `tax_scheme` 'auto' | 'not_eligible' — Tax scheme of the invoice. - `auto`: Tax is automatically computed and applied. - `not_eligible`: Tax collection is disabled for the invoice.
    - `payment_method_strategy` 'current' | 'external' — 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.
    - `payment_method_id` string — ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.
    - `bank_account_id` string — ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.
    - `subscription_id` string — ID of the subscription related to the invoice.
    - `emitted_at` string, date-time — Issue date of the invoice.
    - `due_at` string, date-time — Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.
    - `settled_at` string, date-time — Date the invoice was fully paid.
    - `properties` object — Key/value pairs to store any metadata useful in your context.
    - `custom_properties` object — Values for custom properties defined for the `invoice` entity, keyed by slug.
    - `line_items` CreateInvoiceLineItem[], required
      - union
        - object
          - `description` string — Description of the line item as it will appear on the invoice. Default to the product description.
          - `units_count` number — Count of units of the product related to the invoice line item.
          - `tax_rate` number — Tax rate of the invoice line item.
          - `period_start` string, date-time — Start date of the period corresponding to the line item charge.
          - `period_end` string, date-time — End date of the period corresponding to the line item charge.
          - `display_unit_amount` boolean — Whether the unit amount is displayed on the invoice PDF. Defaults to true.
          - `display_service_period` boolean — Whether the service period dates are displayed in the line item description on the invoice PDF. Defaults to true.
          - `product_id` string — Product ID related to the invoice line item.
          - `name` string, required — Name of the line item as it will appear on the invoice. Default to the product name.
          - `unit_amount` number, required — 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.
        - object
          - `description` string — Description of the line item as it will appear on the invoice. Default to the product description.
          - `units_count` number — Count of units of the product related to the invoice line item.
          - `tax_rate` number — Tax rate of the invoice line item.
          - `period_start` string, date-time — Start date of the period corresponding to the line item charge.
          - `period_end` string, date-time — End date of the period corresponding to the line item charge.
          - `display_unit_amount` boolean — Whether the unit amount is displayed on the invoice PDF. Defaults to true.
          - `display_service_period` boolean — Whether the service period dates are displayed in the line item description on the invoice PDF. Defaults to true.
          - `product_id` string, required — Product ID related to the invoice line item.
          - `name` string — Name of the line item as it will appear on the invoice. Default to the product name.
          - `unit_amount` number — 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.
    - `transactions` union[]
      - union
        - object
          - `amount` number, required — Transaction amount.
          - `process_at` string, date-time, required — Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.
          - `payment_method_id` string, required — Payment method used to execute the transaction. Only applies to scheduled transactions with a process_at date in the future.
        - object
          - `amount` number, required — Transaction amount.
          - `process_at` string, date-time, required — Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.
          - `payment_method_type` 'transfer', required
          - `bank_account_id` string — Bank account linked to the transaction.
        - object
          - `amount` number — Transaction amount.
          - `process_at` string, date-time — Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.
          - `provider_name` 'airwallex' | 'gocardless' | 'mollie' | 'stripe', required — Provider name.
          - `provider_id` string — Provider ID. Required if multiple instances of the same provider are connected in Hyperline.
          - `provider_transaction_id` string, required — 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.
        - object
          - `amount` number, required — Transaction amount.
          - `process_at` string, date-time, required — Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.
          - `payment_method_type` 'external'
    - `coupons` union[]
      - union
        - object
          - `coupon_id` string, required — Coupon ID.
          - `name` string — Name of the coupon.
          - `discount_amount` number — Amount corresponding to the discounted part of the total amount.
          - `line_item_indexes` number[], nullable — Index of the line items to which the coupon applies. Null means all line items.
        - object
          - `name` string, required — Name of the coupon.
          - `discount_amount` number, required — Amount corresponding to the discounted part of the total amount.
          - `line_item_indexes` number[], nullable, required — Index of the line items to which the coupon applies. Null means all line items.
    - `batch_invoice_id` string, required — A unique identifier for the invoice in the batch.

## Response `202`

- object
  - `batch_id` string, required — Identifier of the batch request.

---

[API](https://skmtc.dev/hyperline/apis/hyperline-api.md) · [All operations](https://skmtc.dev/hyperline/apis/hyperline-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hyperline/hyperline-api/revisions/19fa5f22e39b/schema)
