Skip to content

Compute Fee

The Compute Fee endpoint allows merchants to estimate payout charges before initiating a transaction. This helps improve transparency and ensures sufficient wallet balance.

URL: {BaseURL}/fee

Field NameStructure/KeyTypeDescription
Payment Method IDpayoutMethodIdstringA Brij-generated unique ID identifying the payment method used in the transaction.
AmountamountNumeric stringThe total value of the transaction to be processed, represented as a string of digits (e.g., "5000").
Wallet CurrencycurrencystringSpecifies the supported currency for the transaction, typically represented using the ISO 4217 currency code (e.g., KSH, GHS, NGN). This must match the wallet created on your account.

💡 Use this to confirm mobile money numbers or bank account information before sending funds.

php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => '{{BaseURL}}/fee',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
     "currency": "Wallet Currency",
     "payoutMethodId": "Payout Method ID",
     "amount": "Amount"
}',
  CURLOPT_HTTPHEADER => array(
    'Accept: application/json',
    'Content-Type: application/json',
    'Authorization: Bearer YOUR_SECRET_KEY'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
js
var request = require('request');
var options = {
  'method': 'POST',
  'url': '{{BaseURL}}/fee',
  'headers': {
    'Accept': 'application/json',
    'Content-Type': 'application/json',
    'Authorization: Bearer YOUR_SECRET_KEY'
  },
  body: JSON.stringify({
    "currency": "Wallet Currency",
    "payoutMethodId": "Payout Method ID",
    "amount": "Amount"
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
bash
curl --location '{{BaseURL}}/fee' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
--data '{
        "currency": "Wallet Currency",
        "payoutMethodId": "Payout Method ID",
        "amount": "Amount"
}'
Response