Skip to content
SETSimple Easy Transactions
SET DocsSET Crypto API Suite and SET API referenceCurrent as of 2026-11-18
Browse: SET Crypto API Suite

Self-custody wallets: API guide

Status: current as of 2026-11-18.

How to open a self-custody wallet, have its owners accept it, collect bank payments into it, pay from it and sign each payment, including with your own server's key. SET's software does not sign for you: SET checks and proposes each payment, and the owners sign it.

Switched on per deployment; ask SET. While self-custody wallets are off for your account, each call below answers 503 self_custody_disabled. GET /v1/capabilities answers selfCustodyWallets.

1. Choose the owners

GET /v1/wallets/owner_candidates lists your account's members with the admin or finance role, who may own a wallet: each member's id (pmb_…) and role only, and which of them is you (you, in the SET Console).

2. Open the wallet

POST /v1/wallets with custody: "self":

{
  "customer": "cus_…",
  "chain": "base",
  "custody": "self",
  "owners": { "members": ["pmb_…", "pmb_…"], "publicKeys": ["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE…"], "threshold": 2 },
  "limits": { "assets": ["usdc"], "perPayment": "5000.00", "perDay": "20000.00" }
}
FieldWhat
chainbase, ethereum, arbitrum, polygon or solana
owners.members1 to 10 team member ids. At least one person always owns the wallet
owners.publicKeysOptional: up to 3 of your servers' P-256 public keys, base64 SPKI or PEM. Never a private key
owners.thresholdOptional: how many owners must sign each payment
limits.assetsusdc or eurc; default usdc
limits.perPayment, limits.perDayDecimal strings, or null for none. perDay counts the last 24 hours

It answers 201 with state pending_acceptance and no address. GET /v1/wallets?custody=self lists your self-custody wallets; GET /v1/wallets/swl_… reads one: its owners, who has accepted, its limits and what SET read back, with balances read on chain now.

3. Each owner accepts, in the console

Each person named accepts in their own signed-in SET Console (Crypto › Wallets, Accept). The call behind the button is POST /v1/wallets/swl_…/acceptance, which needs the approve scope. An API key cannot accept for a person (403 acceptance_needs_a_person). After the last acceptance SET creates the wallet and reads it back: state active with an address, or frozen with none if the read-back differs.

4. Collect into it

Bank payments settle into an active self-custody wallet:

  • POST /v1/virtual_accounts with settleTo: { "wallet": "swl_…" }
  • POST /v1/payment_setups, way balance, with wallet: "swl_…"

A chain the provider does not deliver bank payments to is refused.

5. Pay from it

One payment to an address. POST /v1/wallets/swl_…/payments with { asset, amount, destination, externalId? }. destination is an address on the wallet's own chain. SET checks the wallet's limits (422 policy_refused), your restrictions and screening, then proposes the payment and answers 201 with state awaiting_signature and intent.signingPayload: the bytes each owner signs. A repeated externalId answers the payment already made.

A payout to a recipient. POST /v1/payouts with { wallet: "swl_…", recipient, amount, externalId? }, or POST /v1/payout_batches with { wallet: "swl_…", items } (1 to 100). Each payout is one payment of its own to sign. A batch answers each item's payment or error.

  • A wallet recipient is paid at its own address on the wallet's network; a recipient on another network answers 409 recipient_network_mismatch.
  • A bank recipient is paid through its own active Cash-Out Address on the wallet's chain (a multichain address counts on Base and Ethereum), opened for the wallet's own customer, in a stablecoin the owners allowed. Without one, the payout answers 409 cash_out_address_missing: open one with POST /v1/cash_out_addresses. The Travel Rule data for the bank leg (originator: the customer's own self-custodied wallet; beneficiary: the recipient) is checked and sealed before anything is proposed, and submitted once for the drain when the payment arrives at the Cash-Out Address from the wallet's address for the exact amount. The answer adds cashOutAddress and travelRule: { held, submittedFor } (submittedFor is the drain, once submitted).
  • Any other recipient answers 409 recipient_not_payable_from_self_wallet.

Every destination, the recipient's wallet or its Cash-Out Address, is screened against OFAC's list before the payment is proposed; a destination screening refuses answers 403 destination_refused (in a batch, that item's error), and nothing is proposed for it. The wallet's limits and your restrictions apply as for a payment.

GET /v1/wallets/swl_…/payments lists the wallet's payments and GET /v1/wallets/swl_…/payments/swp_… reads one again from the provider. While a payment waits for signatures, each read carries fresh bytes to sign.

6. Sign

Owners who are people sign in the SET Console: Crypto › Wallets, Review and sign. The page shows what the signed bytes say first and refuses to sign anything it cannot describe.

An owner that is your server signs through the API:

  1. Generate a P-256 key pair on your own server or in your KMS. Give SET only the public key, in owners.publicKeys, when you open the wallet.
  2. For each payment, read intent.signingPayload.bytesBase64 and decode it from base64.
  3. Sign those exact bytes with ECDSA P-256 (SHA-256).
  4. Post the base64 signature, with intent.signingPayload.timestamp, to POST /v1/wallets/swl_…/payments/swp_…/signatures within 5 minutes: { "signature": "…", "timestamp": 1795000000000 }. This needs a key with the approve scope.

SET passes the signature to the wallet provider unchanged. The provider checks it against your public key, checks the signer is an owner, and counts it toward the threshold.

A sketch in Node.js:

import { createPrivateKey, sign } from "node:crypto";

// Your P-256 private key, from your own store. It never leaves your server.
const key = createPrivateKey(process.env.WALLET_OWNER_KEY_PEM);

export function signPayment(signingPayload) {
  const bytes = Buffer.from(signingPayload.bytesBase64, "base64");
  const signature = sign("sha256", bytes, { key, dsaEncoding: "der" }).toString("base64");
  return { signature, timestamp: signingPayload.timestamp };
}

The signature is DER-encoded here, the form the wallet provider's own signing examples produce. SET's reference names the algorithm (ECDSA P-256 with SHA-256) but not the encoding, so confirm it on staging before you rely on it.

Recovery bundle

GET /v1/wallets/swl_…/recovery_bundle (read scope) answers object: "wallet_recovery_bundle": the address (only once active), chain, caip2, chainId, provider (appId, walletId, ownerQuorumId, policyId), owners (threshold, members with acceptedAt, publicKeys), limits and recovery.

  • model.type is provider_server_wallet and smartContract is false: this is not a Safe, so no Safe or EIP-712 payload is given.
  • recovery.moveFunds: a transfer request to the wallet provider signed by at least threshold owners; through SET, POST /v1/wallets/{id}/payments and the owners' signatures.
  • recovery.exportPrivateKey: the provider's export of the private key, authorized by the owner quorum and restricted by the provider to the wallet's owners. availableThroughSet is false.
  • recovery.dependsOnSet: every request to the provider for this wallet also needs the provider app's id and secret, which SET holds. SET can relay a request the owners signed but cannot authorize a movement or an export, and offers no export relay in this release.

The bundle holds no secret. 404 wallet_unknown for a wallet that is not one of yours; 503 self_custody_disabled while self-custody wallets are off.

Payment states

StateMeaning
awaiting_signatureProposed; waiting for enough owners to sign
processingThe wallet provider is carrying it out
executedThe wallet provider says it was carried out
confirmedSET read the USDC transfer on chain. Today on Base only; other networks stay executed until SET reads their chain
failed, rejected, expired, dismissedEnded without paying, as the wallet provider reports it. None of these counts toward perDay

Balances

A wallet's balances cover USDC on Base, Ethereum, Arbitrum, Polygon and Solana, read on chain as SET Payouts reads them. EURC answers balance: null with a note.

Errors

Every error is JSON: { "error": "<code>", "message": "<text>" }. Read error; the message is for people and can change.

StatusCodeWhen
503self_custody_disabledSelf-custody wallets are not switched on for this deployment
409self_custody_winding_downOpening a wallet while they are winding down; existing wallets keep every way out
403scope_missingAccepting or signing without the approve scope
403acceptance_needs_a_personAn API key tried to accept ownership
403not_an_ownerThe signed-in member is not named as an owner
404customer_unknown, wallet_unknown, payment_unknown, recipient_unknownNo such object on your account
409customer_closedThe customer is closed
400owners_invalidowners.members is not 1 to 10 team member ids
400public_keys_invalidowners.publicKeys is not up to 3 distinct P-256 public keys
400limits_invalidperPayment or perDay is not a decimal string above 0, or null
409wallet_not_activePaying from a wallet that is not active
400asset_invalidAn asset the owners did not allow
400amount_invalidNot a decimal string above 0
400destination_invalidNot an address on the wallet's chain, or the wallet itself
422policy_refusedOver perPayment, or over perDay in the last 24 hours
403destination_refusedThe destination (a wallet, or a bank recipient's Cash-Out Address) was refused by sanctions screening
400external_id_invalidexternalId is not 1 to 64 letters, digits, dots, colons, underscores or hyphens
400items_invalidA batch of no items or more than 100
400recipient_invalidNot a recipient id (rcp_…)
409recipient_disabledThe recipient is disabled
409recipient_not_payable_from_self_walletNeither a wallet recipient nor a bank recipient
409cash_out_address_missingA bank recipient with no active Cash-Out Address on the wallet's chain for this wallet's customer, in a stablecoin the owners allowed
409recipient_network_mismatchThe recipient is paid on another network
409payment_not_waitingSigning a payment that no longer waits for signatures
400signature_invalid, timestamp_invalidNot a base64 signature, or not the payload's own timestamp in milliseconds
410signature_expiredThe bytes were signed more than 5 minutes ago; read the payment again and sign the fresh bytes
503provider_unavailableThe wallet provider could not be reached; nothing was created
502provider_refusedThe wallet provider refused the request; nothing was created

Sources

Written on 2026-11-18 from the wallet's self-custody wallet documentation, its OpenAPI entries and its routes (spec 21), and checked against the wallet's OpenAPI document at release ec5f2ac6 (2026-11-18). The recovery bundle and bank payouts through a Cash-Out Address were added from the wallet's routes and OpenAPI document at release 22a44bcb (2026-11-18). Every call on this page is in the SET Crypto API Suite's OpenAPI document, and the /v1 calls are in the SET API's.

Changes

  • 2026-11-18: OpenAPI, Postman and docs re-synced from the wallet at; Crypto Suite /v1 calls follow the wallet's marks.
  • 2026-11-18: Docs: three OpenAPI documents (SET API, SET Direct Deposit, SET Crypto API Suite).