Skip to main content

Core Concepts

Understanding these concepts will help you integrate the Strails API correctly and avoid common pitfalls.

Asynchronous Processing

All blockchain operations return a requestId immediately and process in the background:
This keeps API responses fast (~200ms) while complex operations (wallet creation, token minting, swaps) complete reliably. Track the final status via webhooks or by polling the relevant status endpoint.

Virtual Accounts

Every user gets a dedicated Nigerian bank account that automatically converts deposits to cNGN:
  • Bank accounts generated via licensed payment integration
  • Auto-swap option: NGN → cNGN → USDC/USDT in a single flow
  • Depositor details captured for compliance
See the Virtual Accounts Guide for account types and deposit flows.

Wallet System

Fintechs operate with three wallet types: Tokens live in smart wallets and managed wallets.

FX Orderbook

Fintechs can trade cNGN ↔ USDC/USDT with other fintechs:
  • Limit orders: Set your price and wait for counterparties
  • Market orders: Execute instantly at best available price
  • Escrow-based settlement with a 5-minute price lock
  • Self-trading prevention built-in
  • Auto-approval of trades that meet your set threshold via dedicated virtual machines
Learn more in Orderbook Management and Trading Management.

Webhooks

All critical operations send real-time notifications to your configured webhook URL:
  • Wallet creation, deposits, trades, withdrawals
  • HMAC signature verification (optional but recommended)
  • Retry logic with exponential backoff
See Webhook Events for payload details.

Amount Formats

The API uses different amount formats depending on the operation type.

Fiat Operations (Onramp / Offramp / Virtual Accounts)

Amounts are in Naira (main currency unit):
Examples:
  • Create virtual account: "amount": 5000 → User pays ₦5,000
  • Onramp: "amount": 200 → Costs ₦203 (with fees)
  • Offramp: "amount": 3000 → User receives ₦3,000 in bank

Token Operations (Blockchain Transfers / Balances)

Amounts use the smallest unit (wei format) with token decimals: JavaScript conversion (token operations only):
Key takeaway: Fiat endpoints use regular Naira amounts. Only blockchain/token operations use wei format with decimals.

Response Format

All API responses follow a consistent structure. Success (HTTP 200):
Error (HTTP 4xx/5xx):

Response Codes

For detailed request/response payloads per endpoint, see Request & Response Formats.