Create an invoice series

Changed on

Start invoicing a customer on a schedule. See Create a series.

post/v2/invoices/series

Request

  • Base URL
    https://api.slash.com
  • URL
    https://api.slash.com/v2/invoices/series
  • Auth
    API key in header X-API-Key

Headers

X-Idempotency-Keystring required

Unique caller-generated key for one create request. Once an authenticated, schema-valid request reaches the operation, the key is permanently consumed for that operation and legal entity whether the operation succeeds or fails. Reusing it in that scope returns 409 and never replays a response, unlike API v1, which replays the original response for a matching key.

Request body

customerIdstring required

Customer id with the le_cus_ prefix.

accountIdstring

The account payments settle into, with the sa_group_ prefix. Required when the legal entity has more than one account that can receive payments.

virtualAccountIdstring

A virtual account to settle into instead of the account's primary one, with the subaccount_ prefix.

startDatestring date required

The first day the series can issue an invoice on: today or later in timezone.

timezonestring required

The IANA timezone the series' dates are in.

paymentTermsDaysinteger required

Each invoice is due this many days after it's issued.

taxRatenumber

Tax as a percent of the subtotal after the discount.

memostring
ccEmailsstring[]

Example request

{
  "timezone": "America/New_York",
  "lineItems": [
    {
      "name": "Robot arm maintenance",
      "quantity": 2,
      "unitAmount": {
        "amount": 45000
      }
    }
  ],
  "discount": {
    "percent": 10
  }
}

Response

The created series.

idstring required

Series id with the inv_series_ prefix.

status'active' | 'ended' | 'cancelled' required

See How a series works.

customerIdstring

Customer id with the le_cus_ prefix.

accountIdstring required

The account payments settle into, with the sa_group_ prefix.

virtualAccountIdstring

The virtual account payments settle into, with the subaccount_ prefix. Absent when they settle into the account's primary virtual account.

startDatestring date required

The first day the series can issue an invoice on.

timezonestring required

The IANA timezone the series' dates are in.

paymentTermsDaysinteger required

Each invoice is due this many days after it's issued.

taxRatenumber

Tax as a percent of the subtotal after the discount.

memostring
ccEmailsstring[] required
nextInvoiceDatestring date

When the next invoice goes out. Only on active series.

nextInvoiceIdstring

The next invoice, already created as scheduled, with the inv_ prefix. Only on active series.

createdAtstring date-time required

Example response

{
  "id": "inv_series_2rj4l7hmrrrcv",
  "timezone": "America/New_York",
  "lineItems": [
    {
      "name": "Robot arm maintenance",
      "quantity": 2
    }
  ],
  "discount": {
    "percent": 10
  }
}

Changes