Skip to main content
Brale makes it easy for you to fund stablecoins in custodial wallets via offchain transfer types like ach_credit, or wire. There are three common ways of funding a custodial wallet at brale (Type=Internal) using offchain transfers:
  • Submit a Transfer request with a source value_type of wire
  • Submit a Transfer request with a source value_type of ach_debit
  • Create an Automation, which automatically mints stablecoins to a pre-configured destination wallet when funds are received via ach or wire.

Submitting a Transfer request with a source value_type of wire

Here is an example of onramping to your own stablecoin (SBC) via wire transfer by calling the Transfers endpoint with the source transfer_type of wire. POST https://api.brale.xyz/accounts/account_id/transfers
Request
Response
Initially, the status of the transfer will be pending. Once Brale receives the funds at the bank account provided in source_deposit_instructions the stablecoins will immediately be minted to the destination wallet.

Submitting a Transfer request with a source value_type of ach_debit

You can initiate ACH debits from Plaid-linked addresses. See Addresses for the full flow of linking Plaid accounts as addresses you can pull from. This guide is specifically designed for first party funding of stablecoin mints, into a Brale custodial wallet. POST https://api.brale.xyz/accounts/account_id/transfers
Request
Response

Fetching Transfers

Query a transfer that has been created. GET https://api.brale.xyz/accounts/account_id/transfers/:id
Response
source.payment_details appears when Brale has underlying payment metadata to expose for the source leg of a transfer. Wire transfers typically include the full set of fields (sender_name, sender_bank_name, imad, etc.). ACH transfers may include only a subset — fields may be null or omitted depending on available rail metadata, and may include trace_number as the ACH trace identifier. See Transfers — source.payment_details for the full field reference.

Fiat to Stablecoin Automation (Automatic Onramp)

Automations provide a unique account number and routing number that accepts wire transfers and ACH deposits, and automatically reconcials funds received and mints them to a bound wallet address.
Here is an example of onramping to your own stablecoin (SBC) via wire transfer by creating a fiat-to-stablecoin automation. POST https://api.brale.xyz/accounts/account_id/automations
Request
Automations are opened in a pending state and automatically transition into processing. When an automation becomes active, the source.funding_instructions object is populated with the virtual account’s bank details (routing number, account number, beneficiary name, etc.). These are the coordinates you share with your customer to fund the automation. GET https://api.brale.xyz/accounts/{account_id}/automations/{automation_id}
Response
When an automation is no longer needed, archive it by sending PATCH /accounts/{account_id}/automations/{automation_id} with { "status": "archived" }. This closes the virtual account and stops future deposits from being processed.

Test an Automation on testnet

Testnet Automations return placeholder banking coordinates that cannot receive real deposits. Use Simulate an Automation deposit to test the full onramp flow without moving real fiat. Prerequisites:
  • Testnet API credentials with the automations:write and network:testnet scopes. See Sandbox and Testnet.
  • A custodial wallet address on a testnet chain, such as base_sepolia or solana_devnet.
  • A webhook subscription that includes payment.completed.

1. Create an Automation

POST https://api.brale.xyz/accounts/{account_id}/automations
Request

2. Wait until the Automation is active

Poll GET /accounts/{account_id}/automations/{automation_id} until status is active. Brale returns 422 automation_not_active if you simulate a deposit before then.

3. Simulate a deposit

POST https://api.brale.xyz/accounts/{account_id}/automations/{automation_id}/simulations/deposits
transfer_type accepts ach or wire. Brale returns 202 Accepted with the resulting Transfer. Save its id. Use a new Idempotency-Key for each new simulated deposit. Retrying with the same key returns the original response without creating another deposit or mint. See Idempotency.

4. Receive webhooks

Brale emits the normal payment.completed webhook event for the simulated inbound payment. There is no simulation-specific webhook type, so your production handler works unchanged.

5. Fetch the Transfer

GET https://api.brale.xyz/accounts/{account_id}/transfers/{transfer_id}
Response

6. Verify the testnet mint

Confirm that automation_id matches your Automation and status is complete. Look up destination.transaction_id in a block explorer for the testnet chain to verify the mint.