Skip to main content
Before a cardholder can spend, you need to add collateral to their account. How you do this depends on your management model.
Rain-managed programs use per-user smart contracts. You deposit tokens on-chain and the credit limit updates automatically. Partner-managed programs use a single collateral account funded through the Dashboard.

Fund a user’s account (Rain-managed)

1

Get the user's contract

Retrieve the smart contract address where you’ll deposit tokens:
Each contract includes a depositAddress, chainId, and a list of accepted tokens with their on-chain addresses. See Supported Chains & Tokens for the full list of networks.
2

Deposit tokens on-chain

Send supported tokens (e.g., USDC) to the depositAddress on the specified chain. This is a standard on-chain transfer. Use your preferred web3 library (ethers.js, viem, web3.py, etc.).Once the deposit is confirmed on-chain, Rain automatically updates the user’s credit limit.
3

Check the credit limit

Verify the balance updated after your deposit:

Process a withdrawal (Rain-managed)

To withdraw collateral, retrieve a withdrawal signature and submit it on-chain:
See Rain-Managed Programs for the full on-chain withdrawal flow with ethers.js.

Check your balance (Partner-managed)

Partner-managed programs use a single collateral account. Fund it through the Dashboard, then check balances via the API:
See Partner-Managed Programs for details on adding collateral through the Dashboard.

What’s next

Rain-Managed Programs

Full guide to on-chain collateral management.

Partner-Managed Programs

Dashboard-based funding and balance management.

Mobile Withdrawals

Execute withdrawals from Android or iOS with the Client SDK.