curl --request POST \
--url https://fees.sandbox.lerian.net/v1/estimates \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"packageId": "0196251d-a93a-7c42-9eef-c9f463470e21",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"transaction": {
"chartOfAccountsGroupName": "pix",
"description": "Test FEE",
"route": "pix",
"pending": false,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": {
"from": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "customer-brl-1",
"description": "New Transaction"
}
]
},
"distribute": {
"to": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "business-brl-5",
"description": "New Transaction"
}
]
}
}
}
}
'import requests
url = "https://fees.sandbox.lerian.net/v1/estimates"
payload = {
"packageId": "0196251d-a93a-7c42-9eef-c9f463470e21",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"transaction": {
"chartOfAccountsGroupName": "pix",
"description": "Test FEE",
"route": "pix",
"pending": False,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": { "from": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "customer-brl-1",
"description": "New Transaction"
}
] },
"distribute": { "to": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "business-brl-5",
"description": "New Transaction"
}
] }
}
}
}
headers = {
"Content-Type": "<content-type>",
"X-Organization-Id": "<x-organization-id>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', 'X-Organization-Id': '<x-organization-id>'},
body: JSON.stringify({
packageId: '0196251d-a93a-7c42-9eef-c9f463470e21',
ledgerId: '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
transaction: {
chartOfAccountsGroupName: 'pix',
description: 'Test FEE',
route: 'pix',
pending: false,
send: {
asset: 'BRL',
value: '4000.00',
source: {
from: [
{
amount: {asset: 'BRL', value: '4000.00'},
accountAlias: 'customer-brl-1',
description: 'New Transaction'
}
]
},
distribute: {
to: [
{
amount: {asset: 'BRL', value: '4000.00'},
accountAlias: 'business-brl-5',
description: 'New Transaction'
}
]
}
}
}
})
};
fetch('https://fees.sandbox.lerian.net/v1/estimates', 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://fees.sandbox.lerian.net/v1/estimates",
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([
'packageId' => '0196251d-a93a-7c42-9eef-c9f463470e21',
'ledgerId' => '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
'transaction' => [
'chartOfAccountsGroupName' => 'pix',
'description' => 'Test FEE',
'route' => 'pix',
'pending' => false,
'send' => [
'asset' => 'BRL',
'value' => '4000.00',
'source' => [
'from' => [
[
'amount' => [
'asset' => 'BRL',
'value' => '4000.00'
],
'accountAlias' => 'customer-brl-1',
'description' => 'New Transaction'
]
]
],
'distribute' => [
'to' => [
[
'amount' => [
'asset' => 'BRL',
'value' => '4000.00'
],
'accountAlias' => 'business-brl-5',
'description' => 'New Transaction'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-Organization-Id: <x-organization-id>"
],
]);
$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://fees.sandbox.lerian.net/v1/estimates"
payload := strings.NewReader("{\n \"packageId\": \"0196251d-a93a-7c42-9eef-c9f463470e21\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"chartOfAccountsGroupName\": \"pix\",\n \"description\": \"Test FEE\",\n \"route\": \"pix\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"customer-brl-1\",\n \"description\": \"New Transaction\"\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"business-brl-5\",\n \"description\": \"New Transaction\"\n }\n ]\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Organization-Id", "<x-organization-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fees.sandbox.lerian.net/v1/estimates")
.header("Content-Type", "<content-type>")
.header("X-Organization-Id", "<x-organization-id>")
.body("{\n \"packageId\": \"0196251d-a93a-7c42-9eef-c9f463470e21\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"chartOfAccountsGroupName\": \"pix\",\n \"description\": \"Test FEE\",\n \"route\": \"pix\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"customer-brl-1\",\n \"description\": \"New Transaction\"\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"business-brl-5\",\n \"description\": \"New Transaction\"\n }\n ]\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fees.sandbox.lerian.net/v1/estimates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["X-Organization-Id"] = '<x-organization-id>'
request.body = "{\n \"packageId\": \"0196251d-a93a-7c42-9eef-c9f463470e21\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"chartOfAccountsGroupName\": \"pix\",\n \"description\": \"Test FEE\",\n \"route\": \"pix\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"customer-brl-1\",\n \"description\": \"New Transaction\"\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"business-brl-5\",\n \"description\": \"New Transaction\"\n }\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_bodyEstimate Transaction Fees
Use this endpoint to estimate the fees for a transaction. It helps validate expected charges before processing.
curl --request POST \
--url https://fees.sandbox.lerian.net/v1/estimates \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"packageId": "0196251d-a93a-7c42-9eef-c9f463470e21",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"transaction": {
"chartOfAccountsGroupName": "pix",
"description": "Test FEE",
"route": "pix",
"pending": false,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": {
"from": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "customer-brl-1",
"description": "New Transaction"
}
]
},
"distribute": {
"to": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "business-brl-5",
"description": "New Transaction"
}
]
}
}
}
}
'import requests
url = "https://fees.sandbox.lerian.net/v1/estimates"
payload = {
"packageId": "0196251d-a93a-7c42-9eef-c9f463470e21",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"transaction": {
"chartOfAccountsGroupName": "pix",
"description": "Test FEE",
"route": "pix",
"pending": False,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": { "from": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "customer-brl-1",
"description": "New Transaction"
}
] },
"distribute": { "to": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "business-brl-5",
"description": "New Transaction"
}
] }
}
}
}
headers = {
"Content-Type": "<content-type>",
"X-Organization-Id": "<x-organization-id>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', 'X-Organization-Id': '<x-organization-id>'},
body: JSON.stringify({
packageId: '0196251d-a93a-7c42-9eef-c9f463470e21',
ledgerId: '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
transaction: {
chartOfAccountsGroupName: 'pix',
description: 'Test FEE',
route: 'pix',
pending: false,
send: {
asset: 'BRL',
value: '4000.00',
source: {
from: [
{
amount: {asset: 'BRL', value: '4000.00'},
accountAlias: 'customer-brl-1',
description: 'New Transaction'
}
]
},
distribute: {
to: [
{
amount: {asset: 'BRL', value: '4000.00'},
accountAlias: 'business-brl-5',
description: 'New Transaction'
}
]
}
}
}
})
};
fetch('https://fees.sandbox.lerian.net/v1/estimates', 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://fees.sandbox.lerian.net/v1/estimates",
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([
'packageId' => '0196251d-a93a-7c42-9eef-c9f463470e21',
'ledgerId' => '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
'transaction' => [
'chartOfAccountsGroupName' => 'pix',
'description' => 'Test FEE',
'route' => 'pix',
'pending' => false,
'send' => [
'asset' => 'BRL',
'value' => '4000.00',
'source' => [
'from' => [
[
'amount' => [
'asset' => 'BRL',
'value' => '4000.00'
],
'accountAlias' => 'customer-brl-1',
'description' => 'New Transaction'
]
]
],
'distribute' => [
'to' => [
[
'amount' => [
'asset' => 'BRL',
'value' => '4000.00'
],
'accountAlias' => 'business-brl-5',
'description' => 'New Transaction'
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-Organization-Id: <x-organization-id>"
],
]);
$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://fees.sandbox.lerian.net/v1/estimates"
payload := strings.NewReader("{\n \"packageId\": \"0196251d-a93a-7c42-9eef-c9f463470e21\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"chartOfAccountsGroupName\": \"pix\",\n \"description\": \"Test FEE\",\n \"route\": \"pix\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"customer-brl-1\",\n \"description\": \"New Transaction\"\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"business-brl-5\",\n \"description\": \"New Transaction\"\n }\n ]\n }\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Organization-Id", "<x-organization-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://fees.sandbox.lerian.net/v1/estimates")
.header("Content-Type", "<content-type>")
.header("X-Organization-Id", "<x-organization-id>")
.body("{\n \"packageId\": \"0196251d-a93a-7c42-9eef-c9f463470e21\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"chartOfAccountsGroupName\": \"pix\",\n \"description\": \"Test FEE\",\n \"route\": \"pix\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"customer-brl-1\",\n \"description\": \"New Transaction\"\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"business-brl-5\",\n \"description\": \"New Transaction\"\n }\n ]\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fees.sandbox.lerian.net/v1/estimates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["X-Organization-Id"] = '<x-organization-id>'
request.body = "{\n \"packageId\": \"0196251d-a93a-7c42-9eef-c9f463470e21\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"chartOfAccountsGroupName\": \"pix\",\n \"description\": \"Test FEE\",\n \"route\": \"pix\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"customer-brl-1\",\n \"description\": \"New Transaction\"\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"amount\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\"\n },\n \"accountAlias\": \"business-brl-5\",\n \"description\": \"New Transaction\"\n }\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_bodyHeaders
The authorization token in the 'Bearer ' format.
Important: This header is required if your environment has Access Manager enabled. For more information, refer to the Access Manager documentation.
The type of media of the resource. Must be application/json.
"application/json"
The unique identifier of the Organization associated with the request.
"019c96a0-0a98-7287-9a31-786e0809c769"
Body
Response
Indicates that the resource was successfully created and the operation was completed as expected.
Result of the fee estimation. message is always returned with the result of the evaluation.
feesApplied is null when no fee or gratuity rule matches the request (for example, on gratuity or when no rules apply); otherwise it contains the estimated transaction enriched with fees.
Was this page helpful?

