Transfer merchant balance
curl --request POST \
--url https://api.daya.co/v1/merchant/balance/transfer \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"amount_usd": "<string>"
}
'import requests
url = "https://api.daya.co/v1/merchant/balance/transfer"
payload = { "amount_usd": "<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>'})
};
fetch('https://api.daya.co/v1/merchant/balance/transfer', 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/transfer",
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>'
]),
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/balance/transfer"
payload := strings.NewReader("{\n \"amount_usd\": \"<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/balance/transfer")
.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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daya.co/v1/merchant/balance/transfer")
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}"
response = http.request(request)
puts response.read_body{
"data": {
"collection_balance_usd": "400.0000",
"withdrawal_balance_usd": "600.0000"
}
}
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Insufficient collection balance",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
Merchant Balance
Transfer merchant balance
Transfer funds from collection to withdrawal balance
POST
/
v1
/
merchant
/
balance
/
transfer
Transfer merchant balance
curl --request POST \
--url https://api.daya.co/v1/merchant/balance/transfer \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"amount_usd": "<string>"
}
'import requests
url = "https://api.daya.co/v1/merchant/balance/transfer"
payload = { "amount_usd": "<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>'})
};
fetch('https://api.daya.co/v1/merchant/balance/transfer', 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/transfer",
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>'
]),
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/balance/transfer"
payload := strings.NewReader("{\n \"amount_usd\": \"<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/balance/transfer")
.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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daya.co/v1/merchant/balance/transfer")
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}"
response = http.request(request)
puts response.read_body{
"data": {
"collection_balance_usd": "400.0000",
"withdrawal_balance_usd": "600.0000"
}
}
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Insufficient collection balance",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
Overview
Transfers USD from the merchant collection balance into the merchant withdrawal balance. This is a USD-only operation.Authentication
Your merchant API key
Unique idempotency key for request deduplicationExample:
550e8400-e29b-41d4-a716-446655440000Request Body
Amount in USD to transfer from collection to withdrawal balance.Example:
100.00Request Example
curl --request POST \
--url https://api.daya.co/v1/merchant/balance/transfer \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000' \
--header 'Content-Type: application/json' \
--data '{
"amount_usd": "100.00"
}'
Response
{
"data": {
"collection_balance_usd": "400.0000",
"withdrawal_balance_usd": "600.0000"
}
}
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Insufficient collection balance",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
⌘I