SET API (Platforms) · Wallets
Set a treasury rule
PUT/v1/wallets/{id}/treasury
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
idstringrequired- The wallet's id.
Body
schedule"daily" | "weekly" | "monthly"- Daily, Mondays or the 1st, at 15:00 UTC.
thresholddecimal string- Sweep once the USDC balance reaches this (checked every 10 minutes). At least a schedule or a threshold.
keepdecimal 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_sweeporfailed:<code>.
Errors
400 schedule_invalid400 threshold_invalid400 allocations_invalid400 bank_account_invalid400 treasury_rule_invalid403 operator_cannot_withdraw404 wallet_unknown401 api_key_required401 api_key_invalid401 api_key_wrong_mode403 scope_missing429 rate_limited