> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iterapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /merchants/{merchantID}/invoices — List invoices

> Retrieve a paginated list of invoices for a merchant. Filter by type, state, amount, date range, token, AML status, and more.

Use this endpoint to retrieve invoices associated with a merchant account. The response is paginated and supports a wide range of filters to narrow results by invoice type, state, payment token, amount range, or date range.

## Path parameters

<ParamField path="merchantID" type="string" required>
  The UUID of the merchant account to list invoices for.
</ParamField>

## Query parameters

<ParamField query="types[]" type="string[]">
  Filter results by invoice type. Accepted values: `onetime`, `reusable`, `collect`, `withdraw`.
</ParamField>

<ParamField query="states[]" type="string[]">
  Filter results by invoice state (e.g., `pending`, `paid`, `expired`).
</ParamField>

<ParamField query="tokens[]" type="string[]">
  Filter by token or payment method identifier.
</ParamField>

<ParamField query="amountFrom" type="string">
  Return only invoices with an amount greater than or equal to this value.
</ParamField>

<ParamField query="amountTo" type="string">
  Return only invoices with an amount less than or equal to this value.
</ParamField>

<ParamField query="dateFrom" type="string">
  Return only invoices created on or after this ISO 8601 datetime (e.g., `2024-01-01T00:00:00Z`).
</ParamField>

<ParamField query="dateTo" type="string">
  Return only invoices created on or before this ISO 8601 datetime.
</ParamField>

<ParamField query="collectStates[]" type="string[]">
  Filter collect-type invoices by their collection state.
</ParamField>

<ParamField query="showArchived" type="boolean" default="false">
  When `true`, includes archived invoices in the results.
</ParamField>

<ParamField query="amlOk" type="boolean">
  Filter by AML (Anti-Money Laundering) check status. Pass `true` to return only invoices that have passed AML checks.
</ParamField>

<ParamField query="search" type="string">
  Full-text search string to match against invoice descriptions or references.
</ParamField>

<ParamField query="limit" type="number" default="20">
  Maximum number of invoices to return per page.
</ParamField>

<ParamField query="page" type="number" default="1">
  Page number for pagination.
</ParamField>

<ParamField query="order" type="string" default="desc">
  Sort direction. Accepted values: `asc`, `desc`.
</ParamField>

<ParamField query="orderBy" type="string">
  Field to sort results by (e.g., `createdAt`, `amount`).
</ParamField>

## Response

Returns a paginated list of invoice objects.

<ResponseField name="data" type="object[]">
  Array of invoice objects.

  <Expandable title="invoice properties">
    <ResponseField name="id" type="string">
      The UUID of the invoice.
    </ResponseField>

    <ResponseField name="amount" type="string">
      The invoice amount as a decimal string.
    </ResponseField>

    <ResponseField name="type" type="string">
      The invoice type: `onetime`, `reusable`, `collect`, or `withdraw`.
    </ResponseField>

    <ResponseField name="state" type="string">
      The current state of the invoice.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp of when the invoice was created.
    </ResponseField>

    <ResponseField name="paymentMethodID" type="number">
      The ID of the payment method associated with this invoice.
    </ResponseField>

    <ResponseField name="amlOk" type="boolean">
      Whether the invoice has passed AML checks.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="total" type="number">
  Total number of invoices matching the applied filters.
</ResponseField>

<ResponseField name="page" type="number">
  The current page number.
</ResponseField>

<ResponseField name="limit" type="number">
  The number of results returned per page.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.iterapay.com/merchants/b0fcc813-a7ce-4bbc-932f-dbef6f59ca7f/invoices?types[]=onetime&states[]=pending&limit=20&page=1&order=desc' \
    --header 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "b0fcc813-a7ce-4bbc-932f-dbef6f59ca7f",
        "amount": "100.00",
        "type": "onetime",
        "state": "pending",
        "createdAt": "2024-01-15T10:30:00Z",
        "paymentMethodID": 1,
        "amlOk": true
      }
    ],
    "total": 1,
    "page": 1,
    "limit": 20
  }
  ```
</ResponseExample>
