Deposits & Withdrawals
Users fund card spending by depositing funds. This guide covers the deposit and withdrawal flows.How It Works
- Each user gets a unique deposit address per chain
- Deposits are automatically detected and credited
- Credit limit equals deposited value (100% advance rate)
- Spending reduces available spending power
- Users can withdraw unused funds
Supported Chains & Tokens
| Chain | USDC | USDT | Chain ID |
|---|---|---|---|
| Polygon | Yes | Yes | 137 |
| Base | Yes | Yes | 8453 |
| Optimism | Yes | Yes | 10 |
| Arbitrum | Yes | Yes | 42161 |
| Avalanche | Yes | Yes | 43114 |
Deposits
Step 1: Get Deposit Address
Step 2: Send Tokens
Transfer USDC or USDT to thedepositAddress on your preferred chain.
Step 3: Verify Balance
Understanding Balance Fields
| Field | Description |
|---|---|
creditLimit | Total deposited value in cents |
pendingCharges | Authorized but not settled |
postedCharges | Settled transactions |
balanceDue | Amount to be repaid |
spendingPower | Available for new transactions |
Withdrawals
Users can withdraw unused funds at any time.Check Available Balance
Before withdrawing, ensurespendingPower covers the amount:
Create Withdrawal
| Field | Type | Required | Description |
|---|---|---|---|
chainId | number | Yes | Chain to withdraw on |
tokenAddress | string | Yes | Token contract address |
amount | number | Yes | Amount in cents |
recipientAddress | string | No | Destination wallet address |
Withdrawal Status
| Status | Description |
|---|---|
pending | Awaiting processing |
submitted | Transaction submitted to network |
confirmed | Transaction confirmed on-chain |
failed | Transaction failed |
List Withdrawals
Webhooks
Subscribe to deposit and withdrawal events:| Event | Description |
|---|---|
deposit.received | Funds received and credited |
deposit.address_ready | Deposit address available |
withdrawal.submitted | Withdrawal transaction submitted |
withdrawal.confirmed | Withdrawal confirmed on-chain |
withdrawal.failed | Withdrawal failed |
user.balance.updated | Credit limit or spending power changed |
Sandbox Testing
In sandbox, use test tokens (rUSD) instead of real USDC:| Chain | rUSD Contract |
|---|---|
| Base Sepolia | 0x10b5Be494C2962A7B318aFB63f0Ee30b959D000b |
| Optimism Sepolia | 0x915F8c4a8b9fE793b3185c4186F716d7e5D891b6 |
| Arbitrum Sepolia | 0xd116d4752fc50D660FB5b5c801448Ae84B4937bc |
- Go to the block explorer for the rUSD contract
- Connect your wallet
- Call
mint(amount)(max 100 tokens per transaction) - Transfer to the user’s
depositAddress
rUSD has 6 decimals like USDC. To mint 100 rUSD, call
mint(100000000).Best Practices
Monitor balance webhooks
Monitor balance webhooks
Use
user.balance.updated webhooks to track credit changes in real-time.Check spending power before purchases
Check spending power before purchases
Always verify
spendingPower before issuing cards or making large purchases.Handle withdrawal failures
Handle withdrawal failures
Withdrawal transactions can fail due to network issues. Implement retry logic.