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": "0197d237-c31d-74de-ab9a-8f6c4c210b97",
"ledgerId": "0197d1fb-4687-75b7-9615-a6547695ee6e",
"transaction": {
"route": "b2d91a9f-a369-4d8f-9116-660493b528ab",
"description": "Fee test",
"pending": false,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": {
"from": [
{
"accountAlias": "@testfee1",
"share": {
"percentage": "15"
}
},
{
"accountAlias": "@testfee2",
"share": {
"percentage": "35"
}
},
{
"accountAlias": "@testfee3",
"share": {
"percentage": "40"
}
},
{
"accountAlias": "@testfee4",
"share": {
"percentage": "10"
}
}
]
},
"distribute": {
"to": [
{
"accountAlias": "@testfee5",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "@testfee6",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "@testfee7",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "@testfee8",
"share": {
"percentage": "25"
}
}
]
}
}
}
}
'{
"id": "c62c6564-17fb-4eb6-b57b-4bc27c42b06b",
"segmentId": "ecd2ac18-920e-4438-9f84-208eac050c8a",
"ledgerId": "ac0cd8b8-55e1-4695-8b50-67868aa5f334",
"transaction": {
"route": "b2d91a9f-a369-4d8f-9116-660493b528ab",
"pending": false,
"description": "Fee Example",
"metadata": {
"packageAppliedID": "01962565-8d57-737b-abfa-84c3a15eeb15"
},
"send": {
"asset": "BRL",
"value": "4175.00",
"source": {
"from": [
{
"accountAlias": "@account1",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "@account2",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "@account3",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "@account4",
"amount": {
"asset": "BRL",
"value": "1175.00"
},
"route": "pixdebit",
"metadata": null
}
]
},
"distribute": {
"to": [
{
"accountAlias": "@account5",
"amount": {
"asset": "BRL",
"value": "4175.00"
},
"route": "pixcredit",
"metadata": null
}
]
}
}
}
}Use this endpoint to calculate and retrieve the fees associated with a specific package for a given transaction.
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": "0197d237-c31d-74de-ab9a-8f6c4c210b97",
"ledgerId": "0197d1fb-4687-75b7-9615-a6547695ee6e",
"transaction": {
"route": "b2d91a9f-a369-4d8f-9116-660493b528ab",
"description": "Fee test",
"pending": false,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": {
"from": [
{
"accountAlias": "@testfee1",
"share": {
"percentage": "15"
}
},
{
"accountAlias": "@testfee2",
"share": {
"percentage": "35"
}
},
{
"accountAlias": "@testfee3",
"share": {
"percentage": "40"
}
},
{
"accountAlias": "@testfee4",
"share": {
"percentage": "10"
}
}
]
},
"distribute": {
"to": [
{
"accountAlias": "@testfee5",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "@testfee6",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "@testfee7",
"share": {
"percentage": "25"
}
},
{
"accountAlias": "@testfee8",
"share": {
"percentage": "25"
}
}
]
}
}
}
}
'{
"id": "c62c6564-17fb-4eb6-b57b-4bc27c42b06b",
"segmentId": "ecd2ac18-920e-4438-9f84-208eac050c8a",
"ledgerId": "ac0cd8b8-55e1-4695-8b50-67868aa5f334",
"transaction": {
"route": "b2d91a9f-a369-4d8f-9116-660493b528ab",
"pending": false,
"description": "Fee Example",
"metadata": {
"packageAppliedID": "01962565-8d57-737b-abfa-84c3a15eeb15"
},
"send": {
"asset": "BRL",
"value": "4175.00",
"source": {
"from": [
{
"accountAlias": "@account1",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "@account2",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "@account3",
"amount": {
"asset": "BRL",
"value": "1000.00"
},
"route": "pixdebit",
"metadata": null
},
{
"accountAlias": "@account4",
"amount": {
"asset": "BRL",
"value": "1175.00"
},
"route": "pixdebit",
"metadata": null
}
]
},
"distribute": {
"to": [
{
"accountAlias": "@account5",
"amount": {
"asset": "BRL",
"value": "4175.00"
},
"route": "pixcredit",
"metadata": null
}
]
}
}
}
}The authorization token in the 'Bearer
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.
"0195fb87-eeb6-7487-bc58-659255a23ef1"
Unique identifier of the Ledger this Fee Package is linked to in the Midaz Ledger.
Information about the transaction to which the fee applies.
Show child attributes
The main accounting route of the transaction, representing the nature and general purpose of the transactional event. Used to categorize and group related operations in the general ledger. Same information as the transactionRoute field in the package.
Information about the transaction that will be sent.
Show child attributes
The code that identifies the asset that will be sent.
The amount that will be sent. Important: Use a dot (.) as the decimal separator — commas are not accepted.
The list of accounts that will be used as source (DEBIT operations).
Show child attributes
Show child attributes
The alias of the account used in the operation.
Information about the amount that will be used in the operation.
If different accounts are part of the operation, this object will contain the information about the percentage used for each account.
Show child attributes
The percentage that will be shared.
The percentage of the percentage that will be shared.
The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.
An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use costCenter: BR_11101997.
Show child attributes
The remaining amount or percentage that will be sent to an account. Important: Use a dot (.) as the decimal separator — commas are not accepted.
Rate information for the operation (used for currency conversions or rate-based operations).
A description for the operation.
The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.
An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use costCenter: BR_11101997.
Show child attributes
The remaining amount or percentage that will be distributed among the source accounts. Important: Use a dot (.) as the decimal separator — commas are not accepted.
A list of the accounts to which the amount will be transferred.
Show child attributes
Show child attributes
The alias of the account used in the operation.
Information about the amount that will be used in the operation.
If different accounts are part of the operation, this object will contain the information about the percentage used for each account.
Show child attributes
The percentage that will be shared.
The percentage of the percentage that will be shared.
The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.
An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use costCenter: BR_11101997.
Show child attributes
The remaining amount or percentage that will be sent to an account. Important: Use a dot (.) as the decimal separator — commas are not accepted.
Rate information for the operation (used for currency conversions or rate-based operations).
A description for the operation.
The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.
An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use costCenter: BR_11101997.
Show child attributes
The remaining amount or percentage that will be distributed among the destination accounts. Important: Use a dot (.) as the decimal separator — commas are not accepted.
The chart of accounts group name which categorizes this transaction under a specific group.
Alternative field for route. The main accounting route of the transaction. Either route or transactionRoute can be used.
Indicates if the transaction is pending.
A description for the transaction.
Unique identifier of the Segment this Fee Package is linked to in the Midaz Ledger.
Indicates that the resource was successfully created and the operation was completed as expected.
Unique identifier of the calculation, in UUIDv7 format.
Unique identifier of the Ledger this Fee Package is linked to in the Midaz Ledger.
Information about the transaction to which the fee applies.
Show child attributes
The main accounting route of the transaction, representing the nature and general purpose of the transactional event. Used to categorize and group related operations in the general ledger. Same information as the transactionRoute field in the package.
Information about the transaction that will be sent.
Show child attributes
The code that identifies the asset that will be sent.
The amount that will be sent. Important: Use a dot (.) as the decimal separator — commas are not accepted.
The list of accounts that will be used as source (DEBIT operations).
Show child attributes
Show child attributes
The alias of the account used in the operation.
Information about the amount that will be used in the operation.
If different accounts are part of the operation, this object will contain the information about the percentage used for each account.
Show child attributes
The percentage that will be shared.
The percentage of the percentage that will be shared.
The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.
An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use costCenter: BR_11101997.
Show child attributes
The remaining amount or percentage that will be sent to an account. Important: Use a dot (.) as the decimal separator — commas are not accepted.
Rate information for the operation (used for currency conversions or rate-based operations).
A description for the operation.
The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.
An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use costCenter: BR_11101997.
Show child attributes
The remaining amount or percentage that will be distributed among the source accounts. Important: Use a dot (.) as the decimal separator — commas are not accepted.
A list of the accounts to which the amount will be transferred.
Show child attributes
Show child attributes
The alias of the account used in the operation.
Information about the amount that will be used in the operation.
If different accounts are part of the operation, this object will contain the information about the percentage used for each account.
Show child attributes
The percentage that will be shared.
The percentage of the percentage that will be shared.
The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.
An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use costCenter: BR_11101997.
Show child attributes
The remaining amount or percentage that will be sent to an account. Important: Use a dot (.) as the decimal separator — commas are not accepted.
Rate information for the operation (used for currency conversions or rate-based operations).
A description for the operation.
The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.
An object containing key-value pairs to add as metadata, where the field name is the key and the field value is the value. For example, to add a Cost Center, use costCenter: BR_11101997.
Show child attributes
The remaining amount or percentage that will be distributed among the destination accounts. Important: Use a dot (.) as the decimal separator — commas are not accepted.
The chart of accounts group name which categorizes this transaction under a specific group.
Alternative field for route. The main accounting route of the transaction. Either route or transactionRoute can be used.
Indicates if the transaction is pending.
A description for the transaction.
Unique identifier of the Segment this Fee Package is linked to in the Midaz Ledger.