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": "01962515-e02a-7eac-b616-5d0df19c3400",
"transaction": {
"chartOfAccountsGroupName": "pix",
"description": "Test FEE",
"route": "pix",
"pending": false,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": {
"from": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "@account1",
"description": "New Transaction"
}
]
},
"distribute": {
"to": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "@account10",
"description": "New Transaction"
}
]
}
}
}
}
'{
"message": "Successfully estimated fee.",
"feesApplied": {
"segmentId": "0197f4cd-ea30-7840-95f6-f0c29a8b1c8c",
"ledgerId": "01962515-e02a-7eac-b616-5d0df19c3400",
"transaction": {
"route": "b2d91a9f-a369-4d8f-9116-660493b528ab",
"description": "Fee Example",
"pending": false,
"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 simulate the fees for a transaction. It helps validate expected charges before processing.
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": "01962515-e02a-7eac-b616-5d0df19c3400",
"transaction": {
"chartOfAccountsGroupName": "pix",
"description": "Test FEE",
"route": "pix",
"pending": false,
"send": {
"asset": "BRL",
"value": "4000.00",
"source": {
"from": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "@account1",
"description": "New Transaction"
}
]
},
"distribute": {
"to": [
{
"amount": {
"asset": "BRL",
"value": "4000.00"
},
"accountAlias": "@account10",
"description": "New Transaction"
}
]
}
}
}
}
'{
"message": "Successfully estimated fee.",
"feesApplied": {
"segmentId": "0197f4cd-ea30-7840-95f6-f0c29a8b1c8c",
"ledgerId": "01962515-e02a-7eac-b616-5d0df19c3400",
"transaction": {
"route": "b2d91a9f-a369-4d8f-9116-660493b528ab",
"description": "Fee Example",
"pending": false,
"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 package that you want to use.
Unique identifier of the Ledger the 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.
Indicates that the resource was successfully created and the operation was completed as expected.
Returns the result of the fee evaluation. If no matching rules are found, it provides an informational message.
Show child attributes
Unique identifier of the Segment linked to the package in the Midaz Ledger.
Unique identifier of the Ledger linked to the package 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.
Show child attributes
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.
Show child attributes
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.