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

# List Settlements

> Retrieve a paginated list of settlements for your merchant account

# List Settlements

Returns a paginated list of settlements for your merchant account. Settlements are created automatically when a payment is confirmed and represent the transfer of funds to your settlement wallet.

## Query Parameters

<ParamField query="status" type="string">
  Filter by settlement status. One of: `pending`, `submitted`, `completed`, `failed`.

  | Status      | Description                                                 |
  | ----------- | ----------------------------------------------------------- |
  | `pending`   | Settlement queued, not yet broadcast                        |
  | `submitted` | Transaction broadcast to the network, awaiting confirmation |
  | `completed` | Settlement confirmed on-chain, funds received               |
  | `failed`    | Settlement failed (will be retried)                         |
</ParamField>

<ParamField query="chain" type="string">
  Filter by settlement chain (e.g. `ethereum`, `bsc`).
</ParamField>

<ParamField query="from" type="string">
  Filter settlements created on or after this date. ISO 8601 format.
</ParamField>

<ParamField query="to" type="string">
  Filter settlements created on or before this date. ISO 8601 format.
</ParamField>

<ParamField query="limit" type="number" default="20">
  Number of results per page. Min: `1`, Max: `100`.
</ParamField>

<ParamField query="page" type="number" default="1">
  Page number (1-indexed).
</ParamField>

## Response

<ResponseField name="data" type="array">
  <Expandable title="Settlement objects">
    <ResponseField name="id" type="string">UUID of the settlement</ResponseField>
    <ResponseField name="invoiceId" type="string">UUID of the associated invoice</ResponseField>
    <ResponseField name="amount" type="string">Net amount sent to merchant wallet (after fees)</ResponseField>
    <ResponseField name="grossAmount" type="string | null">Gross amount before fees</ResponseField>
    <ResponseField name="currency" type="string">Settlement currency (your preferred currency)</ResponseField>
    <ResponseField name="chain" type="string">Settlement chain</ResponseField>
    <ResponseField name="transactionHash" type="string | null">On-chain transaction hash</ResponseField>
    <ResponseField name="merchantWallet" type="string">Destination wallet address</ResponseField>
    <ResponseField name="status" type="string">Settlement status</ResponseField>
    <ResponseField name="initiatedAt" type="string | null">When the transaction was broadcast</ResponseField>
    <ResponseField name="completedAt" type="string | null">When the settlement was confirmed</ResponseField>
    <ResponseField name="failedAt" type="string | null">When the settlement failed (if applicable)</ResponseField>
    <ResponseField name="createdAt" type="string">ISO 8601 creation timestamp</ResponseField>
    <ResponseField name="updatedAt" type="string">ISO 8601 last-updated timestamp</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pagination" type="object">
  Pagination metadata (same as [List Invoices](/api-reference/invoices/list)).
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  # List all completed settlements
  curl "https://api.settlx.io/api/v1/settlements?status=completed" \
    -H "Authorization: Bearer pk_live_your_api_key"

  # Filter by chain and date range
  curl "https://api.settlx.io/api/v1/settlements?chain=ethereum&from=2024-01-01T00:00:00Z" \
    -H "Authorization: Bearer pk_live_your_api_key"
  ```

  ```javascript Node.js theme={null}
  const params = new URLSearchParams({ status: 'completed', limit: '50' });
  const response = await fetch(`https://api.settlx.io/api/v1/settlements?${params}`, {
    headers: { 'Authorization': 'Bearer pk_live_your_api_key' }
  });
  const { data, pagination } = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "d4e5f6a7-b8c9-0123-def0-456789012345",
        "invoiceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "amount": "98.49",
        "grossAmount": "99.99",
        "currency": "USDT",
        "chain": "ethereum",
        "transactionHash": "0x9f4c3a8b7e6d5f4c3a8b7e6d5f4c3a8b7e6d5f4c3a8b7e6d5f4c3a8b7e6d5f4c",
        "merchantWallet": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1",
        "status": "completed",
        "initiatedAt": "2024-01-15T10:05:00.000Z",
        "completedAt": "2024-01-15T10:06:30.000Z",
        "failedAt": null,
        "createdAt": "2024-01-15T10:04:30.000Z",
        "updatedAt": "2024-01-15T10:06:30.000Z"
      }
    ],
    "pagination": {
      "total": 87,
      "page": 1,
      "limit": 20,
      "totalPages": 5
    }
  }
  ```
</ResponseExample>
