---
title: "Create an invoice batch"
method: POST
path: "/billing/invoices/batches"
---

# Create an invoice batch

`POST /billing/invoices/batches`

## Request

- Base URL: `https://api-sandbox.ezypay.com/v2`
- URL: `https://api-sandbox.ezypay.com/v2/billing/invoices/batches`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://identity-sandbox.ezypay.com/token`

Create a batch of ad-hoc invoices to bill one or more customers on an on-demand basis. Invoices created from this end point are not associated to any subscriptions.

## Headers

- `merchant` string, required

## Request body

- object
  - `batchReference` string, required: The merchant reference for the invoice batch. This must be unique. It is recommended that this is alphanumeric only with the exception of hyphen (-) and underscore (_)
  - `invoices` object[], required: Details of the individual invoices that are included in the batch.
    - `customerId` string, required: Identifier of the customer the invoice is billed to.
    - `collectionType` string: Defines how payments will be collected, either automatically by Ezypay (via direct debiting) or manually from the customer (via manual invoicing). Supported values are: `autobilling` - When invoices are scheduled for billing, automatically bill and process payments on the customer's payment method.`invoicing` - When invoices are scheduled for billing, issue the invoice, then send an email to notify the customer with a link to the Hosted Invoice Page to pay online through Ezypay Billing.
    - `paymentMethodToken` string: An existing payment method token that was generated by the Ezypay Vault. If no value is provided the system will attempt to use the current default payment token associated with the customer. In the event that no value is provided and no default payment method is associated with the customer the system will create an invoice with a status of `past_due`.
    - `memo` string: Description of the invoice item. Max of 100 characters.
    - `acceptedPaymentMethods` string: The supported payment method(s) that can be used to bill a customer. Supported values are `bank`, `mastercard`, `visa` and `amex`.
    - `paymentTerm` string: The term of when the payment must be made after an invoice is issued. This is only used if the `collectionType` is set to `invoicing`.
    - `failedPaymentSetting` object: Settings to apply if the payment failed.
    - `items` object[], required: Details of the individual items that are included in the invoice.
      - `description` string, required: Description of the invoice Item.
      - `accountingCoode` string: Specify an accounting code to categorise revenue collected from the invoice item. Max of 50 characters.
      - `amount` object, required
        - `currency` string, required: Three letter ISO 4217 currency code for the amount.
        - `value` number, double, required: The value of the amount. Must be positive value greater than zero.
        - `type` string: The type of the amount value. Supported values are: `percentage`, `fixed_amount`
      - `tax` object
        - `rate` number, double: Rate of the specified tax in percentage. Supported values are from 0 to 99.99.
      - `reference` string: Additional reference for invoice

## Response `200`

200

- object
  - `id` string
  - `batchReference` string
  - `createdOn` string
  - `status` string

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `924be4030f56`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ezypay/apis/vault/changes/billing/invoices/batches/post.md)

---

[API](https://skmtc.dev/ezypay/apis/vault.md) - [All operations](https://skmtc.dev/ezypay/apis/vault/llms.txt) - [OpenAPI document](https://skmtc.dev/ezypay/apis/vault/revisions/924be4030f56?raw)
