POST
/
v1
/
packages
Create a Package
curl --request POST \
  --url https://fees.sandbox.midaz.io/v1/packages \
  --header 'Content-Type: <content-type>' \
  --header 'X-Organization-Id: <x-organization-id>' \
  --data '{
  "feeGroupLabel": "Standard Package",
  "description": "Package for testing",
  "transactionRoute": "b2d91a9f-a369-4d8f-9116-660493b528ab",
  "segmentId": "0197d237-c31d-74de-ab9a-8f6c4c210b97",
  "ledgerId": "0197d1fb-4687-75b7-9615-a6547695ee6e",
  "minimumAmount": "3000.00",
  "maximumAmount": "6000.00",
  "waivedAccounts": [
    "@acc001",
    "@acc002",
    "@acc003"
  ],
  "fees": {
    "admFee": {
      "feeLabel": "Administrative Fee",
      "calculationModel": {
        "applicationRule": "flatFee",
        "calculations": [
          {
            "type": "flat",
            "value": "16.00"
          }
        ]
      },
      "referenceAmount": "originalAmount",
      "priority": 1,
      "isDeductibleFrom": true,
      "creditAccount": "@fees",
      "routeFrom": "d35a121f-a638-4d2d-966b-65657a049f12",
      "routeTo": "d35a121f-a638-4d2d-966b-65657a049f12"
    },
    "iof": {
      "feeLabel": "IOF",
      "calculationModel": {
        "applicationRule": "percentual",
        "calculations": [
          {
            "type": "percentage",
            "value": "6.00"
          }
        ]
      },
      "referenceAmount": "afterFeesAmount",
      "priority": 2,
      "isDeductibleFrom": false,
      "creditAccount": "@iof"
    }
  },
  "enable": true
}'
{
"id": "0196251d-a93a-7c42-9eef-c9f463470e21",
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "b2d91a9f-a369-4d8f-9116-660493b528ab",
"segmentId": "0197d237-c31d-74de-ab9a-8f6c4c210b97",
"ledgerId": "0197d1fb-4687-75b7-9615-a6547695ee6e",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": [
"@acc001",
"@acc002",
"@acc003"
],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": true,
"creditAccount": "@fees",
"routeFrom": "d35a121f-a638-4d2d-966b-65657a049f12",
"routeTo": "d35a121f-a638-4d2d-966b-65657a049f12"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": false,
"creditAccount": "@iof"
}
},
"enable": true,
"createdAt": "2025-04-10T07:33:03.121Z",
"updatedAt": null,
"deletedAt": null
}

Headers

X-Organization-Id
string
required

The unique identifier of the Organization associated with the request.

Authorization
string

The authorization token. This header is required if your environment has the Acces Manager plugin enabled.

Content-Type
string
required

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

Body

application/json
feeGroupLabel
string
required

Name of the tax group, used to identify the configured tax package.

ledgerId
string
required

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

minimumAmount
string
required

Minimum transaction amount below which the fees in the package don't apply. Important: Use a dot (.) as the decimal separator — commas are not accepted.

maximumAmount
string
required

Maximum transaction amount above which the fees in the package don't apply. Important: Use a dot (.) as the decimal separator — commas are not accepted.

fees
object
required

Object containing custom-named tax rules. Each key is defined by the client (e.g., admFee, iof), and its value must follow the Fee object schema.

enable
boolean
required

If true it indicates that the package is active.

description
string

Short summary of for the package explaining what it covers.

transactionRoute
string

The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.

segmentId
string

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

waivedAccounts
string[]

List of accounts that are exempt from the taxes defined in the package.

Response

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

feeGroupLabel
string
required

Name of the tax group, used to identify the configured tax package.

description
string
required

Short summary of for the package explaining what it covers.

transactionRoute
string
required

The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.

ledgerId
string
required

Unique identifier of the Ledger this Fee Package is linked to in the Midaz Ledger.

minimumAmount
string
required

Minimum transaction amount below which the fees in the package don't apply.

maximumAmount
string
required

Maximum transaction amount above which the fees in the package don't apply.

fees
object
required

Object containing custom-named tax rules. Each key is defined by the client (e.g., admFee, iof, and its value must follow the Fee object schema.

enable
boolean
required

If true it indicates that the package is active.

id
string

Unique identifier of the package, in UUIDv7 format.

segmentId
string

Unique identifier of the Segment this Fee Package is linked to in the Midaz Ledger.

waivedAccounts
string[]

List of accounts that are exempt from the taxes defined in the package.

createdAt
string<date-time>

Date when the package was created.

updatedAt
string<date-time>

Date when the package was last updated.

deletedAt
string<date-time>

Date when the package was deleted.