Keep a balance and pay suppliers from it, with a second approver (UC-B-03)
Status: current as of 2026-11-18.
Who this is for
A business with a business account that keeps a USDC balance and pays its suppliers and contractors from it. Each payout waits until a second person approves it, and only then is checked against the balance and sent.
Before you start
- Account: a business account on the SET API.
- Keys and scopes: one key with
readandwriteasks for payouts; a second key withapprove(andread) approves them. A key cannot approve its own request, and SET's operator cannot approve. Send each key asAuthorization: Bearer set_test_…orset_live_…. - Your business's customer id (
cus_…), verified by SET's provider. - Switch: custodial wallets must be on for the deployment (otherwise
503 custodial_wallets_disabled). - Each supplier's details: business or person, name, country (ISO 3166-1 alpha-3), and a bank account in its own currency or a wallet address.
By API
- Open your wallet, held in custody by SET's provider, on Base, Ethereum or Solana.
POST /v1/wallets· Header:Idempotency-Key``json { "customer": "cus_…", "chain": "base" }`Next step uses:id,address,chain`.
- Fund it. Way
balancegives bank details whose payments arrive as USDC in your wallet on that chain (the wallet is reused if it exists). You can also send USDC to the wallet'saddress.POST /v1/payment_setups· Header:Idempotency-Key``json { "customer": "cus_…", "way": "balance", "currency": "usd", "chain": "base" }`Next step uses:payTo.depositInstructions(give these to whoever funds you),payTo.paysInto.wallet,wallet.id`.
- Add each supplier once. A wallet supplier:
POST /v1/recipients· Header:Idempotency-Key``json { "customer": "cus_…", "party": { "type": "business", "name": "…", "address": { "country": "…" } }, "destination": { "kind": "wallet", "chain": "base", "address": "0x…" } }`A bank supplier is"destination": { "kind": "bank", "currency": "eur", "iban": "…" }(orusdwithroutingNumberandaccountNumber,gbpwithsortCodeandaccountNumber).externalIdmakes a repeat return the same recipient. The supplier's details are sealed at rest. Next step uses:id(rcp_…`).
- Ask for the payout. With
approval: "required"the answer is202withstate: "pending_approval", and nothing is sent yet. A payout that waits takes noreference.POST /v1/payouts· Header:Idempotency-Key``json { "wallet": "wal_…", "recipient": "rcp_…", "amount": "250.00", "approval": "required" }`Next step uses:id(po_…),state`.
- Approve with the second key, or reject. On approval a payout due now is checked against the wallet's balance and sent.
POST /v1/payouts/{id}/approveorPOST /v1/payouts/{id}/reject· Header:Idempotency-Key· Key: the approver key ``json {}`Next step uses:state. The asking key can withdraw a waiting payout with [POST /v1/payouts/{id}/cancel`](/docs/set-api/cancel-payout).
- Many at once. Up to 100 items from one wallet; the wallet must hold the total, and a bad item is named by its index with nothing sent.
POST /v1/payout_batches· Header:Idempotency-Key``json { "wallet": "wal_…", "items": [ { "recipient": "rcp_…", "amount": "250.00" }, { "recipient": "rcp_…", "amount": "100.00" } ] }`Next step uses:id; read it with [GET /v1/payout_batches/{id}`](/docs/set-api/get-payout-batch).
After SET's fee, at least 1.00 must reach each recipient. SET may set limits per key and per recipient: read them with GET /v1/payout_limits.
In SET Console
- Opening the wallet: Console: not available. Use the API call.
- Funding it (way
balance): Console: not available. Use the API call. - and 4. In the demo console, open Merchant View › Workflows › Pay a supplier from your balance. Fill in Your account (customer), Pay from wallet, Supplier's name, Supplier's country (ISO, 3 letters), Supplier's network, Supplier's address, Amount (USDC) and Reference, then Review and Confirm. The receipt shows Recipient, Payout and its state. The signed-in console opens the same workflow.
- In SET Console, open Merchant View › Balance and payouts. Under Payouts waiting for approval, press Approve or Reject on the payout. Only an admin or finance member can decide, and the person who asked for a payout cannot approve it.
- Batches: Console: not available. Use the API call.
Signed in, the API Builder in the console's top bar sends any of the calls above as you, within your role.
Check it worked
GET /v1/payouts/{id}shows the payout'sstate;GET /v1/payouts?state=pending_approvallists what still waits.GET /v1/wallets/{id}showsbalancesread from the provider now.- In SET Console: Merchant View › Balance and payouts › Payouts and Recipients; Overview lists payouts waiting for approval or held.
- Webhooks:
payout.pending_approval,payout.approvedorpayout.rejected, thenpayout.<state>as it moves (for examplepayout.payment_processed);payout.pending_reviewif SET's checks hold it, thenpayout.releasedorpayout.refused;payout_batch.createdfor a batch. See Webhooks and events.
If it fails
503 custodial_wallets_disabled: custodial wallets are off for the deployment.400 chain_invalid,409 location_not_supported: the wallet's chain, or a business location where the provider offers no wallets.404 customer_unknown,409 verification_incomplete: not your business's id, or not verified yet.400 party_invalid,400 destination_invalid,400 address_invalid,400 rail_invalid,400 bank_details_refused,400 country_unsupported: the supplier's details.404 wallet_unknown,404 recipient_unknown,409 recipient_disabled.400 amount_invalid,400 amount_too_small: less than 1.00 would reach the recipient.400 approval_invalid,400 reference_not_supported: a waiting payout takes no reference.409 balance_too_low: the wallet does not hold the amount (or the batch total); an approved payout still waits.409 limit_exceeded: the payout passes a key or recipient limit SET set.403 scope_missing: the approving key lacksapprove.409 approver_is_requester: the same key asked and approved.403 operator_cannot_approve.409 payout_not_pending_approval,409 payout_moved,409 payout_not_waiting: the payout is not waiting any more.400 items_invalid,400 external_id_repeated,409 external_id_taken: batch items.502 payout_refused: the provider refused the payout; nothing left the wallet.
All codes: Errors.
Related
- Create a recipient
- Pay a recipient
- Approve a payout
- Payout controls
- Treasury mode
- Pay the same people on a schedule (UC-B-04)
- Pay a contractor or a refund to an email address (UC-B-07)
- All use cases
Changes
- 2026-11-18: SET Docs lead with the SET Crypto API Suite, then the SET API, then SET Direct Deposit.
- 2026-11-18: In Console: the signed-in console opens the workflows its contract test proves.
- 2026-11-16: Every use case step by step, by API and in the console.
- 2026-11-16: The modernized API Reference, the sandbox-key form, Direct Deposit without a revenue share.