PAYMENT_PROVIDER=crypto # or "airtm"Deposits Guide
How users add funds to their OFFER-HUB balance — crypto deposits and AirTM top-ups.
Before users can create orders or fund escrow, they need balance in their account. OFFER-HUB supports two deposit methods depending on your payment provider configuration.
Payment Providers
| Provider | Method | Speed | Currencies |
|---|---|---|---|
crypto (default) | Stellar USDC transfer | ~5 seconds | USDC |
airtm | AirTM top-up | 1-24 hours | USD, local currencies |
Set your provider in environment:
Crypto Deposits (Default)
When PAYMENT_PROVIDER=crypto, users deposit by sending USDC to their Stellar address.
Step 1: Get Deposit Address
Response:
Step 2: User Sends USDC
The user sends USDC from any Stellar wallet:
- Lobstr — Mobile wallet
- StellarTerm — Web wallet
- Exchange — Coinbase, Binance, etc. (if they support Stellar USDC)
Step 3: Automatic Detection
OFFER-HUB monitors the blockchain for incoming transactions. When USDC arrives:
- Transaction detected — Horizon streaming catches the payment
- Balance updated — Off-chain balance incremented
- Event emitted —
balance.creditedsent via SSE/webhook - User notified — UI can update in real-time
Deposits are typically credited within 5-10 seconds of the Stellar transaction being confirmed.
Deposit Flow Diagram
AirTM Deposits
When PAYMENT_PROVIDER=airtm, users fund their accounts through AirTM's payment network.
Step 1: Create Top-up Request
Response:
Step 2: User Completes Payment
Redirect the user to the paymentUrl where they:
- Log into AirTM (or create an account)
- Choose payment method (bank, mobile money, crypto, etc.)
- Complete the payment
Step 3: Webhook Confirmation
AirTM sends a webhook when payment completes:
OFFER-HUB:
- Verifies webhook signature
- Credits user balance
- Emits
balance.creditedevent
AirTM deposits can take 1-24 hours depending on the user's payment method. Set user expectations accordingly.
Using the SDK
Crypto Deposits
AirTM Top-ups
Listening for Deposits
SSE Events
Connect to the event stream:
Webhooks
Register for balance events:
Webhook payload:
Checking Balance
After a deposit, verify the updated balance:
Response:
Minimum Deposits
| Provider | Minimum | Reason |
|---|---|---|
| Crypto | 0.01 USDC | Stellar transaction cost |
| AirTM | $5.00 USD | AirTM processing minimum |
There's no maximum deposit limit for crypto. AirTM may have limits based on user verification level.
Supported Assets
Crypto Mode
Currently supported:
| Asset | Network | Issuer |
|---|---|---|
| USDC | Stellar Testnet | GBBD47IF6... |
| USDC | Stellar Mainnet | GA5ZSEJYB... |
Future support planned for:
- EURC (Euro stablecoin)
- Native XLM
AirTM Mode
AirTM supports 200+ funding methods including:
- Bank transfers
- Mobile money (M-Pesa, etc.)
- Cards (Visa, Mastercard)
- Local payment methods
- Crypto (converted to USD)
Error Handling
Crypto Deposit Errors
| Error | Cause | Solution |
|---|---|---|
| Deposit not detected | Wrong asset or network | Verify USDC issuer matches |
| Trustline missing | Account not set up | Contact support |
| Memo required | Exchange withdrawal | Some exchanges require memo |
AirTM Errors
| Error | Cause | Solution |
|---|---|---|
TOPUP_EXPIRED | Payment URL expired | Create new top-up |
PAYMENT_FAILED | User's payment method failed | Try different method |
AMOUNT_BELOW_MINIMUM | Amount too small | Increase to $5+ |
Best Practices
For Developers
- Always display network — Make sure users know testnet vs mainnet
- Show asset details — Display USDC issuer for verification
- Real-time updates — Use SSE for instant balance updates
- Clear instructions — Guide users through deposit flow
For Users
- Double-check address — Copy-paste, don't type
- Verify network — Testnet deposits won't show on mainnet
- Start small — Test with small amount first
- Keep transaction ID — For support if needed
Testnet Funding
For development, get testnet USDC:
- Get testnet XLM — Use Stellar Friendbot
- Get testnet USDC — Use Circle's testnet faucet or contact OFFER-HUB
Next Steps
- Wallets Guide — Understanding invisible wallets
- Withdrawals Guide — Moving funds off-platform
- Orders Guide — Creating your first order