---
title: "Create Invoice"
method: POST
path: "/invoices"
tags: ["Captures"]
---

# Create Invoice

`POST /invoices`

**Purpose:**

Captures against an order. This can be done against part of the authorised order amount (partial capture) or its entire amount (full capture). 

For partial captures, please submit each as a separate request specifying the amount until the full amount of the associated Order is reached. 

**Preconditions:** 

- `id`: The unique identifier of the order
- Order with `id` has a sufficient unshipped `amount` (not lower than the `amount` provided to be captured).
- Invoice Number present as `external_code` 
- Invoice present and reachable for download at `invoice_url`

**Success:** 

- Response Code: `HTTP 201`
- Response body: 'uuid` -> unique identifier of the capture

**Attention:**

- Only one order `id` can be provided per request.
- Don’t submit a negative `amount` value.
- The referenced order will change its state to `shipped` if the full `amount` is captured and `partially_shipped` for a capture amount lower then the order amount. 
- Capturing an order that is already partially shipped with an amount equal to the remaining amount will change the state of the order from `partially_shipped` to `shipped`.

## Request body

- CreateInvoiceRequest
  - `orders` UUID[], required — Include all the order ids that you want to create an invoice for (currently only one order is supported).
  - `external_code` string, required
  - `invoice_url` string, required
  - `shipping_info` ShippingInfo — Shipping information for tracking, delivery, method.
    - `return_shipping_company` unknown
    - `return_tracking_number` unknown
    - `return_tracking_url` unknown
    - `shipping_company` unknown
    - `shipping_method` unknown
    - `tracking_number` unknown
    - `tracking_url` unknown
  - `amount` AmountDTO, required — The amount object with split values for net, gross and tax
    - `gross` number, float, required — Value greater than 0, with max. 2 decimals. It should equal to net + tax.
    - `net` number, float, required — Value greater than 0, with max. 2 decimals.
    - `tax` number, float, required — Value greater than or equal to 0, with max. 2 decimals.
  - `line_items` LineItemsRequest[]
    - `external_id` string, nullable
    - `title` string
    - `description` string, nullable
    - `quantity` number
    - `category` string, nullable
    - `brand` string, nullable
    - `gtin` string, nullable
    - `mpn` string, nullable
    - `amount_gross` number — Value is in cents
    - `amount_net` number, nullable — Value is in cents
    - `amount_tax` number, nullable — Value is in cents
    - `tax_rate` number, nullable — Value is in cents
    - `unit_price` number — Value is in cents
    - `total_discount_amount` number, nullable — Value is in cents
    - `product_url` string, nullable
    - `image_url` string, nullable
    - `quantity_unit` string, nullable
    - `type` string, nullable

## Response `201`

Invoice successfully created

- object
  - `uuid` string, uuid, required

## Other responses

- `400` — Invalid Request Data
- `401` — Unauthorized request or invalid credentials
- `500` — Unexpected Server Error

---

[API](https://skmtc.net/billie/apis/billie-direct-api.md) · [All operations](https://skmtc.net/billie/apis/billie-direct-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/billie/billie-direct-api/revisions/8cce15617825/schema)
