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

# POST /invoices/search

`POST /invoices/search`

Searches invoices.

## Request body

- SearchInvoicesRequest — Request body for searching invoices.
  - `filter` object, required — Filter criteria for the search.
    - `status` 'open' — Filter by invoice status. `open` returns invoices with non-zero clearing account balances. Pagination is disabled when this filter is set; any `page_info` provided in the request is ignored.
    - `tags` object — Tag-based filter criteria. When both `any` and `all` are provided, results must match every entry in `all` AND at least one entry in `any`.
      - `any` SearchTagFilter[] — Returns invoices matching at least one of the specified tags, using OR logic.
        - `key` string, required — Tag key to filter on. Must be an exact match; wildcards are not supported.
        - `value` string, required — Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key.
      - `all` SearchTagFilter[] — Returns invoices matching every specified tag, using AND logic.
        - `key` string, required — Tag key to filter on. Must be an exact match; wildcards are not supported.
        - `value` string, required — Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key.
    - `users` object — Line item user filter criteria. When both `any` and `all` are provided, results must match every entry in `all` AND at least one entry in `any`.
      - `any` UserReferenceRequest[] — Returns invoices matching at least one of the specified line item users, using OR logic.
        - union — 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.
      - `all` UserReferenceRequest[] — Returns invoices matching every specified line item user, using AND logic.
        - union — 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.
    - `transaction_tags` object — Filter invoices by tags on transactions allocated to them. Returns invoices that have at least one allocated transaction matching the specified tags.
      - `any` SearchTagFilter[] — Returns transactions matching at least one of the specified tags, using OR logic.
        - `key` string, required — Tag key to filter on. Must be an exact match; wildcards are not supported.
        - `value` string, required — Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key.
      - `all` SearchTagFilter[] — Returns transactions matching every specified tag, using AND logic.
        - `key` string, required — Tag key to filter on. Must be an exact match; wildcards are not supported.
        - `value` string, required — Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key.
    - `user_tag_and_balance` SearchInvoiceUserTagAndBalanceFilter — Returns invoices where at least one line item user, optionally restricted to users matching `user_tags`, has a per-invoice net remaining balance satisfying `net_remaining_balance` on any currency. Pagination is disabled when this filter is set; any `page_info` provided in the request is ignored.
      - `user_tags` object — Tag-based filter criteria. When both `any` and `all` are provided, results must match every entry in `all` AND at least one entry in `any`.
        - `any` SearchTagFilter[] — Returns users matching at least one of the specified tags, using OR logic.
          - `key` string, required — Tag key to filter on. Must be an exact match; wildcards are not supported.
          - `value` string, required — Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key.
        - `all` SearchTagFilter[] — Returns users matching every specified tag, using AND logic.
          - `key` string, required — Tag key to filter on. Must be an exact match; wildcards are not supported.
          - `value` string, required — Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key.
        - `not_any` SearchTagFilter[] — Returns users that do not match any of the specified tags.
          - `key` string, required — Tag key to filter on. Must be an exact match; wildcards are not supported.
          - `value` string, required — Tag value pattern to filter on. Supports wildcards: `*` matches any characters, `?` matches a single character. Use `\*` or `\?` to match literal asterisks or question marks. Use `*` to match any value for the given key.
      - `net_remaining_balance` NetRemainingBalanceComparator, required — Numeric comparator for the per-user net remaining balance on the invoice. Multiple keys combine with AND logic.
        - `gt` string — Strictly greater than. Decimal integer string in the smallest currency unit, such as cents for USD.
        - `lt` string — Strictly less than. Decimal integer string in the smallest currency unit, such as cents for USD.
        - `gte` string — Greater than or equal to. Decimal integer string in the smallest currency unit, such as cents for USD.
        - `lte` string — Less than or equal to. Decimal integer string in the smallest currency unit, such as cents for USD.
        - `eq` string — Equal to. Decimal integer string in the smallest currency unit, such as cents for USD.
        - `ne` string — Not equal to. Decimal integer string in the smallest currency unit, such as cents for USD.
    - `created` SearchInvoiceCreatedFilter — Filter by invoice creation timestamp. When both `after` and `before` are provided, results must fall in the range.
      - `after` string, date-time — Returns invoices created at or after the timestamp. ISO 8601 datetime.
      - `before` string, date-time — Returns invoices created at or before the timestamp. ISO 8601 datetime.
    - `modified` SearchInvoiceModifiedFilter — Filter by invoice last modified timestamp. When both `after` and `before` are provided, results must fall in the range.
      - `after` string, date-time — Returns invoices last modified at or after the timestamp. ISO 8601 datetime.
      - `before` string, date-time — Returns invoices last modified at or before the timestamp. ISO 8601 datetime.
  - `page_info` object — Pagination parameters.
    - `limit` integer — Number of results to return. Defaults to 20.
    - `after` string — Cursor for fetching the next page of results.

## Response `200`

Success

- SearchInvoicesResponse — Search results for invoices.
  - `data` SearchInvoicesResponseData, required — Search results for invoices.
    - `invoices` InvoiceDetail[], required — Invoices matching the search criteria.
      - `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.
      - `users` UserBalances[], required — Users involved in the invoice.
        - `id` string, required — User-provided unique external ID.
        - `external_id` string, required — User-provided unique ID.
        - `balances` CurrencyBalance[], required — Per-currency balance breakdown for the user.
          - `payins` CurrencyBalanceBreakdownPayinsResponse, required — Payins balance breakdown.
            - `expected` string, required — Expected amount as a string in the smallest currency unit, such as cents for USD.
            - `actual` string, required — Actual amount as a string in the smallest currency unit, such as cents for USD.
            - `remaining` string, required — Remaining amount as a string in the smallest currency unit, such as cents for USD.
          - `payouts` CurrencyBalanceBreakdownPayoutsResponse, required — Payouts balance breakdown.
            - `expected` string, required — Expected amount as a string in the smallest currency unit, such as cents for USD.
            - `actual` string, required — Actual amount as a string in the smallest currency unit, such as cents for USD.
            - `remaining` string, required — Remaining amount as a string in the smallest currency unit, such as cents for USD.
          - `net` CurrencyBalanceBreakdownNetResponse, required — Net balance breakdown.
            - `expected` string, required — Expected amount as a string in the smallest currency unit, such as cents for USD.
            - `actual` string, required — Actual amount as a string in the smallest currency unit, such as cents for USD.
            - `remaining` string, required — Remaining amount as a string in the smallest currency unit, such as cents for USD.
          - `currency` string, required — ISO 4217 or crypto currency code.
      - `balances` CurrencyBalance[], required — Invoice-level balances by currency.
        - `payins` CurrencyBalanceBreakdownPayinsResponse, required — Payins balance breakdown.
          - `expected` string, required — Expected amount as a string in the smallest currency unit, such as cents for USD.
          - `actual` string, required — Actual amount as a string in the smallest currency unit, such as cents for USD.
          - `remaining` string, required — Remaining amount as a string in the smallest currency unit, such as cents for USD.
        - `payouts` CurrencyBalanceBreakdownPayoutsResponse, required — Payouts balance breakdown.
          - `expected` string, required — Expected amount as a string in the smallest currency unit, such as cents for USD.
          - `actual` string, required — Actual amount as a string in the smallest currency unit, such as cents for USD.
          - `remaining` string, required — Remaining amount as a string in the smallest currency unit, such as cents for USD.
        - `net` CurrencyBalanceBreakdownNetResponse, required — Net balance breakdown.
          - `expected` string, required — Expected amount as a string in the smallest currency unit, such as cents for USD.
          - `actual` string, required — Actual amount as a string in the smallest currency unit, such as cents for USD.
          - `remaining` string, required — Remaining amount as a string in the smallest currency unit, such as cents for USD.
        - `currency` string, required — ISO 4217 or crypto currency code.
      - `payments` InvoicePayment[], required — Payments allocated to the invoice.
        - `amount` string, required — Amount allocated as a string in the smallest currency unit, such as cents for USD.
        - `currency` '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.
        - `transaction` InvoicePaymentTransactionReferenceResponse, required — Transaction the payment is applied to.
          - `id` string, required — FRAGMENT generated unique ID.
          - `external_id` string, required — User-provided unique ID.
          - `tags` Tag[], required — Tags from the parent transaction.
            - `key` string, required — Tag key.
            - `value` string, required — Tag value.
        - `type` 'payin' | 'payout', required — Type of the payment.
        - `posted` string, date-time, required — Timestamp when the parent transaction was posted. Uses ISO 8601 format.
        - `user` InvoicePaymentUserReferenceResponse, required — User associated with the payment.
          - `id` string, required — FRAGMENT generated unique ID.
          - `external_id` string, required — User-provided unique ID.
    - `page_info` object, required — Pagination cursors.
      - `next_cursor` string — Cursor to fetch the next page of results.

## Other responses

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

## Changes

- **2026-06-16** `5a1a9ed0355e` — 1 info
  - added the new optional request property `filter/modified`
- **2026-05-22** `95913ffae431` — 1 info
  - added the new optional request property `filter/user_tag_and_balance/user_tags/not_any`
- **2026-05-11** `91a072ddf86d` — 2 info
  - added the new optional request property `filter/created`
  - added the new optional request property `filter/user_tag_and_balance`
- **2026-04-17** `091e4746720a` — 2 info
  - added the new optional request property `filter/transaction_tags`
  - added the new optional request property `filter/users`
- **2026-04-14** `8472a9bd15ea` — 1 breaking, 7 info
  - the `data/invoices/items/allOf[subschema #2]/payments/items/transaction` response's property type changed from no type to `object` for status `200`
  - the request property `page_info` became optional
  - removed `#/components/schemas/TransactionReferenceResponse, subschema #2` from the `data/invoices/items/allOf[subschema #2]/payments/items/transaction` response property `allOf` list for the response status `200`
  - the response property `data/invoices/items/allOf[subschema #2]/payments/items/user/external_id` became required for the status `200`
  - …4 more

[Full history](https://skmtc.dev/fragment-dev/apis/fragment-payments-api/changes/invoices/search/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)
