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

# `POST /api/v1/invoices`

> `POST /api/v1/invoices`

### Request body

`CreateInvoiceRequest`

<ParamField body="currency" type="string,null" />

<ParamField body="customer_id" type="string (uuid)" required />

<ParamField body="due_date" type="string,null" />

<ParamField body="invoice_type" type="string,null" />

<ParamField body="notes" type="string,null" />

<ParamField body="order_id" type="string,null (uuid)" />

<ParamField body="payment_terms" type="string,null" />

### Responses

<ResponseField name="201" type="InvoiceResponse">
  Invoice created
</ResponseField>

<ResponseField name="400" type="ErrorBody">
  Invalid request
</ResponseField>

<ResponseField name="422" type="ErrorBody">
  Idempotency-Key reused with a different body
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/invoices' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "currency": null,
    "customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "due_date": null,
    "invoice_type": null,
    "notes": null,
    "order_id": null,
    "payment_terms": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "amount_paid": "string",
    "balance_due": "string",
    "created_at": "2026-07-24T12:00:00Z",
    "currency": "string",
    "customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "due_date": "2026-07-24T12:00:00Z",
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "invoice_date": "2026-07-24T12:00:00Z",
    "invoice_number": "string",
    "invoice_type": "string",
    "order_id": null,
    "status": "string",
    "subtotal": "string",
    "tax_amount": "string",
    "total": "string",
    "updated_at": "2026-07-24T12:00:00Z"
  }
  ```
</ResponseExample>
