Get Started
This guide walks you through creating your first onramp in Sandbox, from fetching rates to receiving settlement webhooks.
Fetch Current Rates
Get a firm FX quote with GET /v1/rates
Create an Onramp
Provision an temporary VA with POST /v1/onramp
Simulate a Deposit
(Sandbox only) Trigger a test NGN deposit
Receive Webhook
Get notified when the deposit settles
Prerequisites
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)
Install HTTP Client
You can use any HTTP client. Examples below use cURL.# Verify you can reach the API
curl https://sandbox-api.daya.co/health
Step 1: Get Exchange Rate
Request a firm FX quote:
curl --request GET \
--url 'https://sandbox-api.daya.co/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 temporary onramp with auto-withdraw:
curl --request POST \
--url https://sandbox-api.daya.co/v1/onramp \
--header 'Authorization: Bearer YOUR_SANDBOX_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"type": "TEMPORARY",
"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": "TEMPORARY",
"status": "ACTIVE",
"rate_id": "rate_8x7k2mq9p",
"payment_reference": "DAYA-3J5K8N2Q",
"virtual_account": {
"account_number": "0690000031",
"account_name": "Daya - [email protected]",
"bank_name": "Access,
"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.co/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
}
}
Step 5: Set Up Webhooks (Recommended)
Instead of polling, receive real-time updates:
- Configure webhook URL in your dashboard
- 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.
Deposit flagged after transfer
Deposits after the 25-minute window are flagged. Ensure users complete transfers quickly.
Invalid destination address
Verify the address is valid for the specified chain. See Supported Chains for the full list.
Next Steps