Prerequisites
- Brale account (KYB started/completed)
- API client created for the right environment (testnet or mainnet)
curl(or HTTP client) and ability to Base64-encodeclient_id:client_secret
Quick path (copy/paste)
- Auth →
access_token - Get
account_id - Get custodial
address_id(internal) - POST transfer with
Idempotency-Key - Poll transfers for status
1. Sign up for Brale
Complete KYB to enable API access.2. Create API credentials (mainnet vs testnet)
Create an API client in the Dashboard. Keys are shown once—store them securely.Clients are environment-scoped; use testnet while integrating, mainnet when ready to move value.
3. Authenticate (client_credentials; short-lived tokens)
Tokens expire in ~60 minutes; refresh usingexpires_in before expiry.
access_token, token_type (Bearer), expires_in.
4. Get your account_id (KSUID)
Use the bearer token from Step 3.
5. Get your custodial address_id (internal)
Brale auto-creates internal wallets per account (EVM, Solana, Stellar). Use the bearer token and your ACCOUNT_ID.
address_id):
6. Create your first transfer (Idempotency-Key required)
Example: offchain wire → onchain stablecoin on Base. Always send a uniqueIdempotency-Key per logical transfer and reuse it on retries.
Headers: Authorization: Bearer, Content-Type: application/json, Idempotency-Key: $(uuidgen)
id, status (pending → processing → complete), wire_instructions for funding.
7. Poll and reconcile
- Poll
GET /accounts/{account_id}/transferswith pagination tokens; storeid, idempotency key, timestamps, status, references. - On 401, refresh the token and retry idempotently with the same
Idempotency-Key.
Common errors
403 network_not_supported: Using a testnet client/token on mainnet (or vice versa). Mint a token with a client for the target environment.404 compatible_address_not_found: Address doesn’t support thetransfer_type, typo inaddress_id, or wrongaccount_idin the path.400 missing Idempotency-Key: All POST creates must includeIdempotency-Key.
Next steps
- See Guides for on/off-ramps, swaps, payouts.
- For production hardening, review Troubleshooting and Coverage (transfer_types, value_types).