Skip to main content
Charge a fee automatically on the transactions that match a fee package.

Participants


  • Your institution. Your system. It configures the fee package and posts the transactions.
  • Midaz. The ledger. It selects the package, adds the fee and posts the transaction.

Before you start


  • The account that receives the fee exists in the ledger. The fee names it in creditAccount.

Diagram


Charge a fee on a transaction

Steps through the API


Rules


  • A /v1 transaction and a reversal charge no new fee.
  • A package applies when the transaction matches each condition that the package sets, and the amount is in the range from minimumAmount to maximumAmount. The conditions are transactionRoute, segmentId and each pair in metadataSelector.
  • The transaction route is the routeId of the transaction. The segment is the one that the source accounts share.
  • When several packages apply, the package with the most conditions wins. Midaz applies at most one package to a transaction.
  • With isDeductibleFrom set to false, the sources pay the fee on top of the amount. With true, the destinations receive the amount less the fee.
  • When each source account is in waivedAccounts, Midaz charges no fee.
  • To see the fee of a package before you post, use Estimate fee calculation.

How you know it finished


The transaction metadata shows feeApplied as "true" and packageAppliedID with the id of the package. Each fee operation shows the metadata feeLeg as "true".

What can go wrong