---
title: "PATCH /invoices/{id}"
method: PATCH
path: "/invoices/{id}"
tags: ["Invoices"]
---

# PATCH /invoices/{id}

`PATCH /invoices/{id}`

Updates an invoice

## Path parameters

- `id` string, required — Invoice ID

## Request body

- UpdateInvoiceRequest — Request body for updating an invoice.
  - `current_invoice_version` number, required — The current version of the invoice. Must match the stored version for the update to succeed (optimistic concurrency).
  - `tags` UpdateTagsRequest
    - `create` TagRequest[] — Tags to add
      - `key` string, required — Tag key. Must be a valid safe string (no special characters like #, /, :). Max 50 characters.
      - `value` string, required — Tag value. Must be a valid safe string (no special characters like #, /, :). Max 200 characters.
    - `update` TagRequest[] — Tags to update. The key identifies the existing tag; the value is the new value.
      - `key` string, required — Tag key. Must be a valid safe string (no special characters like #, /, :). Max 50 characters.
      - `value` string, required — Tag value. Must be a valid safe string (no special characters like #, /, :). Max 200 characters.
    - `delete` TagDeleteRequest[] — Tags to remove by key
      - `key` string, required — Tag key to delete
  - `line_items` UpdateInvoiceLineItemsRequest
    - `create` LineItemCreateRequest[] — Line items to add to the invoice
      - `type` 'payin' | 'payout', required — The type of the line item
      - `product_id` string, required — ID of the product/catalog item
      - `amount` string — Deprecated: use price instead. Total amount in smallest currency unit.
      - `price` PricingRequest — Price breakdown. Provide amount, or unit_price + quantity, or all three.
        - `amount` string — Total amount in smallest currency unit. Required if unit_price and quantity are not provided.
        - `unit_price` string — Price per unit in smallest currency unit.
        - `quantity` integer — Number of units for this 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' — Currency code (ISO 4217 or crypto)
      - `description` string, required — Description of the line item
      - `user` union, required — Identifies a user by Fragment-generated id or external_id (request body).
        - object
          - `id` string, required — FRAGMENT generated ID of the user
        - object
          - `external_id` string, required — External ID of the user
      - `tags` TagRequest[] — Optional metadata tags for this line item
        - `key` string, required — Tag key. Must be a valid safe string (no special characters like #, /, :). Max 50 characters.
        - `value` string, required — Tag value. Must be a valid safe string (no special characters like #, /, :). Max 200 characters.
    - `update` LineItemUpdateRequest[] — Existing line items to update
      - `id` string, required — ID of the line item to update
      - `price` PriceUpdateRequest
        - `amount` string — Total amount in smallest currency unit.
        - `unit_price` string, required — Price per unit in smallest currency unit.
        - `quantity` integer, required — Number of units for this line item.
      - `description` string
      - `tags` UpdateTagsRequest
        - `create` TagRequest[] — Tags to add
          - `key` string, required — Tag key. Must be a valid safe string (no special characters like #, /, :). Max 50 characters.
          - `value` string, required — Tag value. Must be a valid safe string (no special characters like #, /, :). Max 200 characters.
        - `update` TagRequest[] — Tags to update. The key identifies the existing tag; the value is the new value.
          - `key` string, required — Tag key. Must be a valid safe string (no special characters like #, /, :). Max 50 characters.
          - `value` string, required — Tag value. Must be a valid safe string (no special characters like #, /, :). Max 200 characters.
        - `delete` TagDeleteRequest[] — Tags to remove by key
          - `key` string, required — Tag key to delete
    - `delete` LineItemDeleteRequest[] — Line items to remove from the invoice
      - `id` string, required — ID of the line item to delete

## Response `200`

Success

- InvoiceSuccessResponse
  - `data` Invoice, required — Invoice object
    - `id` string, required — Unique identifier for the invoice
    - `workspace_id` string, required — Workspace ID this invoice belongs to
    - `status` 'active', required — The status of the invoice
    - `line_items` InvoiceLineItem[] — List of line items associated with this invoice
      - `id` string, required — Unique identifier for the line item
      - `type` 'payin' | 'payout', required — The type of the line item
      - `product_id` string, required — ID of the product/catalog item
      - `amount` string, required — Deprecated: use price.amount instead. Total amount in smallest currency unit (represented as string for bigint)
      - `price` Price, required — Price breakdown containing amount, unit price, and quantity
        - `amount` string, required — Total amount in smallest currency unit (represented as string for bigint)
        - `unit_price` string, required — Unit price in smallest currency unit (represented as string for bigint)
        - `quantity` integer, required — Quantity of units for this 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', required — Currency code (ISO 4217 or crypto)
      - `description` string, required — Description of the line item
      - `user_id` string, required — External ID of the user associated with this line item
      - `tags` Tag[], required — Metadata tags for this line item
        - `key` string, required — Tag key
        - `value` string, required — Tag value
    - `created` string, date-time, required — ISO 8601 timestamp when the invoice was created
    - `modified` string, date-time — ISO 8601 timestamp when the invoice was last modified
    - `version` number, required — The current version of the invoice. Pass this value when updating to ensure thread safety.
    - `tags` Tag[], required — Metadata tags for this invoice
      - `key` string, required — Tag key
      - `value` string, required — Tag value

## Other responses

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

## Changes

- **2026-03-27** `0b499e34e128` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/fragment-dev/apis/fragment-payments-api/changes/invoices/:id/patch.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/0b499e34e128/schema)
