---
title: "Create an invoice"
method: POST
path: "/invoices"
tags: ["Invoices"]
---

# Create an invoice

`POST /invoices`

Create a new invoice with line items

## Request body

- CreateInvoiceInput
  - `customer_id` string
  - `due_date` string — Due date in YYYY-MM-DD format. If omitted, defaults to the current date from invoice creation.
  - `exclude_from_autopay` boolean — When true, this invoice is excluded from Autopay at creation time. Use this when your integration pays the invoice synchronously via API and you want to guarantee Autopay never charges the same invoice. Defaults to false.
  - `line_items` InvoiceLineItem[]
    - `amount` number
    - `description` string
    - `quantity` integer

## Response `201`

Created

- Invoice
  - `created_at` string
  - `currency` string
  - `customer_id` string
  - `due_date` string
  - `id` string
  - `invoice_number` string
  - `last_notification_at` string
  - `line_items` InvoiceLineItem[]
    - `amount` number
    - `description` string
    - `quantity` integer
  - `memo` string
  - `status` string
  - `sub_total` number
  - `total` number

## Other responses

- `400` — Bad Request
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/alternativepayments/apis/alternative-payments.md) · [All operations](https://skmtc.net/alternativepayments/apis/alternative-payments/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alternativepayments/alternative-payments/revisions/730efda86cd1/schema)
