Withdraw merchant balance
curl --request POST \
--url https://api.daya.co/v1/merchant/withdrawals \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"amount_usd": "<string>",
"token": "<string>",
"chain": "<string>",
"destination_address": "<string>"
}
'import requests
url = "https://api.daya.co/v1/merchant/withdrawals"
payload = {
"amount_usd": "<string>",
"token": "<string>",
"chain": "<string>",
"destination_address": "<string>"
}
headers = {
"X-Api-Key": "<x-api-key>",
"X-Idempotency-Key": "<x-idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Api-Key': '<x-api-key>',
'X-Idempotency-Key': '<x-idempotency-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount_usd: '<string>',
token: '<string>',
chain: '<string>',
destination_address: '<string>'
})
};
fetch('https://api.daya.co/v1/merchant/withdrawals', 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/withdrawals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount_usd' => '<string>',
'token' => '<string>',
'chain' => '<string>',
'destination_address' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-api-key>",
"X-Idempotency-Key: <x-idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.daya.co/v1/merchant/withdrawals"
payload := strings.NewReader("{\n \"amount_usd\": \"<string>\",\n \"token\": \"<string>\",\n \"chain\": \"<string>\",\n \"destination_address\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.daya.co/v1/merchant/withdrawals")
.header("X-Api-Key", "<x-api-key>")
.header("X-Idempotency-Key", "<x-idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount_usd\": \"<string>\",\n \"token\": \"<string>\",\n \"chain\": \"<string>\",\n \"destination_address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daya.co/v1/merchant/withdrawals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["X-Idempotency-Key"] = '<x-idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_usd\": \"<string>\",\n \"token\": \"<string>\",\n \"chain\": \"<string>\",\n \"destination_address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"transaction_id": "transactions/abc123"
}
}
Merchant Balance
Withdraw merchant balance
Send USD from your merchant balance to a supported on-chain destination
POST
/
v1
/
merchant
/
withdrawals
Withdraw merchant balance
curl --request POST \
--url https://api.daya.co/v1/merchant/withdrawals \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"amount_usd": "<string>",
"token": "<string>",
"chain": "<string>",
"destination_address": "<string>"
}
'import requests
url = "https://api.daya.co/v1/merchant/withdrawals"
payload = {
"amount_usd": "<string>",
"token": "<string>",
"chain": "<string>",
"destination_address": "<string>"
}
headers = {
"X-Api-Key": "<x-api-key>",
"X-Idempotency-Key": "<x-idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Api-Key': '<x-api-key>',
'X-Idempotency-Key': '<x-idempotency-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount_usd: '<string>',
token: '<string>',
chain: '<string>',
destination_address: '<string>'
})
};
fetch('https://api.daya.co/v1/merchant/withdrawals', 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/withdrawals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount_usd' => '<string>',
'token' => '<string>',
'chain' => '<string>',
'destination_address' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-api-key>",
"X-Idempotency-Key: <x-idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.daya.co/v1/merchant/withdrawals"
payload := strings.NewReader("{\n \"amount_usd\": \"<string>\",\n \"token\": \"<string>\",\n \"chain\": \"<string>\",\n \"destination_address\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("X-Idempotency-Key", "<x-idempotency-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.daya.co/v1/merchant/withdrawals")
.header("X-Api-Key", "<x-api-key>")
.header("X-Idempotency-Key", "<x-idempotency-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount_usd\": \"<string>\",\n \"token\": \"<string>\",\n \"chain\": \"<string>\",\n \"destination_address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daya.co/v1/merchant/withdrawals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["X-Idempotency-Key"] = '<x-idempotency-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount_usd\": \"<string>\",\n \"token\": \"<string>\",\n \"chain\": \"<string>\",\n \"destination_address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"transaction_id": "transactions/abc123"
}
}
Overview
Creates a withdrawal from your withdrawal balance to a supported on-chain address. Withdrawals draw from the withdrawal balance only — not directly from the collection balance. If the needed funds are still in the collection balance, move them first viaPOST /v1/merchant/balance/transfer.
Provide a unique
X-Idempotency-Key for each withdrawal attempt so retries do not create duplicate transfers.Before creating a withdrawal, check Get Merchant Balance and validate the destination chain with List Supported Chains.
Only
USDT on POLYGON is withdrawal-enabled right now. Use the token-level metadata from GET /v1/supported-chains to validate supported combinations before submitting a withdrawal.Authentication
Your merchant API key
Headers
Unique request identifier used to deduplicate retries.Example:
withdrawal-20260310-0001Request Body
Amount to withdraw in USD decimal format.Example:
12.3400Token to send on-chain.Allowed values:
USDC, USDTDestination chain for the withdrawal.Allowed values:
SOLANA, TRON, APTOS, BASE, POLYGON, ETHEREUMAddress that will receive the withdrawal.Example:
4vJ9JU1bJJE96FWSJNMake sure the address format matches the selected chain and token pair.
Request Examples
curl --request POST \
--url https://api.daya.co/v1/merchant/withdrawals \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: withdrawal-20260310-0001' \
--data '{
"amount_usd": "12.3400",
"token": "USDC",
"chain": "SOLANA",
"destination_address": "4vJ9JU1bJJE96FWSJN"
}'
{
"amount_usd": "12.3400",
"token": "USDC",
"chain": "SOLANA",
"destination_address": "4vJ9JU1bJJE96FWSJN"
}
const response = await fetch('https://api.daya.co/v1/merchant/withdrawals', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
'X-Idempotency-Key': 'withdrawal-20260310-0001'
},
body: JSON.stringify({
amount_usd: '12.3400',
token: 'USDC',
chain: 'SOLANA',
destination_address: '4vJ9JU1bJJE96FWSJN'
})
});
const withdrawal = await response.json();
console.log(withdrawal);
Response
Withdrawal creation result.
Show data properties
Show data properties
Identifier for the created transfer.Example:
transactions/abc123Success Response
{
"data": {
"transaction_id": "transactions/abc123"
}
}
Error Responses
{
"error": {
"code": "VALIDATION_FAILED",
"message": "Invalid request",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"validation": "amount_usd must be greater than zero"
}
}
{
"error": {
"code": "IDEMPOTENCY_CONFLICT",
"message": "Idempotency key already used with a different payload",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
⌘I