Skip to main content

Get Started

This guide walks you through creating your first onramp in Sandbox, from fetching rates to receiving settlement webhooks.
1

Get API Keys

Sign up at dashboard.daya.io and generate Sandbox API keys
2

Fetch Current Rates

Get a firm FX quote with GET /v1/rates
3

Create an Onramp

Provision an ephemeral VA with POST /v1/onramp
4

Simulate a Deposit

(Sandbox only) Trigger a test NGN deposit
5

Receive Webhook

Get notified when the deposit settles

Prerequisites

1

Get API Keys

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

Install HTTP Client

You can use any HTTP client. Examples below use cURL.
# Verify you can reach the API
curl https://sandbox-api.daya.xyz/health

Step 1: Get Exchange Rate

Request a firm FX quote:
curl --request GET \
  --url 'https://sandbox-api.daya.xyz/v1/rates?from=NGN&to=USDC' \
  --header 'Authorization: Bearer YOUR_SANDBOX_API_KEY'
Response:
{
  "rate_id": "rate_8x7k2mq9p",
  "from": "NGN",
  "to": "USDC",
  "rate": 1545.50,
  "inverse_rate": 0.000647,
  "expires_at": "2026-01-14T15:45:00Z",
  "created_at": "2026-01-14T15:05:00Z",
  "min_deposit_ngn": 1500
}
The rate_id is valid for ~30 minutes. Save it for the next step.

Step 2: Create Onramp

Create an ephemeral onramp with auto-withdraw:
curl --request POST \
  --url https://sandbox-api.daya.xyz/v1/onramp \
  --header 'Authorization: Bearer YOUR_SANDBOX_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "EPHEMERAL",
    "user": {
      "email": "[email protected]"
    },
    "rate_id": "rate_8x7k2mq9p",
    "settlement": {
      "mode": "AUTO_WITHDRAW",
      "asset": "USDC",
      "chain": "BASE",
      "destination_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
    }
  }'
Response:
{
  "onramp_id": "onramp_3j5k8n2q",
  "type": "EPHEMERAL",
  "status": "ACTIVE",
  "rate_id": "rate_8x7k2mq9p",
  "payment_reference": "DAYA-3J5K8N2Q",
  "virtual_account": {
    "account_number": "9876543210",
    "account_name": "Daya - [email protected]",
    "bank_name": "Wema Bank",
    "bank_code": "035"
  },
  "expires_at": "2026-01-14T15:30:00Z",
  "settlement": {
    "mode": "AUTO_WITHDRAW",
    "asset": "USDC",
    "chain": "BASE",
    "destination_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
  },
  "created_at": "2026-01-14T15:05:12Z"
}
The virtual account expires in 25 minutes. Deposits after expiry will be flagged.

Step 3: Display Bank Details to User

Show your user the bank transfer details:

Complete Your Payment

Transfer NGN to this account:

Bank:Wema Bank
Account Number:9876543210
Account Name:Daya - [email protected]
Reference:DAYA-3J5K8N2Q

⏰ Complete within 25 minutes

In sandbox, simulate deposits using the test endpoint or wait for auto-simulation.

Step 4: Monitor Deposit Status

Poll for deposit status or set up webhooks:
curl --request GET \
  --url 'https://sandbox-api.daya.xyz/v1/deposits?onramp_id=onramp_3j5k8n2q' \
  --header 'Authorization: Bearer YOUR_SANDBOX_API_KEY'
Response:
{
  "deposits": [
    {
      "deposit_id": "dep_9x2k5m8p",
      "onramp_id": "onramp_3j5k8n2q",
      "payment_reference": "DAYA-3J5K8N2Q",
      "user_email": "[email protected]",
      "amount_ngn": "15000.00",
      "status": "SETTLED",
      "rate_id": "rate_8x7k2mq9p",
      "amount_asset": "9.70",
      "asset": "USDC",
      "chain": "BASE",
      "tx_hash": "0x8f3e2d1c0b9a8e7f6d5c4b3a2e1f0d9c8b7a6e5f4d3c2b1a",
      "created_at": "2026-01-14T15:06:30Z",
      "settled_at": "2026-01-14T15:08:15Z"
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "per_page": 20
  }
}
Instead of polling, receive real-time updates:
  1. Configure webhook URL in your dashboard
  2. Listen for deposit.settled events:
{
  "event": "deposit.settled",
  "event_id": "evt_5k2m8x9q",
  "created_at": "2026-01-14T15:08:15Z",
  "data": {
    "deposit_id": "dep_9x2k5m8p",
    "onramp_id": "onramp_3j5k8n2q",
    "status": "SETTLED",
    "amount_ngn": "15000.00",
    "amount_asset": "9.70",
    "asset": "USDC",
    "chain": "BASE",
    "tx_hash": "0x8f3e2d1c0b9a8e7f6d5c4b3a2e1f0d9c8b7a6e5f4d3c2b1a"
  }
}
Learn more in Webhooks Guide.

Common Issues

The rate_id is only valid for ~30 minutes. Request a fresh rate before creating each onramp.
Deposits after the 25-minute window are flagged. Ensure users complete transfers quickly.
Verify the address is valid for the specified chain (e.g., BASE, Ethereum mainnet).

Next Steps