Get merchant balance
curl --request GET \
--url https://api.daya.co/v1/merchant/balance \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.daya.co/v1/merchant/balance"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.daya.co/v1/merchant/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.daya.co/v1/merchant/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.daya.co/v1/merchant/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.daya.co/v1/merchant/balance")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daya.co/v1/merchant/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"collection_balance_usd": "500.1234",
"withdrawal_balance_usd": "100.1234",
"withdrawal_balance_ngn": "250000.00",
"withdrawal_balance_sol": "2.450000000",
"withdrawal_balance_bnb": "1.25000000"
}
}
Merchant Balance
Get merchant balance
Retrieve the current merchant collection and withdrawal balances
GET
/
v1
/
merchant
/
balance
Get merchant balance
curl --request GET \
--url https://api.daya.co/v1/merchant/balance \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.daya.co/v1/merchant/balance"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.daya.co/v1/merchant/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.daya.co/v1/merchant/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.daya.co/v1/merchant/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.daya.co/v1/merchant/balance")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daya.co/v1/merchant/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"collection_balance_usd": "500.1234",
"withdrawal_balance_usd": "100.1234",
"withdrawal_balance_ngn": "250000.00",
"withdrawal_balance_sol": "2.450000000",
"withdrawal_balance_bnb": "1.25000000"
}
}
Overview
Returns your current merchant balances. The response includes the USD collection balance and withdrawal balances for USD, NGN, SOL, and BNB. The collection balance can be transferred to the USD withdrawal balance through the balance transfer endpoint. Merchant funding deposits go directly to a withdrawal balance. NGN deposits creditwithdrawal_balance_usd under the default USD_BALANCE preference, or withdrawal_balance_ngn when the merchant selects NGN_BALANCE.
Authentication
string
required
Your merchant API key
Request Examples
curl --request GET \
--url https://api.daya.co/v1/merchant/balance \
--header 'X-Api-Key: YOUR_API_KEY'
const response = await fetch('https://api.daya.co/v1/merchant/balance', {
headers: {
'X-Api-Key': 'YOUR_API_KEY'
}
});
const balance = await response.json();
console.log(balance);
Response
object
Current merchant balance details.
Show data properties
Show data properties
string
Collection balance in USD. Accumulates from funding account deposits and USD virtual account deposits.Example:
500.1234string
Withdrawal balance in USD. Used for USD-funded transfers and stablecoin withdrawals.Example:
100.1234string
Withdrawal balance in NGN. Used for merchant-scoped NGN bank transfers created with
debit_currency: NGN.Example: 250000.00string
Native SOL withdrawal balance.Example:
2.450000000string
Native BNB withdrawal balance.Example:
1.25000000Success Response
{
"data": {
"collection_balance_usd": "500.1234",
"withdrawal_balance_usd": "100.1234",
"withdrawal_balance_ngn": "250000.00",
"withdrawal_balance_sol": "2.450000000",
"withdrawal_balance_bnb": "1.25000000"
}
}
Error Responses
This endpoint may return:401: Unauthorized500: Internal server error
Next Steps
Transfer Balance
Move funds from collection to withdrawal balance
Withdraw Balance
Transfer withdrawal balance to an on-chain address
Merchant Funding
View funding instructions to top up your balance