POST
/
deposits
/
settle
curl -X POST https://api.stableyard.fi/v2/deposits/settle \
  -H "Authorization: Bearer sy_secret_*" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "acc_1234567890",
    "chainId": 8453
  }'
{
  "object": "session",
  "id": "ses_dep_xyz",
  "type": "deposit",
  "status": "pending",
  "amount": 1000000,
  "currency": "USDC",
  "chain": "base",
  "chainId": 8453,
  "depositAddress": "0x...",
  "requestId": "req_abc123"
}
Settle a deposit by auto-detecting which supported token has a balance on the deposit address. Supports EVM, Solana, and Movement chains. Auth: sy_secret_* You can settle either by providing an existing sessionId or by providing accountId + chainId to create a new deposit session inline.
sessionId
string
Existing session ID to settle. Must start with ses_. Mutually exclusive with accountId.
accountId
string
Account ID to settle for. Must start with acc_. Required if sessionId is not provided.
chainId
number
Network chain ID (e.g., 8453 for Base, 137 for Polygon, 103 for Solana). Required with accountId.
sourceWallet
string
Wallet address of the sender. Optional.

Auto-Detection

The endpoint queries balances for all supported tokens on the deposit address:
VMMethod
EVMbalanceOf on each ERC20 contract
Solana (SVM)getTokenAccountsByOwner with SPL Token Program ID
Movement (MoveVM)Aptos REST API 0x1::coin::CoinStore resources
The token with the highest non-zero balance is selected automatically.
curl -X POST https://api.stableyard.fi/v2/deposits/settle \
  -H "Authorization: Bearer sy_secret_*" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "acc_1234567890",
    "chainId": 8453
  }'
{
  "object": "session",
  "id": "ses_dep_xyz",
  "type": "deposit",
  "status": "pending",
  "amount": 1000000,
  "currency": "USDC",
  "chain": "base",
  "chainId": 8453,
  "depositAddress": "0x...",
  "requestId": "req_abc123"
}