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

# POST /invoices

`POST /invoices`

Creates an invoice.

## Request body

- CreateInvoiceRequest — Request body for creating an invoice.
  - `invoice_id` string, required — Unique ID for the invoice.
  - `line_items` LineItemCreateRequest[], required — Line items to create with the invoice.
    - `type` 'payin' | 'payout', required — Type of the line item.
    - `product_id` string, required — Unique identifier for the product.
    - `amount` string — Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price instead.
    - `price` PricingRequest — Price breakdown. Provide amount, or unit_price and quantity, or all three.
      - `amount` string — Total amount as a string in the smallest currency unit, such as cents for USD. Required if unit_price and quantity are not provided.
      - `unit_price` string — Price per unit as a string in the smallest currency unit, such as cents for USD.
      - `quantity` integer — Number of units for the line item.
    - `currency_code` 'ADA' | 'BTC' | 'DAI' | 'ETH' | 'SOL' | 'USDC' | 'USDT' | 'USDG' | 'EURC' | 'CADC' | 'CADT' | 'XLM' | 'UNI' | 'BCH' | 'LTC' | 'AAVE' | 'LINK' | 'MATIC' | 'PTS' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GGP' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'IMP' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SPL' | 'SRD' | 'SVC' | 'SYP' | 'STN' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TVD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'LOGICAL' | 'CUSTOM' — ISO 4217 or crypto currency code.
    - `description` string, required — Description of the line item.
    - `user` union, required — Identifies a user by `id` or `external_id`.
      - object
        - `id` string, required — FRAGMENT generated unique ID.
      - object
        - `external_id` string, required — User-provided unique ID.
    - `tags` TagRequest[] — Tags for the line item.
      - `key` string, required — Tag key. Must not contain #, /, or :. Max 50 characters.
      - `value` string, required — Tag value. Must not contain #, /, or :. Max 200 characters.
  - `tags` TagRequest[] — Tags for the invoice.
    - `key` string, required — Tag key. Must not contain #, /, or :. Max 50 characters.
    - `value` string, required — Tag value. Must not contain #, /, or :. Max 200 characters.

## Response `201`

Success

- InvoiceSuccessResponse
  - `data` Invoice, required — Invoice object.
    - `id` string, required — Unique invoice ID.
    - `workspace_id` string, required — Workspace the invoice belongs to.
    - `status` 'active', required — Status of the invoice. Deprecated.
    - `line_items` InvoiceLineItem[] — Line items for the invoice.
      - `id` string, required — FRAGMENT generated unique ID.
      - `type` 'payin' | 'payout', required — Type of the line item.
      - `product_id` string, required — Unique identifier for the product.
      - `amount` string, required — Total amount as a string in the smallest currency unit, such as cents for USD. Deprecated, use price.amount instead.
      - `price` Price, required — Price breakdown.
        - `amount` string, required — Total amount as a string in the smallest currency unit, such as cents for USD.
        - `unit_price` string, required — Unit price as a string in the smallest currency unit, such as cents for USD.
        - `quantity` integer, required — Number of units.
      - `currency_code` 'ADA' | 'BTC' | 'DAI' | 'ETH' | 'SOL' | 'USDC' | 'USDT' | 'USDG' | 'EURC' | 'CADC' | 'CADT' | 'XLM' | 'UNI' | 'BCH' | 'LTC' | 'AAVE' | 'LINK' | 'MATIC' | 'PTS' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GGP' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'IMP' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SPL' | 'SRD' | 'SVC' | 'SYP' | 'STN' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TVD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'LOGICAL' | 'CUSTOM', required — ISO 4217 or crypto currency code.
      - `description` string, required — Description of the line item.
      - `user_id` string, required — User-provided unique external ID.
      - `tags` Tag[], required — Tags for the line item.
        - `key` string, required — Tag key.
        - `value` string, required — Tag value.
    - `created` string, date-time, required — Timestamp when the invoice was created. Uses ISO 8601 format.
    - `modified` string, date-time — Timestamp when the invoice was last modified. Uses ISO 8601 format.
    - `version` number, required — Current version of the invoice.
    - `tags` Tag[], required — Tags for the invoice.
      - `key` string, required — Tag key.
      - `value` string, required — Tag value.

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `500` — Internal server error

## Changes

- **2026-04-14** `8472a9bd15ea` — 1 breaking, 1 info
  - removed `subschema #1, subschema #2` from the `line_items/items/user` request property `anyOf` list
  - added `subschema #1, subschema #2` to the `line_items/items/user` request property `anyOf` list
- **2026-03-27** `1ac1d5e34a8f` — 1 info
  - response property `data/status` deprecated
- **2026-03-20** `f2aa708834d1` — 3 info
  - added the new optional request property `line_items/items/price`
  - the request property `line_items/items/amount` became optional
  - request property `line_items/items/amount` deprecated
- **2026-03-19** `0893c377bfd0` — 2 info
  - response property `data/line_items/items/amount` deprecated
  - added the required property `data/line_items/items/price` to the response with the `201` status
- **2026-03-13** `dd22ecbbe8e5` — 5 breaking, 5 warning
  - the request property `invoice_id` became required
  - the request property `line_items` became required
  - the request property `line_items/items/user` became required
  - removed the required property `data/line_items/items/currencyCode` from the response with the `201` status
  - …6 more

[Full history](https://skmtc.dev/fragment-dev/apis/fragment-payments-api/changes/invoices/post.md)

---

[API](https://skmtc.dev/fragment-dev/apis/fragment-payments-api.md) · [All operations](https://skmtc.dev/fragment-dev/apis/fragment-payments-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fragment-dev/fragment-payments-api/revisions/41ca2c686012/schema)
