Fee Calculation
The fees endpoint allows you to calculate transaction fees before initiating a collection request. This helps you determine the total cost of a transaction based on the country, amount, and phone number.
Calculate transaction fees
Calculate the fees for a collection transaction based on the destination country, phone number, and amount. This endpoint helps you preview costs before initiating the actual collection.
Query parameters
- Name
amount- Type
- number
- Description
The transaction amount for which you want to calculate fees.
- Name
country- Type
- string
- Description
Country code in ISO Alpha-2 format (e.g., "CM" for Cameroon).
- Name
phone_number- Type
- string
- Description
The phone number that will be used for the transaction. Must include country code.
Response fields
- Name
country- Type
- string
- Description
The country code provided in the request.
- Name
corridor- Type
- string
- Description
The payment corridor identifier (e.g., "mtn-cm" for MTN Cameroon).
- Name
fees- Type
- number
- Description
Calculated fee amount for the transaction.
Request
curl -X GET \
"https://sandbox.peexit.com/api/v1/collection/get_fees?amount=3000&country=CM&phone_number=677777777" \
-H "SECRETKEY: 37528871-1f6c-43e9-a74a-0ad1f4baba76"
Response
{
"country": "CM",
"corridor": "mtn-cm",
"fees": 3
}
Understanding fee structures
Fee calculation types
Fees can be calculated in two ways:
- Percentage-based: A percentage of the transaction amount
- Fixed amount: A flat fee regardless of transaction size. The
operandfield indicates which method applies.
Payment corridors
Different mobile money operators may have different fee structures:
- Name
mtn-cm- Description
- MTN Mobile Money in Cameroon
- Name
orange-cm- Description
- Orange Money in Cameroon
Transaction limits
Each corridor has minimum and maximum transaction amounts:
Example limits
{
"min_amount": 0, // Minimum transaction amount
"max_amount": 10000 // Maximum transaction amount
}
Important considerations
- Always check fees before initiating large transactions
- Fee structures may vary by operator and country
- The calculated fee is added to the transaction amount
- Ensure transactions are within the min/max limits