SETSimple Easy Transactions
SET DocsAPI reference and complianceUpdated 2026-11-09
Browse: SET Merchant API

SET Merchant API · Wallets

Set a treasury rule

PUT/v1/wallets/{id}/treasury

Key scope: write

Treasury mode: keep a USDC balance in the wallet and sweep it to the customer's own US bank accounts on a schedule, at a threshold, or both, split across up to five accounts. Each part is an ordinary withdrawal (own bank, ACH, SET's fee per part) with its own wallet_withdrawal.* events.

Path parameters

id stringrequired
The wallet's id.

Body

schedule "daily" | "weekly" | "monthly"
Daily, Mondays or the 1st, at 15:00 UTC.
threshold decimal string
Sweep once the USDC balance reaches this (checked every 10 minutes). At least a schedule or a threshold.
keep decimal string
Stays in the wallet after a sweep; the threshold must exceed it.
allocations [{ bankAccount, share }]required
1–5 of the same customer's own US bank accounts; shares in percent (two decimals) summing to 100.

Notes

  • The rule is the customer's own standing instruction, set with its own key. SET's operator cannot set, change or run it.
  • A sweep waits while any withdrawal from the wallet is in flight. Each part must meet the cash-out minimum with at least 1.00 reaching the bank after SET's fee, or nothing is swept. The cent left by splitting goes to the first account.
  • lastResult: swept, partial, below_minimum, in_flight, initiation_required, nothing_to_sweep or failed:<code>.

Errors

  • 400 schedule_invalid
  • 400 threshold_invalid
  • 400 allocations_invalid
  • 400 bank_account_invalid
  • 400 treasury_rule_invalid
  • 403 operator_cannot_withdraw
  • 404 wallet_unknown
  • 401 api_key_required
  • 401 api_key_invalid
  • 401 api_key_wrong_mode
  • 403 scope_missing
  • 429 rate_limited

All codes: Errors.