Skip to main content
POST
/
v1
/
estimates
Simulate Transaction Fees
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
            }
          ]
        }
      }
    }
  }
}

Headers

Authorization
string

The authorization token in the 'Bearer <token>' format.
Important: This header is required if your environment has Access Manager enabled. For more information, refer to the Access Manager documentation.

Content-Type
string
required

The type of media of the resource. Must be application/json.

Example:

"application/json"

X-Organization-Id
string
required

The unique identifier of the Organization associated with the request.

Example:

"0195fb87-eeb6-7487-bc58-659255a23ef1"

Body

application/json
packageId
string
required

Unique identifier of the package that you want to use.

ledgerId
string
required

Unique identifier of the Ledger the package is linked to in the Midaz Ledger.

transaction
object
required

Information about the transaction to which the fee applies.

Response

Indicates that the resource was successfully created and the operation was completed as expected.

message
string
required

Returns the result of the fee evaluation. If no matching rules are found, it provides an informational message.

feesApplied
object
required