<!--
Sitemap:
- [Stridge — The infrastructure bridging crypto payments](/index): Crypto payment infrastructure for modern fintechs. Accept on any chain, settle through the cheapest route, and pay out in any asset — all from a single SDK.
- [API Reference](/api-reference/): Stridge REST API reference — complete endpoint documentation for deposits, payouts, Universal Deposit Addresses, settlements, and supported networks.
- [Changelog](/changelog): Release notes for Stridge SDKs and developer tools.
- [Stridge Gateway Kit](/gateway/): Drop-in deposit and withdraw flows for crypto apps. Mount a single React provider, render a dialog, and ship any-to-any payments in minutes.
- [Getting Started](/getting-started): Get started with Stridge — pick your integration shape, generate keys, and make your first call from the React Kit, the TypeScript SDK, or the REST API.
- [Supported Networks](/networks): Blockchain networks and tokens supported by the Stridge payment infrastructure — network_id (SLIP-44), EIP-155 chain IDs, and the available native and stablecoin assets per chain.
- [TypeScript SDK](/sdk/): TypeScript client for the Stridge Gateway API. Used internally by @stridge/kit and exposed for backend and server integrations that need direct API access.
- [Security](/security/): Stridge Security — how the Stridge KMS protects wallet keys and signs transactions without ever exposing private keys.
- [Universal Deposit Addresses](/uda/): Universal Deposit Addresses (UDA) — one multi-chain deposit address per user, with automatic cross-chain settlement to a fixed destination.
- [Webhooks](/webhooks/): Stridge webhooks — signed HTTP POSTs for deposits, UDA settlements, wallets, and balances. Verify HMAC, handle retries, and use the Dashboard to inspect event payloads.
- [Gateway HTTP API](/gateway/http): Raw HTTP contract for the Stridge Gateway — supported-assets catalogue, gateway/start provisioning, and per-owner status polling.
- [UDA Quickstart](/uda/quickstart): Create your first Universal Deposit Address and trace a deposit end-to-end — from the POST call, through webhooks, to a settled transaction on the destination chain.
- [Settlements](/uda/settlements): UDA settlements — lifecycle, routing scenarios, fees, and the settlement record API. Reconcile deposits with webhooks; the Dashboard shows each settlement end-to-end.
- [UDA Webhook Events](/uda/webhooks): Reference for the three webhook events UDA deposits emit — deposit.confirmed, uda.settlement.created, and uda.settlement.completed — with payloads and lifecycle guidance.
- [Get a single deposit transaction by ID](/api-reference/deposits/get-a-single-deposit-transaction-by-id): Get details of a specific deposit transaction by its unique ID
- [Get a single deposit transaction by transaction id](/api-reference/deposits/get-a-single-deposit-transaction-by-transaction-id): One row per matching tx_id; multiple same-tx transfers are separate rows. Returns the latest by on-chain time (then id). Use GET /v1/deposits with tx_id filter
- [List deposit transactions](/api-reference/deposits/list-deposit-transactions): Get a paginated list of deposit transactions for the authenticated tenant with filtering support
- [Get blockchain assets](/api-reference/networks/get-blockchain-assets): Get a list of all supported blockchain assets (tokens and native assets).
- [Get blockchain networks](/api-reference/networks/get-blockchain-networks): Get a list of all supported blockchain networks.
- [Get network list](/api-reference/networks/get-network-list): Get a public list of all networks with category grouping.
- [Get tenant network](/api-reference/networks/get-tenant-network): Get a specific network for the authenticated tenant by network ID and contract address
- [Get tenant networks](/api-reference/networks/get-tenant-networks): Get a list of networks available to the authenticated tenant with their enabled status
- [Update tenant network status](/api-reference/networks/update-tenant-network-status): Update the enabled status of a network for the authenticated tenant
- [Create payout](/api-reference/payouts/create-payout): Creates a new payout from the tenant's vault wallet to an external address
- [Create payout with USD amount](/api-reference/payouts/create-payout-with-usd-amount): Creates a new payout converting a USD amount to crypto at current rate
- [Get payout by ID](/api-reference/payouts/get-payout-by-id): Retrieves a payout by its ID
- [Get vault address by network](/api-reference/payouts/get-vault-address-by-network): Get the vault address for a specific network
- [Get vault balances](/api-reference/payouts/get-vault-balances): Get balances for all vault addresses with optional filtering
- [Get vault total value](/api-reference/payouts/get-vault-total-value): Get the total USD value across all vault assets
- [List payouts](/api-reference/payouts/list-payouts): Lists payouts for a vault with filtering and pagination
- [List vault addresses](/api-reference/payouts/list-vault-addresses): Get all vault addresses for the authenticated tenant
- [List vaults](/api-reference/payouts/list-vaults): List all vault accounts for the authenticated tenant
- [Transfer from vault to external address](/api-reference/payouts/transfer-from-vault-to-external-address): Transfer assets from the tenant's vault wallet to an external address.
- [Get a settlement](/api-reference/settlements/get-a-settlement): Fetch a single settlement by ID. A settlement is created per confirmed deposit on a UDA address and carries the lifecycle state, scenario, and routing tx ids.
- [Create a UDA address](/api-reference/uda/create-a-uda-address): Allocate a new Universal Deposit Address for the tenant. If a UDA for the (tenant, owner) pair already exists, the existing record is returned with 200 instead
- [Get a cross-chain / cross-token quote](/api-reference/uda/get-a-cross-chain-cross-token-quote): Returns an indicative quote for routing from/to given (chain, token) pair. USD fields are omitted until a price feed is wired in.
- [Get a UDA address](/api-reference/uda/get-a-uda-address): Fetch a single UDA address by ID, including its delegation status.
- [List settlements for a UDA address](/api-reference/uda/list-settlements-for-a-uda-address): List all settlements that have been created for a given UDA address, optionally paginated.
- [List UDA addresses](/api-reference/uda/list-uda-addresses): List UDA addresses belonging to the authenticated tenant. Supports filtering by owner and status and pagination via limit/offset.
- [List UDA-supported chains](/api-reference/uda/list-uda-supported-chains): Returns every chain with `uda_support=true` along with its native currency and configured token contracts. Rows are grouped by network.
- [Retire a UDA address](/api-reference/uda/retire-a-uda-address): Mark a UDA address as retired. Future deposits will no longer trigger settlements; any already-confirmed settlements continue to run to completion.
- [Update a UDA address](/api-reference/uda/update-a-uda-address): Update the destination, accepted tokens, or status of an existing UDA. Owner is immutable.
-->

# Settlements \[How a deposit becomes funds on the destination chain]

A **settlement** is the canonical record of one UDA deposit moving
from its source chain to the destination chain and token. One
deposit produces exactly one settlement, and every settlement is
fetchable forever via
[`GET /v1/settlements/{id}`](/api-reference/settlements/get-a-settlement).

## Lifecycle

```
deposit.confirmed ─▶ uda.settlement.created ─▶ uda.settlement.completed
                             │                           ▲
                             └───────── (on failure) ────▶ uda.settlement.failed
```

Settlements go through a small state machine:

| `status`    | Meaning                                                                           |
| ----------- | --------------------------------------------------------------------------------- |
| `created`   | Deposit confirmed; Routing Engine has picked a route and begun execution.         |
| `completed` | Destination tx landed; funds are in the destination token.                        |
| `failed`    | All provider attempts exhausted — surfaced with an `error` string.                |

Intermediate states (quoting, signing, broadcasting) are not exposed
externally. From the integrator's point of view a settlement is
`created`, then either `completed` or `failed`.

:::info
Retire a UDA at any time with
[`DELETE /v1/uda/{id}`](/api-reference/uda/retire-a-uda-address). In-flight
settlements keep running to completion; only **new** deposits stop
triggering settlements.
:::

## Dashboard: settlement detail

In the Stridge **Dashboard**, each settlement has a **detail** view: **status** (for example completed), **UDA** id, **scenario** (such as same-chain swap), **provider** (for example LI.FI), and a **flow** from the **source deposit** (amount, asset, address, source tx, confirmed time) to the **destination** (settled amount, address, settled time), plus **fees**. It matches the data you will reconcile from [`GET /v1/settlements/{id}`](/api-reference/settlements/get-a-settlement) and from [`uda.settlement.*`](/webhooks) webhooks.

![Stridge Dashboard: completed settlement detail with overview, same-chain swap flow from USDC on BSC to USDT on BSC, transaction hashes, and total fee](/uda/settlement-details-dashboard.png)

## Scenarios

Every settlement is tagged with one of four `scenario` values. The
Routing Engine uses the scenario to pick providers and pricing.

| `scenario`                 | Source                      | Destination                 | Route                     |
| -------------------------- | --------------------------- | --------------------------- | ------------------------- |
| `same_chain_same_token`    | USDC on Arbitrum            | USDC on Arbitrum            | Direct transfer           |
| `same_chain_diff_token`    | USDT on Arbitrum            | USDC on Arbitrum            | DEX swap                  |
| `cross_chain_same_token`   | USDC on Base                | USDC on Arbitrum            | Bridge                    |
| `cross_chain_diff_token`   | BNB on BSC                  | USDC on Arbitrum            | Swap + bridge             |

Under the hood, same-chain same-token settles without a third-party
provider; the other three scenarios quote across LI.FI and Relay and
pick the best executable quote.

## The settlement record

```bash
GET /v1/settlements/{id}
```

```json
{
  "id": "bcc2b0c1-f75c-43b2-b1bc-c44437d775f4",
  "status": "completed",
  "uda_id": "31d32b68-e455-42b7-9d39-d2904adbe1b8",
  "created_at": "2026-04-24T06:56:06Z",
  "updated_at": "2026-04-24T06:56:17Z",
  "deposit": {
    "chain_id": 56,
    "network_name": "bsc",
    "address": "0x3b7e9d1a5c2f4b8e6d0c9f3a2b1e4d5c7a9b8e0f",
    "token_address": "",
    "token_symbol": "BNB",
    "amount": "5000000000000000",
    "tx_hash": "0xb7b493e68121ce6c7c39b6e0dce56fd45899277a8a85e5c524a718a00837355c",
    "confirmed_at": "2026-04-24T06:55:59Z"
  },
  "route": {
    "provider": "lifi",
    "type": "cross_chain_diff_token",
    "time_ms": 11000
  },
  "fees": {
    "fee_amount": "18485000000000"
  },
  "settlement": {
    "chain_id": 42161,
    "network_name": "arbitrum",
    "address": "0x8f4a2c9e1b3d7f5a6c8e0d9b2a4c6e8f0a2c4d6e",
    "token_address": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
    "token_symbol": "USDC",
    "amount": "3140",
    "tx_hash": "0x158ffc8b098ae63d697485a75666a337eaab18a2167ff417861f3209dffce29b",
    "settled_at": "2026-04-24T06:56:17Z"
  }
}
```

| Field             | Purpose                                                                         |
| ----------------- | ------------------------------------------------------------------------------- |
| `deposit.*`       | Everything about the source-chain transaction (chain, token, amount, tx hash)   |
| `settlement.*`    | Everything about the destination-chain delivery                                 |
| `route.provider`  | Which provider executed the route (`lifi`, `relay`, `stridge` for same-chain)   |
| `route.type`      | Settlement scenario                                                             |
| `route.time_ms`   | Wall-clock latency from `created` to `completed`                                |
| `fees.fee_amount` | Total fee in the destination token's smallest unit                              |
| `error`           | Present only when `status == "failed"`; human-readable failure reason           |

## Listing settlements

For reconciliation or a user-facing deposit history, list settlements
by UDA:

```bash
GET /v1/uda/{uda_id}/settlements?limit=50&offset=0
```

Results are paginated. Every entry has the same shape as
`GET /v1/settlements/{id}`, so you can hydrate a deposit ledger with
one round trip per page.

## Quoting before a deposit

Use
[`GET /v1/uda/quote`](/api-reference/uda/get-a-cross-chain-cross-token-quote)
to show users an expected fee and settlement time **before** they
broadcast. The response mirrors the shape of a completed settlement
and carries an `expires_at` — always re-quote if the user hesitates
long enough for the quote to expire.

```bash
GET /v1/uda/quote?
  from_chain_id=56
  &from_token=0x0000000000000000000000000000000000000000
  &to_chain_id=42161
  &to_token=0xaf88d065e77c8cc2239327c5edb3a432268e5831
  &amount=5000000000000000
  &from_address=0x3b7e9d1a5c2f4b8e6d0c9f3a2b1e4d5c7a9b8e0f
```

## Failure modes

* **`uda.settlement.failed`** — all provider attempts exhausted. The
  deposit remains untouched; manual resolution via the dashboard is
  possible. No automatic retry.
* **Provider timeout** — Stridge re-quotes and re-executes
  transparently. You will only see `created → completed`.
* **Dust deposits** — deposits below the routable minimum for a
  scenario complete normally but deliver a very small
  `destination_amount`. Consider enforcing a minimum in your UI.
* **Wrong token sent** — any token outside `accepted_tokens` is
  ignored and does not produce a settlement. Funds stay at the UDA
  address; the account owner can manually move them via the
  dashboard.

## Reconciliation tips

* Persist `(deposit.tx_hash, settlement.tx_hash, status)` on every
  `uda.settlement.*` webhook; replay from `GET /v1/uda/{id}/settlements`
  if your queue ever falls behind.
* Join `deposit.confirmed` and `uda.settlement.*` on the deposit id
  (`deposit.confirmed.id == settlement.deposit.tx_hash`'s settlement
  id — same UUID).
* For accounting, `fees.fee_amount` is always in the destination
  token's smallest unit.

## Next

* [UDA Webhook events](/uda/webhooks) — payload-by-payload reference.
* [API reference — `GET /v1/settlements/{id}`](/api-reference/settlements/get-a-settlement)
* [API reference — `GET /v1/uda/{id}/settlements`](/api-reference/uda/list-settlements-for-a-uda-address)
