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": "Tarifa de prueba",
"route": "pix",
"pending": false,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": {
"from": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "customer-brl-1",
"description": "Nueva transacción"
}
]
},
"distribute": {
"to": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "business-brl-5",
"description": "Nueva transacción"
}
]
}
}
}
}
'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": "Tarifa de prueba",
"route": "pix",
"pending": False,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": { "from": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "customer-brl-1",
"description": "Nueva transacción"
}
] },
"distribute": { "to": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "business-brl-5",
"description": "Nueva transacción"
}
] }
}
}
}
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: 'Tarifa de prueba',
route: 'pix',
pending: false,
send: {
asset: 'BRL',
value: '4000.00',
source: {
from: [
{
amount: {asset: 'BRL', value: '4000.00'},
accountAlias: 'customer-brl-1',
description: 'Nueva transacción'
}
]
},
distribute: {
to: [
{
amount: {asset: 'BRL', value: '4000.00'},
accountAlias: 'business-brl-5',
description: 'Nueva transacción'
}
]
}
}
}
})
};
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' => 'Tarifa de prueba',
'route' => 'pix',
'pending' => false,
'send' => [
'asset' => 'BRL',
'value' => '4000.00',
'source' => [
'from' => [
[
'amount' => [
'asset' => 'BRL',
'value' => '4000.00'
],
'accountAlias' => 'customer-brl-1',
'description' => 'Nueva transacción'
]
]
],
'distribute' => [
'to' => [
[
'amount' => [
'asset' => 'BRL',
'value' => '4000.00'
],
'accountAlias' => 'business-brl-5',
'description' => 'Nueva transacción'
]
]
]
]
]
]),
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\": \"Tarifa de prueba\",\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\": \"Nueva transacción\"\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\": \"Nueva transacción\"\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\": \"Tarifa de prueba\",\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\": \"Nueva transacción\"\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\": \"Nueva transacción\"\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\": \"Tarifa de prueba\",\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\": \"Nueva transacción\"\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\": \"Nueva transacción\"\n }\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_bodyEstimar comisión por transacción
Utiliza este endpoint para estimar las tarifas de una transacción. Ayuda a validar los cargos esperados antes de procesarla.
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": "Tarifa de prueba",
"route": "pix",
"pending": false,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": {
"from": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "customer-brl-1",
"description": "Nueva transacción"
}
]
},
"distribute": {
"to": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "business-brl-5",
"description": "Nueva transacción"
}
]
}
}
}
}
'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": "Tarifa de prueba",
"route": "pix",
"pending": False,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": { "from": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "customer-brl-1",
"description": "Nueva transacción"
}
] },
"distribute": { "to": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "business-brl-5",
"description": "Nueva transacción"
}
] }
}
}
}
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: 'Tarifa de prueba',
route: 'pix',
pending: false,
send: {
asset: 'BRL',
value: '4000.00',
source: {
from: [
{
amount: {asset: 'BRL', value: '4000.00'},
accountAlias: 'customer-brl-1',
description: 'Nueva transacción'
}
]
},
distribute: {
to: [
{
amount: {asset: 'BRL', value: '4000.00'},
accountAlias: 'business-brl-5',
description: 'Nueva transacción'
}
]
}
}
}
})
};
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' => 'Tarifa de prueba',
'route' => 'pix',
'pending' => false,
'send' => [
'asset' => 'BRL',
'value' => '4000.00',
'source' => [
'from' => [
[
'amount' => [
'asset' => 'BRL',
'value' => '4000.00'
],
'accountAlias' => 'customer-brl-1',
'description' => 'Nueva transacción'
]
]
],
'distribute' => [
'to' => [
[
'amount' => [
'asset' => 'BRL',
'value' => '4000.00'
],
'accountAlias' => 'business-brl-5',
'description' => 'Nueva transacción'
]
]
]
]
]
]),
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\": \"Tarifa de prueba\",\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\": \"Nueva transacción\"\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\": \"Nueva transacción\"\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\": \"Tarifa de prueba\",\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\": \"Nueva transacción\"\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\": \"Nueva transacción\"\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\": \"Tarifa de prueba\",\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\": \"Nueva transacción\"\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\": \"Nueva transacción\"\n }\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_bodyEncabezados
El token de autorización en formato 'Bearer '.
Importante: Este encabezado es obligatorio si su entorno tiene habilitado Access Manager. Para obtener más información, consulte la documentación de Access Manager.
Tipo de medio del recurso. Debe ser application/json.
"application/json"
Identificador único de la organización asociada a la solicitud.
"019c96a0-0a98-7287-9a31-786e0809c769"
Cuerpo
Respuesta
Indica que el recurso se creó correctamente y que la operación se completó según lo esperado.
Resultado de la estimación de tarifas. message siempre se devuelve con el resultado de la evaluación.
feesApplied es null cuando ninguna regla de tarifa o de gratuidad coincide con la solicitud (por ejemplo, en caso de gratuidad o cuando no se aplica ninguna regla); en caso contrario contiene la transacción estimada enriquecida con las tarifas.
¿Esta página le ayudó?

