POST
/
v1
/
packages
Create a Package
curl --request POST \
  --url http://127.0.0.1:4002/v1/packages \
  --header 'Content-Type: <content-type>' \
  --header 'X-Organization-Id: <x-organization-id>' \
  --data '{
  "feeGroupLabel": "Standard Package",
  "description": "Set of chages.",
  "chartOfAccounts": "PIX-DEBIT",
  "segmentId": "ecd2ac18-920e-4438-9f84-208eac050c8a",
  "ledgerId": "b4de02fe-275d-48f9-8288-862cde0d6474",
  "minimumAmount": 10000,
  "minimumAmountScale": 2,
  "maximumAmount": 100000,
  "maximumAmountScale": 2,
  "waivedAccounts": [
    "@acc001",
    "@acc002",
    "@acc003"
  ],
  "fees": {
    "admFee": {
      "feeLabel": "Administrative Fee",
      "calculationModel": {
        "applicationRule": "maxBetweenTypes",
        "calculations": [
          {
            "type": "flat",
            "value": 500,
            "valueScale": 2
          },
          {
            "type": "percentage",
            "value": 250,
            "valueScale": 2
          }
        ]
      },
      "referenceAmount": "originalAmount",
      "priority": 1,
      "isDeductibleFrom": true,
      "creditAccount": "@fees"
    },
    "iof": {
      "feeLabel": "IOF",
      "calculationModel": {
        "applicationRule": "percentual",
        "calculations": [
          {
            "type": "percentage",
            "value": 96,
            "valueScale": 2
          }
        ]
      },
      "referenceAmount": "afterFeesAmount",
      "priority": 2,
      "isDeductibleFrom": false,
      "creditAccount": "@iof"
    }
  },
  "enable": true
}'
{
"id": "33de988c-348c-476f-840b-72612c4600f6",
"feeGroupLabel": "Standard Package",
"description": "Set of charges.",
"chartOfAccounts": "PIX-DEBIT",
"segmentId": "ecd2ac18-920e-4438-9f84-208eac050c8a",
"ledgerId": "b4de02fe-275d-48f9-8288-862cde0d6474",
"minimumAmount": 10000,
"maximumAmount": 100000,
"minimumAmountScale": 2,
"maximumAmountScale": 27,
"waivedAccounts": [
"@acc001",
"@acc002",
"@acc003"
],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "maxBetweenTypes",
"calculations": [
{
"type": "flat",
"value": 500,
"valueScale": 2
},
{
"type": "percentage",
"value": 250,
"valueScale": 2
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": true,
"creditAccount": "@fees"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": 96,
"valueScale": 2
}
]
},
"referenceAmount": "afterFeeAmount",
"priority": 2,
"isDeductibleFrom": false,
"creditAccount": "@iof"
}
},
"enable": false,
"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. <b>This header is required if your environment has the Acces Manager plugin enabled</b>.

X-lerian-Id
string

The unique identifier of Lerian's client.

Content-Type
string
required

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

Body

application/json
feeGroupLabel
string
required

Name used to identify the configured Fee Package.

ledgerId
string
required

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

minimumAmount
integer
required

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

minimumAmountScale
integer
required

Scale for the minimumAmount field.

maximumAmount
integer
required

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

maximumAmountScale
integer
required

Scale for the maximumAmount field.

fees
object
required

List containing the definition of each individual tax in the package.

enable
boolean
required

If <code>true</code> it indicates that the package is active.

description
string

Short summary of what this Fee Package is designed to handle.

chartOfAccounts
string

An identifier that maps to an accounting rule—like debit-type-transaction or credit-type-transaction.

segmentId
string

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

waivedAccounts
string[]

List of accounts hat won't be charged the taxes in this package.

Response

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

id
string

Unique identifier of the package, in UUIDv7 format.

feeGroupLabel
string

Name used to identify the configured Fee Package.

description
string

Short summary of what this Fee Package is designed to handle.

chartOfAccounts
string

An identifier that maps to an accounting rule—like debit-type-transaction or credit-type-transaction.

segmentId
string

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

ledgerId
string

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

minimumAmount
integer

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

maximumAmount
integer

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

minimumAmountScale
integer

Scale for the minimumAmount field.

maximumAmountScale
integer

Scale for the maximumAmount field.

waivedAccounts
string[]

List of accounts hat won't be charged the taxes in this package.

fees
object

List containing the definition of each individual tax in the package.

enable
boolean

If <code>true</code> it indicates that the package is active.

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.