---
title: "Create Invoice"
method: POST
path: "/v1/invoices"
---

# Create Invoice

`POST /v1/invoices`

This API endpoint create an invoice and automatically assigns it to given recipient to pay

## Request body

- object
  - `templateId` string — Unique ID of the invoice template to use. If provided, template values will be used for `lineItems`, `memo`, and `taxPercentage`.
  - `recipientId` string — Deprecated in favor of clientId and companyId.
  - `lineItems` object[] — Array of line items. Required if `templateId` is not provided.
    - `amount` integer — Amount in cents. Required if `priceId` not provided
    - `description` string — Description of the item, ignored if `priceId` is provided.
    - `quantity` number, float, required — Quantity of the item (supports decimals).
    - `priceId` string — Unique ID of the `price` object. Required if `amount` is not provided.
  - `memo` string — Memo (arbitrary string) attached to the invoice, often used for display.
  - `daysUntilDue` integer, required — The number of days from when the invoice is created until it is due. Max value is 30.
  - `taxPercentage` number, float — Tax percentage to apply to the invoice amount.
  - `paymentMethodPreferences` object[], required — Array of preferences which specify which payment methods are allowed and how transaction fees are handled for each payment method
    - `type` string, required — Payment method type. Values are `creditCard` or `bankAccount`.
    - `feePaidByClient` boolean, required — When `true`, the transaction fee is paid by the client, otherwise is covered by your account.
  - `clientId` string — The ID of the client this invoice is assigned to. Leave empty if assigning to a company.
  - `companyId` string — The ID of the company this invoice is assigned. This is required when an invoice is assigned to a client with more than one company.

## Response `200`

200

- object
  - `id` string
  - `object` string
  - `recipientId` string
  - `clientId` string
  - `companyId` string
  - `status` string
  - `memo` string
  - `taxPercentage` number
  - `currency` string
  - `lineItems` object[]
    - `amount` integer
    - `description` string
    - `quantity` integer
  - `total` integer
  - `taxAmount` integer
  - `dueDate` string
  - `sentDate` string
  - `paymentSuccessDate` string
  - `number` string
  - `paymentMethodPreferences` object[]
    - `type` string
    - `feePaidByClient` boolean
  - `fileUrl` string
  - `receiptNumber` string
  - `receiptUrl` string
  - `billingReason` string
  - `createdAt` string
  - `updatedAt` string

## Other responses

- `400` — 400

---

[API](https://skmtc.net/assembly/apis/core-resources.md) · [All operations](https://skmtc.net/assembly/apis/core-resources/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/assembly/core-resources/versions/28a9e7d13a8c/schema)
