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": "Fee test",
"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": "Fee test",
"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: 'Fee test',
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' => 'Fee test',
'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\": \"Fee test\",\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\": \"Fee test\",\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\": \"Fee test\",\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": "Fee Example",
"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 Taxas de um Pacote
Use este endpoint para calcular e recuperar as taxas associadas a um pacote específico para uma determinada transação.
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": "Fee test",
"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": "Fee test",
"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: 'Fee test',
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' => 'Fee test',
'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\": \"Fee test\",\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\": \"Fee test\",\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\": \"Fee test\",\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": "Fee Example",
"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
}
]
}
}
}
}Cabeçalhos
O token de autorização no formato 'Bearer '.
Importante: Este header é obrigatório se o seu ambiente possui o Access Manager habilitado. Para mais informações, consulte a documentação do Access Manager.
O tipo de mídia do recurso. Deve ser application/json.
"application/json"
O identificador único da Organização associada à requisição.
"019c96a0-0a98-7287-9a31-786e0809c769"
Corpo
Identificador único do Ledger ao qual este Pacote de Taxas está vinculado no Midaz Ledger.
Identificador único do Segmento ao qual este Pacote de Taxas está vinculado no Midaz Ledger.
Informações sobre a transação à qual a taxa se aplica.
Show child attributes
Show child attributes
Resposta
Indica que o recurso foi criado com sucesso e a operação foi concluída conforme esperado.
Resultado do cálculo de taxas. Contém os identificadores do Ledger e do Segmento junto com a transação enriquecida com as taxas calculadas.
Identificador único do Ledger ao qual este Pacote de Taxas está vinculado no Midaz Ledger.
Informações sobre a transação à qual a taxa se aplica.
Show child attributes
Show child attributes
Identificador único do Segmento ao qual este Pacote de Taxas está vinculado no Midaz Ledger.
Esta página foi útil?

