Skip to main content

Prerequisites

1

Get API Keys

Sign up at dashboard.daya.co and generate sandbox API keys.You’ll receive:
  • Sandbox API Key: For testing
  • Production API Key: For live transactions (after KYB approval)
2

Verify Connectivity

curl https://api.sandbox.daya.co/health

Pick a flow to get started:

Accept Naira and settle as stablecoins

1. Fetch a BUY rate

Get a firm quote for converting NGN to USDC:
curl --request GET \
  --url 'https://api.sandbox.daya.co/v1/rates?from=NGN&to=USDC&side=BUY' \
  --header 'X-Api-Key: YOUR_SANDBOX_API_KEY'
{
  "rate_id": "rate_8x7k2mq9p",
  "from": "NGN",
  "to": "USDC",
  "side": "BUY",
  "rate": 1545.50,
  "expires_at": "2026-01-14T15:35:00Z"
}
Save the rate_id — it’s valid for ~30 minutes and you’ll need it to create the onramp.

2. Create an onramp

Provision a temporary virtual account that your customer will pay into:
curl --request POST \
  --url https://api.sandbox.daya.co/v1/onramps \
  --header 'X-Api-Key: YOUR_SANDBOX_API_KEY' \
  --header 'X-Idempotency-Key: onramp-001' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "TEMPORARY",
    "customer": { "email": "user@example.com" },
    "rate_id": "rate_8x7k2mq9p",
    "amount": 1500000,
    "settlement": {
      "mode": "ONCHAIN",
      "asset": "USDC",
      "chain": "ETHEREUM",
      "destination_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
    }
  }'
{
  "type": "TEMPORARY",
  "onramp_id": "onramp_3j5k8n2q",
  "customer_id": "650e8400-e29b-41d4-a716-446655440000",
  "rate_id": "rate_8x7k2mq9p",
  "rate_expires_at": "2026-01-14T15:35:00Z",
  "settlement": {
    "mode": "ONCHAIN",
    "asset": "USDC",
    "chain": "ETHEREUM",
    "destination_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
  },
  "virtual_account": {
    "account_number": "0690000031",
    "bank_name": "Wema Bank",
    "account_name": "Daya - user@example.com",
    "expires_at": "2026-01-14T15:25:12Z"
  }
}
Show your customer the virtual account details so they can make the transfer.
The virtual account expires in ~20 minutes. Deposits after expiry will be flagged.

3. Simulate a deposit (Sandbox)

In sandbox, trigger a test deposit using the sandbox deposit endpoint.

4. Track the deposit

Poll the deposits endpoint, or better yet, set up webhooks:
curl --request GET \
  --url 'https://api.sandbox.daya.co/v1/deposits?onramp_id=onramp_3j5k8n2q' \
  --header 'X-Api-Key: YOUR_SANDBOX_API_KEY'
{
  "deposits": [
    {
      "type": "NGN_DEPOSIT",
      "id": "dep_9x2k5m8p",
      "onramp_id": "onramp_3j5k8n2q",
      "amount": "15000.00",
      "currency": "NGN",
      "settled_amount": "9.70",
      "settled_currency": "USD",
      "status": "COMPLETED",
      "settlement_mode": "ONCHAIN",
      "chain": "ETHEREUM",
      "tx_hash": "0x8f3e2d1c..."
    }
  ]
}

Set Up Webhooks

Instead of polling, receive real-time updates for both flows:
  1. Configure your webhook URL in the dashboard
  2. Listen for lifecycle events:
{
  "event": "deposit.settled",
  "timestamp": "2026-01-14T15:08:15Z",
  "data": {
    "type": "NGN_DEPOSIT",
    "id": "dep_9x2k5m8p",
    "onramp_id": "onramp_3j5k8n2q",
    "status": "COMPLETED",
    "settlement_mode": "ONCHAIN",
    "chain": "ETHEREUM",
    "tx_hash": "0x8f3e2d1c..."
  }
}
See the full Webhooks Guide for all event types and payload shapes.

Common Issues

Rates are valid for ~30 minutes. Always fetch a fresh rate right before creating an onramp or offramp.
Deposits after the virtual account expires are flagged. Ensure customers complete transfers promptly.
Verify the address format matches the specified chain. See Supported Chains.
Always resolve bank accounts with POST /v1/banks/resolve before using them in offramp settlement. Invalid accounts are rejected at offramp creation.

Next Steps

Core Concepts

Understand onramps, offramps, deposits, and payouts

Authentication

Secure your API requests

Supported Chains

View all supported networks and tokens