> ## 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.

# Treasury settlement

> Settle your own revenue into a wallet or Vault you control, and govern how it is spent afterwards.

Treasury settlement is merchant settlement where the receiving account is your own: a business taking payment for its own goods, a platform accumulating its revenue share, or a company converting collected fiat into a stablecoin position. The calls are the same; what changes is who owns the destination and what governs it afterwards.

```bash theme={null}
curl -X PUT https://staging-api-v2.stableyard.fi/v2/accounts/acct_123/settlement-profile \
  -u "$APP_ID:$APP_SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "settlementDestinationId": "destination_123" }'
```

```mermaid theme={null}
flowchart LR
  A["Collected and verified"] --> B["Settled to your destination"]
  B --> C["Held, or spent under policy"]
```

## Choose a connected wallet or a Vault

A treasury destination is an ordinary settlement destination on an account you control.

| Destination | Use when |
| - | - |
| Connected wallet | You want the funds under your existing wallet operations. Works on every supported settlement chain |
| Vault | You want spending bound by rules approved once and enforced on chain. **Arbitrum only**, USDC and USDT |

A Vault is a smart account governed by an on-chain policy that states which tokens may move, to whom, and how much inside a fixed window. Spending that breaks the policy fails at the contract rather than at a backend check, so the control holds even if an API credential is compromised.

## Provision a Vault before you settle into it

<Steps>
  <Step title="Create it">
    `POST /v2/accounts/{accountId}/vault` returns as soon as an address is allocated: a `predictedSafeAddress` with `status: provisioning`, while deployment and policy installation finish in the background. If the response is lost, repeat the request with the same `Idempotency-Key` to get back the same Vault and address.
  </Step>

  <Step title="Authorise the initial policy">
    With `ownershipMode: "stableyard"`, an account email that is already verified authorises it automatically; otherwise, complete the returned authorisation action. A `business` account cannot take the email path, because a code sent to a shared inbox is not company authorisation, so use `ownershipMode: "external"` with its own signer.
  </Step>

  <Step title="Wait for it to go active">
    Continue onboarding meanwhile, but wait for `status: active` or the [`vault.policy_active`](/webhooks/event-catalog#vault-events) event.
  </Step>
</Steps>

<Warning>
  Do not offer deposits or use the Vault for payments, settlement or yield until it reports `status: active`.
</Warning>

<Card title="Next: Acquirer and PSP settlement" icon="building-columns" href="/settlement/acquirer-psp-settlement">
  Convert local-currency processing balances into stablecoin.
</Card>


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