curl --request POST \
--url http://127.0.0.1:4002/v1/fees \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"segmentId": "ecd2ac18-920e-4438-9f84-208eac050c8a",
"ledgerId": "ac0cd8b8-55e1-4695-8b50-67868aa5f334",
"transaction": {
"chartOfAccountsGroupName": "FEES",
"description": "Fee Example",
"send": {
"asset": "BRL",
"value": 400000,
"scale": 2,
"source": {
"from": [
{
"account": "@account1",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 100000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account2",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 100000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account3",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 160000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account4",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 40000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
}
]
},
"distribute": {
"to": [
{
"account": "@account5",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 400000
},
"description": "New Trasnaction",
"chartOfAccounts": "PIX-DEBIT"
}
]
}
},
"metadata": {
"message": "payment",
"value": 400000
}
}
}
'{
"id": "c62c6564-17fb-4eb6-b57b-4bc27c42b06b",
"segmentId": "ecd2ac18-920e-4438-9f84-208eac050c8a",
"ledgerId": "ac0cd8b8-55e1-4695-8b50-67868aa5f334",
"transaction": {
"chartOfAccountsGroupName": "FEES",
"description": "Fee Example",
"send": {
"asset": "BRL",
"value": 400000,
"scale": 2,
"source": {
"from": [
{
"account": "@account1",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 100000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account2",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 100000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account3",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 160000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account4",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 40000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
}
]
},
"distribute": {
"to": [
{
"account": "@account5",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 400000
},
"description": "New Trasnaction",
"chartOfAccounts": "PIX-DEBIT"
}
]
}
},
"metadata": {
"message": "payment",
"value": 400000
}
}
}Use this endpoint to calculate and retrieve the fees associated with a specific package for a given transaction.
curl --request POST \
--url http://127.0.0.1:4002/v1/fees \
--header 'Content-Type: <content-type>' \
--header 'X-Organization-Id: <x-organization-id>' \
--data '
{
"segmentId": "ecd2ac18-920e-4438-9f84-208eac050c8a",
"ledgerId": "ac0cd8b8-55e1-4695-8b50-67868aa5f334",
"transaction": {
"chartOfAccountsGroupName": "FEES",
"description": "Fee Example",
"send": {
"asset": "BRL",
"value": 400000,
"scale": 2,
"source": {
"from": [
{
"account": "@account1",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 100000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account2",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 100000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account3",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 160000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account4",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 40000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
}
]
},
"distribute": {
"to": [
{
"account": "@account5",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 400000
},
"description": "New Trasnaction",
"chartOfAccounts": "PIX-DEBIT"
}
]
}
},
"metadata": {
"message": "payment",
"value": 400000
}
}
}
'{
"id": "c62c6564-17fb-4eb6-b57b-4bc27c42b06b",
"segmentId": "ecd2ac18-920e-4438-9f84-208eac050c8a",
"ledgerId": "ac0cd8b8-55e1-4695-8b50-67868aa5f334",
"transaction": {
"chartOfAccountsGroupName": "FEES",
"description": "Fee Example",
"send": {
"asset": "BRL",
"value": 400000,
"scale": 2,
"source": {
"from": [
{
"account": "@account1",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 100000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account2",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 100000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account3",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 160000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
},
{
"account": "@account4",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 40000
},
"description": "New Transaction",
"chartOfAccounts": "PIX-DEBIT"
}
]
},
"distribute": {
"to": [
{
"account": "@account5",
"amount": {
"scale": 2,
"asset": "BRL",
"value": 400000
},
"description": "New Trasnaction",
"chartOfAccounts": "PIX-DEBIT"
}
]
}
},
"metadata": {
"message": "payment",
"value": 400000
}
}
}The authorization token. This header is required if your environment has the Access Manager plugin enabled.
The request content type.
The unique identifier of the Organization associated with the request.
The unique identifier of Lerian's client.
Unique identifier of the calculation, in UUIDv7 format.
Unique identifier of the Segment this Fee Package is linked to in the Midaz Ledger.
Unique identifier of the Ledger this Fee Package is linked to in the Midaz Ledger.
Information about the transaction.
Show child attributes