Before you start, make sure you have:
- A Strails API key (contact support@strails.co to obtain one)
- An HTTPS webhook endpoint you control (use webhook.site or ngrok during development)
- A test BVN (11-digit Nigerian BVN) for user onboarding tests
1
Test Your API Connection
Verify your API key and confirm you can reach the staging environment by retrieving your fintech wallet.Expected response:If you see your Smart Wallet address, your API key is valid and you are connected to the test environment. Save
data.smartWallet.address - you will reference it throughout the integration. See Wallet Management for the full response schema.This endpoint returns your Smart Wallet and registered external wallets only. Your MPC Vault token wallets are returned by
GET /fx/settings once MPC registration is approved, and Managed Wallets are provisioned per user - retrieve them with POST /listuserwallets.2
Configure Your Webhook
Register your webhook URL so Strails can notify you when asynchronous operations complete. This is strongly recommended before you proceed - without it you will need to poll every status endpoint manually.Set up your handler to verify the HMAC signature on every incoming request:
Deduplicate on the
X-Webhook-ID header - a retried delivery repeats the same event. Full verification details and a Python version are on the HMAC Signatures page.3
Onboard Your First User
Register a user with BVN verification. Strails verifies the BVN against Nigerian records and creates a wallet for the user.Initiate onboarding:Response:Check onboarding status by posting the Successful verification response:Optional: route the user’s cNGN to an external addressOnboarding provisions a Strails-managed wallet that receives the user’s cNGN. If the user self-custodies, or you settle into your own treasury addresses, register an external destination with This redirects virtual account mints, onramps, and
bvn is the only field this endpoint accepts. The user’s identity is resolved from the BVN record and Strails issues the user identifier itself - you do not supply one.requestId you just received:Poll until
status is "completed" or "failed", or listen for the user.onboarded webhook event instead of polling. Once complete, use the returned userId for every subsequent call for this user.POST /setuserdefaultwallet:sweepToOfframp transfers. Swaps, offramp, and escrow still run against the Strails-managed wallet, so keep balance there for those flows. Call DELETE /removeuserdefaultwallet to revert.4
Fund a User Wallet
Initiate an onramp to generate a virtual bank account and fund the user’s wallet with cNGN (optionally auto-swapped to USDC or USDT).The Response (with fee breakdown):Retrieve the virtual account details to show your user:Response:Check the onramp status after payment:Completed response:Note that
/cngnonramp endpoint accepts three parameters that control what happens after NGN is deposited. Use the table below to choose the combination that matches your product:Initiate the onramp:
amount in the completed response is in the smallest unit (wei format): 5000000000 = 5,000 cNGN at 6 decimals. See Amount Formats for conversion details.5
Process a Withdrawal (Offramp)
Convert a user’s cNGN back to Naira and send it to their Nigerian bank account.Get the list of supported banks:Response:Initiate the offramp:Response:Check the offramp status:Listen for the
/getbankscode is a POST endpoint that takes no request body. Cache the result - the bank list changes rarely and the call counts against your rate limit.vault.return.payout.completed webhook event to confirm the bank transfer has settled - a user offramp emits vault.return.transfer.confirmed first (cNGN moved on-chain), then vault.return.payout.completed. Store the requestId from every offramp so you can query its status if the user disputes a withdrawal.6
Execute an FX Trade
Post an order to the cNGN/USDC/USDT orderbook, get a quote, and execute the trade.Create an orderbook entry:Response:Get an FX quote (The quote response includes a After execution, tokens from both sides are held in escrow and settlement completes automatically.
POST, with the cNGN amount as a human-readable decimal):quoteId and is valid for 5 minutes. Pass the quoteId directly to the trade endpoint.Execute the trade:Common Integration Patterns
Simple Wallet Funding Onboard a user -> generate a virtual account -> user pays NGN -> cNGN is disbursed to their wallet. Use this pattern when your users just need a cNGN balance. Wallet Funding with Auto-Swap Set"autoSwap": true and "assetSwap": "USDC" on the onramp request. After the NGN deposit is received, Strails mints cNGN and immediately swaps it to USDC via fx order in StRails orderbook - no extra API calls required. Use this pattern for products where users want USD-denominated stablecoins.
Fintech Liquidity Management
Post a limit order on the FX orderbook -> wait for a match -> confirm the trade quote -> execute. Escrow settles the counterparty automatically. Use this pattern to rebalance your fintech’s cNGN and USDC/USDT pools.
Testing Tips
- Use Postman: Import the Strails Postman collection, set
BASE_URLtohttps://api.strails.io/v1andAPI_KEYto your key, then run the collection to exercise all endpoints. - Start small: Test onramp and offramp flows with amounts between ₦100 and ₦500 before increasing transaction sizes.
- Inspect webhooks locally: Use webhook.site for a hosted listener, or ngrok to tunnel to your local machine during development.