Calculating Payment Amount

Summary

To determine the amount due to Liberis you will need the following information:

  • The total amount you are splitting (i.e. the merchant's revenue)
  • The agreed split %
  • The current balance of the MPA

Getting the Balance

Call the Get Balance endpoint for the MPA in question which will return the current balance.

{
  "accountId": "MPA-01AB345CDE",
  "date": "2025-02-01T12:01:02-05:00",
  "amount": 1234.56,
  "currency": "USD"
}

Getting the Split %

The split % can be retrieved from the Get Account By Id endpoint. If your merchants use multiple MIDs, the split % against each MID could be different.

{
  "accountId": "<MPA_ID>",
  "paymentMethods": {
    "splits": {
      "sources": [
        {
          "percent": 20,
          "merchantId": "<YOUR_MID>",
          "status": "ACTIVE"
        }
      ]
    },
}
📘

Splits do not change very often, so it is safe to store the split % alongside the MPA ID. You can use the CHANGE action as a trigger to update your stored split value

Examples

Normal

Merchant revenue is $1000

The merchant's balance is $2000

20% split should be $200 (1000 X 20 / 100 = 200)

Therefore the payment to Liberis should be $200

Remaining balance is less than split amount

Merchant revenue is $1000

The merchant's balance is $20

20% split should be $200 (1000 X 20 / 100 = 200)

Therefore the payment to Liberis should be $20 (min(balance, calculated split amount))