How money moves
Each applicant has three balances, and funds flow through them in order:- Deposit wallet — where on-chain stablecoin deposits land (
GET …/funding/deposit-address). - Spend account — the applicant’s USD balance. Deposits are swapped in automatically when a funding call needs them.
- Card funds — the budget (debit programs) or per-card balance (prepaid programs) that transactions draw from. Top up with
POST /v1/cards/{id}/fund-from-wallet, or move USD explicitly withPOST /v1/accounts/{id}/transfers.
fund-from-wallet and transfers (direction "in") auto-convert deposited stablecoins to USD when the spend balance is short, and report what they converted in a swapped array.
Both modes use the same deposit address and the same
POST /v1/cards/{id}/fund-from-wallet call. BYO only adds the configured send-from wallet on the program and on deposit-address responses.
Upstream issuer / crypto-rail names never appear in responses. You only see Apocor fields.
Testing deposits with TEST keys
The TEST environment runs on issuer testnets. Deposits are only detected for:
Request the deposit address with
?chain=ETH¤cy=USDC, then send testnet
USDC (Ethereum Sepolia) from the Circle faucet. Credits appear in
funding/balances within a couple of minutes.
1. Set the program funding mode
Wallet service (default)
Bring-your-own (BYO) wallet
byo.address is required — the user’s external wallet they will send from.
GET /v1/programs/{id}/funding-config.
2. Get the deposit address
After the applicant has completed identity verification (status: APPROVED):
address— always the receive address (send to this).byo_wallet.address— only inbyo_walletmode; the configured send-from wallet.
3. Check balances
available_to_fund_usd to know when you can fund: it is the sum of the USD spend balance plus stablecoin deposits that can still be converted. It does not include amounts already moved into budgets — check those with GET /v1/accounts/{id}/budgets.
4. Fund the card
Idempotency-Key is required on fund, fund-from-wallet, and defund — retries with the same key replay the original response for 72 hours.
Budgets (debit programs)
Debit programs spend from budgets — named pots of USD that cards draw from. Every applicant gets a default budget automatically the first time funds move or a card is issued; you can create more to ring-fence spend (e.g. “Marketing” vs “Travel”).Top up a budget
direction: "in" funds the budget (auto-converting deposits if needed); direction: "out" withdraws back to the spend account. Pass budget_id to target a specific budget — omitted, the default budget is used. If deposits plus spend balance still don’t cover the amount, you get 402 INSUFFICIENT_FUNDS. Idempotency-Key is optional here but honored — send one to make retries safe.
Named budgets
budget_id to POST /v1/cards (defaults to the default budget). The card’s spending and its fund-from-wallet top-ups then use that budget.
Flow
Errors to expect
Related
- Programs & accounts — create the program first
- Cards — issue the prepaid card before funding
- API reference:
PUT /v1/programs/{id}/funding-config,GET …/funding/deposit-address,POST /v1/cards/{id}/fund-from-wallet