Calculate Crypto Transfer Fee
curl --request GET \
--url https://api-production.fossapay.com/api/v1/transfers/crypto/calculate-fee \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api-production.fossapay.com/api/v1/transfers/crypto/calculate-fee"
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-production.fossapay.com/api/v1/transfers/crypto/calculate-fee', 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-production.fossapay.com/api/v1/transfers/crypto/calculate-fee",
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-production.fossapay.com/api/v1/transfers/crypto/calculate-fee"
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-production.fossapay.com/api/v1/transfers/crypto/calculate-fee")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-production.fossapay.com/api/v1/transfers/crypto/calculate-fee")
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{
"status": true,
"statusCode": 200,
"message": "Transfer fee calculated successfully",
"data": {
"amount": 200,
"currency": "usdc",
"feeAmount": 1,
"total": 201
}
}
Crypto Transfers
Calculate Crypto Transfer Fee
Calculate the payout fee for a crypto transfer in USDC or USDT
GET
/
api
/
v1
/
transfers
/
crypto
/
calculate-fee
Calculate Crypto Transfer Fee
curl --request GET \
--url https://api-production.fossapay.com/api/v1/transfers/crypto/calculate-fee \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api-production.fossapay.com/api/v1/transfers/crypto/calculate-fee"
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-production.fossapay.com/api/v1/transfers/crypto/calculate-fee', 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-production.fossapay.com/api/v1/transfers/crypto/calculate-fee",
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-production.fossapay.com/api/v1/transfers/crypto/calculate-fee"
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-production.fossapay.com/api/v1/transfers/crypto/calculate-fee")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-production.fossapay.com/api/v1/transfers/crypto/calculate-fee")
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{
"status": true,
"statusCode": 200,
"message": "Transfer fee calculated successfully",
"data": {
"amount": 200,
"currency": "usdc",
"feeAmount": 1,
"total": 201
}
}
Request
API Key for authentication
Query Parameters
The transfer amount for which to calculate the fee. Must be a positive number (minimum
0.01).The stablecoin to calculate fees for. Must be one of:
usdc, usdt (case-insensitive; values are normalized to lowercase).Request Example
curl -g 'https://api-production.fossapay.com/api/v1/transfers/crypto/calculate-fee?amount=200¤cy=usdc' \
-H "x-api-key: your_api_key_here"
const params = new URLSearchParams({
amount: '200',
currency: 'usdc',
});
const response = await fetch(
`https://api-production.fossapay.com/api/v1/transfers/crypto/calculate-fee?${params}`,
{
method: 'GET',
headers: {
'x-api-key': 'your_api_key_here',
},
}
);
if (!response.ok) {
throw new Error(`Request failed: ${response.status} ${response.statusText}`);
}
const feeData = await response.json();
This endpoint uses GET with query parameters, not a JSON body. When using
curl in a shell, wrap the full URL in quotes (or use curl -g) so & between query parameters is not treated as a background operator.Response
{
"status": true,
"statusCode": 200,
"message": "Transfer fee calculated successfully",
"data": {
"amount": 200,
"currency": "usdc",
"feeAmount": 1,
"total": 201
}
}
| Field | Description |
|---|---|
data.amount | The amount you passed in the query |
data.currency | The stablecoin (usdc or usdt) |
data.feeAmount | The fee charged for the crypto payout |
data.total | amount + feeAmount (total including fee) |
Validation errors
| HTTP status | Typical cause |
|---|---|
422 | Missing or invalid query params (e.g. amount not a positive number, currency empty or not usdc/usdt) |
400 | amount or currency missing after validation, or unsupported currency at the service layer |
⌘I

