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

# Settlement fees

> Read the frozen fee snapshot and the net a destination receives, on payments and on deposits.

Fees are priced and frozen onto a payment when it is created, then taken from the verified destination amount in one deduction at settlement. Settlement deducts and never adds; a send is priced the other way, with the components added on top of the delivered amount.

## The deduction runs in a fixed order

<Steps>
  <Step title="The destination amount is verified">
    Nothing is calculated from a quote, from what the payer said they sent, or from a provider reporting success.
  </Step>

  <Step title="Both components are calculated from that verified amount">
    The platform fee and your partner fee, against the same figure.
  </Step>

  <Step title="The recipient is credited the net, and the combined fee goes to the collector">
    One deduction, two components, moved together.
  </Step>

  <Step title="Network costs stay outside">
    Gas, unavoidable source-network costs, a payout rail's own fee and any cost quoted on a selected funding method are not part of the basis-point calculation and never appear inside it.
  </Step>
</Steps>

That order makes the arithmetic reproducible: a payment's gross, its two fee amounts and its net reconcile without you recomputing anything. It is the same on every supported settlement chain.

## `merchantNetAmountAtomic` is what the destination receives

```json theme={null}
"fees": {
  "version": 1,
  "pricingStatus": "quoted",
  "platformFeeBps": 50,
  "partnerFeeBps": 0,
  "platformFeeAmountAtomic": "125000",
  "partnerFeeAmountAtomic": "0",
  "merchantNetAmountAtomic": "24875000"
}
```

| `pricingStatus` | What it means |
| - | - |
| `quote_pending` | The rates are frozen; the three atomic amounts are `null` |
| `quoted` | The amounts are immutable and final. A genuine zero is the string `"0"`, never `null` |

Amounts are atomic integer strings. Do not rebuild them in floating point, and do not assume six decimals for every asset.

<Warning>
  Reconcile against the frozen snapshot on the payment, not against your current rates. Your rates can change; an in-flight payment's cannot, and a rate change must never rewrite a settled receipt.
</Warning>

## Deposits carry their own fee basis

Value arriving at a reusable deposit address is priced on the deposit, and `basis` says whether the number in front of you is final.

```json theme={null}
{
  "fees": {
    "partnerAmountAtomic": "1000000",
    "platformAmountAtomic": "1000000",
    "networkAmountAtomic": "1000000",
    "setupAmountAtomic": "1000000",
    "basis": "source_amount",
    "actualReceivedAmountAtomic": null
  },
  "netSettlementAmount": null
}
```

| `basis` | What it means |
| - | - |
| `source_amount` | Returned before final settlement evidence exists. The destination amount can still move, and nothing on the deposit is final |
| `verified_destination_receipt` | The received destination amount was independently verified. `actualReceivedAmountAtomic` is populated and `netSettlementAmount` is what settles |

Never present an estimated net as guaranteed. `networkAmountAtomic` is reported beside the two commercial components rather than folded into them, so a deposit's network cost stays visible and separable.

## The fee is its own transaction row

Fee movement is a separate operation, not a subtraction hidden inside the settlement transfer, so a customer statement can itemise it.

```bash theme={null}
curl "https://staging-api-v2.stableyard.fi/v2/accounts/acct_123/transactions?limit=50" \
  -u "$APP_ID:$APP_SECRET"
```

| Field | Settlement leg | Fee leg |
| - | - | - |
| `sourceType` | `payment` | `fee` |
| `financialLegKind` | `settlement` | `fee_payout` |

Because it is separate, it can fail on its own. The payment then keeps its truthful financial status and reports `fee_payout_failed` or `fee_payout_requires_intervention` on `operationalReasonCode`.

<Card title="Next: Settlement transactions" icon="receipt" href="/settlement/transactions">
  Find the settlement row and tie it back to its payment.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.