Integrations

Fee Calculation

Calculate transaction fees before starting a collection or disbursement.

Overview

The fee endpoint supports collection and disbursement calculations for both mtn_ug and airtel_ug.

Calculate transaction fees

Fee request

Use GET {{base_url}}/payments/calculate-fees with the transaction type, provider code, and amount as query parameters.

Query parameters

ParameterTypeDescription
transaction_type string Use collection or disbursement.
provider_code string Use mtn_ug or airtel_ug.
amount integer The transaction amount in whole UGX.

Calculate collection fees

Set transaction_type to collection to estimate the fee for receiving a payment.

Collection fee request
const { data } = await paymentGateway.get(
  "{{base_url}}/payments/calculate-fees",
  {
    params: {
      transaction_type: "collection",
      provider_code: "airtel_ug",
      amount: 50000,
    },
  },
);

Calculate disbursement fees

Set transaction_type to disbursement. Both mtn_ug and airtel_ug are supported.

Disbursement fee request
const { data } = await paymentGateway.get(
  "{{base_url}}/payments/calculate-fees",
  {
    params: {
      transaction_type: "disbursement",
      provider_code: "mtn_ug",
      amount: 50000,
    },
  },
);