curl --request POST \
--url https://fees.sandbox.lerian.net/v1/fees \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"transaction": {
"route": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"description": "Prueba de tarifas",
"pending": false,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": {
"from": [
{
"accountAlias": "customer-brl-1",
"share": {
"percentage": "15"
}
},
{
"accountAlias": "customer-brl-2",
"share": {
"percentage": "35"
}
},
{
"accountAlias": "customer-brl-3",
"share": {
"percentage": "40"
}
},
{
"accountAlias": "customer-brl-4",
"share": {
"percentage": "10"
}
}
]
},
"distribute": {
"to": [
{
"accountAlias": "business-brl-1",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "business-brl-2",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "business-brl-3",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "business-brl-4",
"share": {
"percentage": "25"
}
}
]
}
}
}
}
'import requests
url = "https://fees.sandbox.lerian.net/v1/fees"
payload = {
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"transaction": {
"route": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"description": "Prueba de tarifas",
"pending": False,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": { "from": [
{
"accountAlias": "customer-brl-1",
"share": { "percentage": "15" }
},
{
"accountAlias": "customer-brl-2",
"share": { "percentage": "35" }
},
{
"accountAlias": "customer-brl-3",
"share": { "percentage": "40" }
},
{
"accountAlias": "customer-brl-4",
"share": { "percentage": "10" }
}
] },
"distribute": { "to": [
{
"accountAlias": "business-brl-1",
"share": { "percentage": "25" }
},
{
"accountAlias": "business-brl-2",
"share": { "percentage": "25" }
},
{
"accountAlias": "business-brl-3",
"share": { "percentage": "25" }
},
{
"accountAlias": "business-brl-4",
"share": { "percentage": "25" }
}
] }
}
}
}
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({
segmentId: '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
ledgerId: '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
transaction: {
route: '019c96a0-10a0-72d2-9fb0-2b7de8093182',
description: 'Prueba de tarifas',
pending: false,
send: {
asset: 'BRL',
value: '4000.00',
source: {
from: [
{accountAlias: 'customer-brl-1', share: {percentage: '15'}},
{accountAlias: 'customer-brl-2', share: {percentage: '35'}},
{accountAlias: 'customer-brl-3', share: {percentage: '40'}},
{accountAlias: 'customer-brl-4', share: {percentage: '10'}}
]
},
distribute: {
to: [
{accountAlias: 'business-brl-1', share: {percentage: '25'}},
{accountAlias: 'business-brl-2', share: {percentage: '25'}},
{accountAlias: 'business-brl-3', share: {percentage: '25'}},
{accountAlias: 'business-brl-4', share: {percentage: '25'}}
]
}
}
}
})
};
fetch('https://fees.sandbox.lerian.net/v1/fees', 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/fees",
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([
'segmentId' => '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
'ledgerId' => '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
'transaction' => [
'route' => '019c96a0-10a0-72d2-9fb0-2b7de8093182',
'description' => 'Prueba de tarifas',
'pending' => false,
'send' => [
'asset' => 'BRL',
'value' => '4000.00',
'source' => [
'from' => [
[
'accountAlias' => 'customer-brl-1',
'share' => [
'percentage' => '15'
]
],
[
'accountAlias' => 'customer-brl-2',
'share' => [
'percentage' => '35'
]
],
[
'accountAlias' => 'customer-brl-3',
'share' => [
'percentage' => '40'
]
],
[
'accountAlias' => 'customer-brl-4',
'share' => [
'percentage' => '10'
]
]
]
],
'distribute' => [
'to' => [
[
'accountAlias' => 'business-brl-1',
'share' => [
'percentage' => '25'
]
],
[
'accountAlias' => 'business-brl-2',
'share' => [
'percentage' => '25'
]
],
[
'accountAlias' => 'business-brl-3',
'share' => [
'percentage' => '25'
]
],
[
'accountAlias' => 'business-brl-4',
'share' => [
'percentage' => '25'
]
]
]
]
]
]
]),
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/fees"
payload := strings.NewReader("{\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"route\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"description\": \"Prueba de tarifas\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"accountAlias\": \"customer-brl-1\",\n \"share\": {\n \"percentage\": \"15\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-2\",\n \"share\": {\n \"percentage\": \"35\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-3\",\n \"share\": {\n \"percentage\": \"40\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-4\",\n \"share\": {\n \"percentage\": \"10\"\n }\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"accountAlias\": \"business-brl-1\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-2\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-3\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-4\",\n \"share\": {\n \"percentage\": \"25\"\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/fees")
.header("Content-Type", "<content-type>")
.header("X-Organization-Id", "<x-organization-id>")
.body("{\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"route\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"description\": \"Prueba de tarifas\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"accountAlias\": \"customer-brl-1\",\n \"share\": {\n \"percentage\": \"15\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-2\",\n \"share\": {\n \"percentage\": \"35\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-3\",\n \"share\": {\n \"percentage\": \"40\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-4\",\n \"share\": {\n \"percentage\": \"10\"\n }\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"accountAlias\": \"business-brl-1\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-2\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-3\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-4\",\n \"share\": {\n \"percentage\": \"25\"\n }\n }\n ]\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fees.sandbox.lerian.net/v1/fees")
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 \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"route\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"description\": \"Prueba de tarifas\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"accountAlias\": \"customer-brl-1\",\n \"share\": {\n \"percentage\": \"15\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-2\",\n \"share\": {\n \"percentage\": \"35\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-3\",\n \"share\": {\n \"percentage\": \"40\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-4\",\n \"share\": {\n \"percentage\": \"10\"\n }\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"accountAlias\": \"business-brl-1\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-2\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-3\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-4\",\n \"share\": {\n \"percentage\": \"25\"\n }\n }\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"transaction": {
"route": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"pending": false,
"description": "Ejemplo de tarifa",
"metadata": {
"packageAppliedID": "01962565-8d57-737b-abfa-84c3a15eeb15"
},
"send": {
"asset": "BRL",
"value": "4175.00",
"source": {
"from": [
{
"accountAlias": "customer-brl-1",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "customer-brl-2",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "customer-brl-3",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "customer-brl-4",
"amount": {
"asset": "BRL",
"value": "1175.00"
},
"route": "pixdebit",
"metadata": null
}
]
},
"distribute": {
"to": [
{
"accountAlias": "business-brl-1",
"amount": {
"asset": "BRL",
"value": "4175.00"
},
"route": "pixcredit",
"metadata": null
}
]
}
}
}
}Calcular tarifas para un paquete
Utiliza este endpoint para calcular y obtener las tarifas asociadas a un paquete específico para una transacción determinada.
curl --request POST \
--url https://fees.sandbox.lerian.net/v1/fees \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"transaction": {
"route": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"description": "Prueba de tarifas",
"pending": false,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": {
"from": [
{
"accountAlias": "customer-brl-1",
"share": {
"percentage": "15"
}
},
{
"accountAlias": "customer-brl-2",
"share": {
"percentage": "35"
}
},
{
"accountAlias": "customer-brl-3",
"share": {
"percentage": "40"
}
},
{
"accountAlias": "customer-brl-4",
"share": {
"percentage": "10"
}
}
]
},
"distribute": {
"to": [
{
"accountAlias": "business-brl-1",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "business-brl-2",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "business-brl-3",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "business-brl-4",
"share": {
"percentage": "25"
}
}
]
}
}
}
}
'import requests
url = "https://fees.sandbox.lerian.net/v1/fees"
payload = {
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"transaction": {
"route": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"description": "Prueba de tarifas",
"pending": False,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": { "from": [
{
"accountAlias": "customer-brl-1",
"share": { "percentage": "15" }
},
{
"accountAlias": "customer-brl-2",
"share": { "percentage": "35" }
},
{
"accountAlias": "customer-brl-3",
"share": { "percentage": "40" }
},
{
"accountAlias": "customer-brl-4",
"share": { "percentage": "10" }
}
] },
"distribute": { "to": [
{
"accountAlias": "business-brl-1",
"share": { "percentage": "25" }
},
{
"accountAlias": "business-brl-2",
"share": { "percentage": "25" }
},
{
"accountAlias": "business-brl-3",
"share": { "percentage": "25" }
},
{
"accountAlias": "business-brl-4",
"share": { "percentage": "25" }
}
] }
}
}
}
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({
segmentId: '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
ledgerId: '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
transaction: {
route: '019c96a0-10a0-72d2-9fb0-2b7de8093182',
description: 'Prueba de tarifas',
pending: false,
send: {
asset: 'BRL',
value: '4000.00',
source: {
from: [
{accountAlias: 'customer-brl-1', share: {percentage: '15'}},
{accountAlias: 'customer-brl-2', share: {percentage: '35'}},
{accountAlias: 'customer-brl-3', share: {percentage: '40'}},
{accountAlias: 'customer-brl-4', share: {percentage: '10'}}
]
},
distribute: {
to: [
{accountAlias: 'business-brl-1', share: {percentage: '25'}},
{accountAlias: 'business-brl-2', share: {percentage: '25'}},
{accountAlias: 'business-brl-3', share: {percentage: '25'}},
{accountAlias: 'business-brl-4', share: {percentage: '25'}}
]
}
}
}
})
};
fetch('https://fees.sandbox.lerian.net/v1/fees', 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/fees",
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([
'segmentId' => '019c96a0-0b4e-7079-8be0-ab6bdccf975f',
'ledgerId' => '019c96a0-0ac0-7de9-9f53-9cf842a2ee5a',
'transaction' => [
'route' => '019c96a0-10a0-72d2-9fb0-2b7de8093182',
'description' => 'Prueba de tarifas',
'pending' => false,
'send' => [
'asset' => 'BRL',
'value' => '4000.00',
'source' => [
'from' => [
[
'accountAlias' => 'customer-brl-1',
'share' => [
'percentage' => '15'
]
],
[
'accountAlias' => 'customer-brl-2',
'share' => [
'percentage' => '35'
]
],
[
'accountAlias' => 'customer-brl-3',
'share' => [
'percentage' => '40'
]
],
[
'accountAlias' => 'customer-brl-4',
'share' => [
'percentage' => '10'
]
]
]
],
'distribute' => [
'to' => [
[
'accountAlias' => 'business-brl-1',
'share' => [
'percentage' => '25'
]
],
[
'accountAlias' => 'business-brl-2',
'share' => [
'percentage' => '25'
]
],
[
'accountAlias' => 'business-brl-3',
'share' => [
'percentage' => '25'
]
],
[
'accountAlias' => 'business-brl-4',
'share' => [
'percentage' => '25'
]
]
]
]
]
]
]),
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/fees"
payload := strings.NewReader("{\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"route\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"description\": \"Prueba de tarifas\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"accountAlias\": \"customer-brl-1\",\n \"share\": {\n \"percentage\": \"15\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-2\",\n \"share\": {\n \"percentage\": \"35\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-3\",\n \"share\": {\n \"percentage\": \"40\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-4\",\n \"share\": {\n \"percentage\": \"10\"\n }\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"accountAlias\": \"business-brl-1\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-2\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-3\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-4\",\n \"share\": {\n \"percentage\": \"25\"\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/fees")
.header("Content-Type", "<content-type>")
.header("X-Organization-Id", "<x-organization-id>")
.body("{\n \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"route\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"description\": \"Prueba de tarifas\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"accountAlias\": \"customer-brl-1\",\n \"share\": {\n \"percentage\": \"15\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-2\",\n \"share\": {\n \"percentage\": \"35\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-3\",\n \"share\": {\n \"percentage\": \"40\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-4\",\n \"share\": {\n \"percentage\": \"10\"\n }\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"accountAlias\": \"business-brl-1\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-2\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-3\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-4\",\n \"share\": {\n \"percentage\": \"25\"\n }\n }\n ]\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fees.sandbox.lerian.net/v1/fees")
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 \"segmentId\": \"019c96a0-0b4e-7079-8be0-ab6bdccf975f\",\n \"ledgerId\": \"019c96a0-0ac0-7de9-9f53-9cf842a2ee5a\",\n \"transaction\": {\n \"route\": \"019c96a0-10a0-72d2-9fb0-2b7de8093182\",\n \"description\": \"Prueba de tarifas\",\n \"pending\": false,\n \"send\": {\n \"asset\": \"BRL\",\n \"value\": \"4000.00\",\n \"source\": {\n \"from\": [\n {\n \"accountAlias\": \"customer-brl-1\",\n \"share\": {\n \"percentage\": \"15\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-2\",\n \"share\": {\n \"percentage\": \"35\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-3\",\n \"share\": {\n \"percentage\": \"40\"\n }\n },\n {\n \"accountAlias\": \"customer-brl-4\",\n \"share\": {\n \"percentage\": \"10\"\n }\n }\n ]\n },\n \"distribute\": {\n \"to\": [\n {\n \"accountAlias\": \"business-brl-1\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-2\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-3\",\n \"share\": {\n \"percentage\": \"25\"\n }\n },\n {\n \"accountAlias\": \"business-brl-4\",\n \"share\": {\n \"percentage\": \"25\"\n }\n }\n ]\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"segmentId": "019c96a0-0b4e-7079-8be0-ab6bdccf975f",
"ledgerId": "019c96a0-0ac0-7de9-9f53-9cf842a2ee5a",
"transaction": {
"route": "019c96a0-10a0-72d2-9fb0-2b7de8093182",
"pending": false,
"description": "Ejemplo de tarifa",
"metadata": {
"packageAppliedID": "01962565-8d57-737b-abfa-84c3a15eeb15"
},
"send": {
"asset": "BRL",
"value": "4175.00",
"source": {
"from": [
{
"accountAlias": "customer-brl-1",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "customer-brl-2",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "customer-brl-3",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "customer-brl-4",
"amount": {
"asset": "BRL",
"value": "1175.00"
},
"route": "pixdebit",
"metadata": null
}
]
},
"distribute": {
"to": [
{
"accountAlias": "business-brl-1",
"amount": {
"asset": "BRL",
"value": "4175.00"
},
"route": "pixcredit",
"metadata": null
}
]
}
}
}
}Encabezados
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
Identificador único del Ledger al que está vinculado este paquete de tarifas en el Ledger de Midaz.
Identificador único del segmento al que está vinculado este paquete de tarifas en el Ledger de Midaz.
Información sobre la transacción a la que se aplica la tarifa.
Show child attributes
Show child attributes
Respuesta
Indica que el recurso se creó correctamente y que la operación se completó según lo esperado.
Resultado del cálculo de tarifas. Contiene los identificadores del Ledger y del segmento junto con la transacción enriquecida con las tarifas calculadas.
Identificador único del Ledger al que está vinculado este paquete de tarifas en el Ledger de Midaz.
Información sobre la transacción a la que se aplica la tarifa.
Show child attributes
Show child attributes
Identificador único del segmento al que está vinculado este paquete de tarifas en el Ledger de Midaz.
¿Esta página le ayudó?

