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

# Update funding account settlement destination

> Rotate the settlement destination for a permanent active funding account

<RequestExample>
  ```bash Update NGN virtual account to onchain settlement theme={null}
  curl --request PATCH \
    --url https://api.daya.co/v1/funding-accounts/750e8400-e29b-41d4-a716-446655440000/settlement-destination \
    --header 'Content-Type: application/json' \
    --header 'X-Api-Key: YOUR_API_KEY' \
    --header 'X-Idempotency-Key: update-funding-account-001' \
    --data '{
      "type": "ONCHAIN",
      "destination_asset": "USDC",
      "destination_chain": "BASE",
      "destination_address": "0x742d35cc6634c0532925a3b844bc9e7595f2bd18"
    }'
  ```

  ```bash Update crypto address to NGN payout settlement theme={null}
  curl --request PATCH \
    --url https://api.daya.co/v1/funding-accounts/750e8400-e29b-41d4-a716-446655440000/settlement-destination \
    --header 'Content-Type: application/json' \
    --header 'X-Api-Key: YOUR_API_KEY' \
    --header 'X-Idempotency-Key: update-funding-account-002' \
    --data '{
      "type": "NGN_PAYOUT",
      "destination_bank": {
        "account_number": "0123456789",
        "bank_code": "058"
      }
    }'
  ```
</RequestExample>

## Overview

Rotate the active settlement destination for a permanent active funding account. This operation does not create new payment details.

## Authentication

<ParamField header="X-Api-Key" type="string" required>
  Your merchant API key
</ParamField>

<ParamField header="X-Idempotency-Key" type="string" required>
  Unique idempotency key for request deduplication
</ParamField>

## Path Parameters

<ParamField path="id" type="string" required>
  Funding account ID.
</ParamField>

## Request Body

<ParamField body="type" type="string" required>
  Settlement destination type. Allowed values depend on the funding account rail; see the matrix below.
</ParamField>

<ParamField body="destination_asset" type="string">
  Required for `NGN_VIRTUAL_ACCOUNT` funding accounts when `type` is `ONCHAIN`.
</ParamField>

<ParamField body="destination_chain" type="string">
  Required for `NGN_VIRTUAL_ACCOUNT` funding accounts when `type` is `ONCHAIN`.
</ParamField>

<ParamField body="destination_address" type="string">
  Required for `NGN_VIRTUAL_ACCOUNT` funding accounts when `type` is `ONCHAIN`.
</ParamField>

### Allowed settlement destination types

This endpoint only updates permanent active funding accounts. The rail comes from the funding account identified by `id`; do not send `rail` in this request.

| Funding account rail  | Allowed `type` values            |
| --------------------- | -------------------------------- |
| `NGN_VIRTUAL_ACCOUNT` | `INTERNAL_BALANCE`, `ONCHAIN`    |
| `CRYPTO_ADDRESS`      | `INTERNAL_BALANCE`, `NGN_PAYOUT` |

Do not send `NGN_PAYOUT` for `NGN_VIRTUAL_ACCOUNT` funding accounts, and do not send `ONCHAIN` for `CRYPTO_ADDRESS` funding accounts.

### `destination_bank`

`destination_bank` is a nested object. Do not send dotted keys such as `destination_bank.account_number`.

| Field            | Type   | Required                                                                |
| ---------------- | ------ | ----------------------------------------------------------------------- |
| `account_number` | string | Yes, for `CRYPTO_ADDRESS` funding accounts when `type` is `NGN_PAYOUT`. |
| `bank_code`      | string | Yes, for `CRYPTO_ADDRESS` funding accounts when `type` is `NGN_PAYOUT`. |

Before sending `destination_bank`, fetch supported banks with [`GET /v1/banks`](/api-reference/banks/list-banks), then verify the account with [`POST /v1/banks/resolve`](/api-reference/banks/resolve-bank-account). Use the verified `bank_code` and `account_number` in this request. Daya returns the resolved `account_name` in the funding account response.

<Warning>
  `rate_id` is rejected for permanent funding accounts.
</Warning>

## Destination Shapes

```json Internal balance (NGN virtual account or crypto address) theme={null}
{
  "type": "INTERNAL_BALANCE"
}
```

```json NGN virtual account to onchain settlement theme={null}
{
  "type": "ONCHAIN",
  "destination_asset": "USDC",
  "destination_chain": "BASE",
  "destination_address": "0x742d35cc6634c0532925a3b844bc9e7595f2bd18"
}
```

```json Crypto address to NGN payout settlement theme={null}
{
  "type": "NGN_PAYOUT",
  "destination_bank": {
    "account_number": "0123456789",
    "bank_code": "058"
  }
}
```

## Request Example

```bash Update NGN virtual account to onchain settlement theme={null}
curl --request PATCH \
  --url https://api.daya.co/v1/funding-accounts/750e8400-e29b-41d4-a716-446655440000/settlement-destination \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'X-Idempotency-Key: update-funding-account-001' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "ONCHAIN",
    "destination_asset": "USDC",
    "destination_chain": "BASE",
    "destination_address": "0x742d35cc6634c0532925a3b844bc9e7595f2bd18"
  }'
```

## Response

Returns the funding account object with the new active settlement destination.
