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

# Settlement

> Read and update merchant settlement preferences.

## Overview

Settlement preferences control how Pepay settles funds to the merchant (for example, stable settlement token selection).

## Authentication

Settlement preferences are dashboard-authenticated (Bearer JWT).

## Request

### Get settlement preferences

```ts theme={null}
const prefs = await pepay.settlement.getPreferences();
```

### Update settlement token

```ts theme={null}
await pepay.settlement.updateSettlementToken({ settlement_token_id: 123 });
```

## Response

Example preferences response (truncated):

```json theme={null}
{
  "settlement_preference": "stables_preferred",
  "description": "Prefer stable coins when available, fallback to original token",
  "selected_settlement_token": {
    "id": 5,
    "token_symbol": "USDC",
    "network": "ethereum",
    "is_default": false
  },
  "updated_at": 1766318400
}
```

## Errors

* `401` missing/invalid dashboard bearer token
* `400` invalid settlement token id

## Examples

* If you update settlement token, verify downstream reporting uses the new preference before shipping to production.

Next: [Events](/sdk/merchants/events)
