Virtual Accounts
Overview
Virtual Accounts are Nigerian bank accounts that automatically convert NGN deposits into cNGN tokens. StRails generates these accounts through licensed payment providers, enabling seamless fiat-to-crypto onramp for both fintechs and their users.Key Characteristics
How Virtual Accounts Work
Virtual Account Types
StRails uses three types of virtual accounts:Fintech Permanent Virtual Account
Your fintech receives a dedicated bank account during onboarding. This is your primary channel for receiving NGN deposits.Characteristics
- Never expires — always available for deposits
- No amount limit — accept any deposit amount
- Auto-mints cNGN — deposits convert to tokens in your default wallet (Strails-controlled HSM wallet or your whitelisted external wallet)
- Webhook notifications — receive
fintech.virtual_account.deposit.receivedevents
How to Retrieve
Deposit Flow
User Permanent Virtual Account
After successful BVN verification, each user automatically receives a permanent virtual account. This enables direct deposits without creating new accounts for each transaction.Characteristics
- Never expires — users can deposit anytime
- BVN-linked — deposits must come from the user’s own bank account
- Auto-mints cNGN — deposits convert to tokens in user’s Strails-controlled HSM wallet (Multi-Chain Wallet)
- Name validation — depositor name must match BVN records
How to Retrieve
User permanent accounts are returned in the/getuserdetails response:
Deposit Flow
BVN Validation Rules
Transaction Temporary Virtual Account
Created on-demand for one-time funding operations with specific amounts. Use these when you need precise control over the deposit amount and want optional auto-swap to USDC/USDT.Characteristics
- Expires after 30 minutes — one-time use only
- Amount-specific — user must pay the exact amount shown
- Includes fees — total amount includes StRails and fintech fees
- cNGN destination — minted to a generated Smart Wallet (can be controlled by your EOA if
owneris set) - Auto-swap support — can convert NGN → cNGN → USDC/USDT in one flow
- Sweep support — can route funds to user’s default wallet
How to Create
Use the/cngnonramp endpoint:
How to Retrieve Details
Use the/getvirtualaccount endpoint with the requestId:
Deposit Flow with Auto-Swap
Auto-Swap Configuration
Fee Structure
Virtual account deposits include fees:
Example Breakdown:
Webhook Events
Virtual account operations trigger these webhooks:
See Webhook Events for payload details.
Best Practices
For User Permanent Accounts
- Display account details clearly — show account number, bank name, and account name
- Remind users about BVN matching — deposits must come from their own bank account
- Handle refund webhooks — notify users when deposits are refunded due to name mismatch
For Transaction Temporary Accounts
- Show countdown timer — accounts expire after 30 minutes
- Display exact amount — users must pay the precise amount shown
- Provide requestId tracking — enable users to check status via
/getvirtualaccount
General
- Always handle webhooks — don’t rely solely on polling
- Validate deposits before crediting — wait for
funding.completedwebhook - Handle partial payments — temporary accounts may refund if amount doesn’t match
Related Documentation
- Virtual Accounts API — API endpoints reference
- Transactions API — Onramp and offramp operations
- User Management — User onboarding
- Smart Wallet — Where deposited funds are minted
- Webhook Events — Deposit notifications
- Fee Management — Configure your fees