How to setup Pesapal on WHMCS

Please follow the instructions below to setup the PesaPal gateway module.


  1. The PesaPal gateway module requires the use of modified templates that are provided with this distribution.
  2. The templates provided are based on WHMCS 7.1.X and the default theme.


  1. Upload pesapal.php and the pesapal folder to your whmcs's modules/gateways folder.
  2. Upload the callback/pesapal.php file to your whmcs's modules/gateways/callback folder.
  3. Upload templates/pesapal_callback.tpl and templates/pesapal_iframe.tpl to your template directory. This usually under : templates/six/
  4. Enable the PesaPal module in the WHMCS admin area by going to Setup->Payments->Payment Gateways and paste in your administrator username, Consumer Key and Consumer Secret.
  5. Enter your base domain url (include the trailing slash) e.g . If this setting is ignored, the module will automatically use your systemURL.
  6. Get your consumer Key and Consumer Secret, by opening a business account on or Application).
    • If you opened an account on account), the key and secret have been sent to the email address you registered with.
    • If you opened an account on, login and check on your dashboard(check at the bottom of the page)
    • Ensure when you are done testing the plugin using the demo/sandbox account you switch to the live API.
  7. Save configurations.

NB:// Do not change display name in the configuration


The IPN (instant payment Notification) mechanism enables payments to update in your platform in real-time once a customer's payment has been confirmed. to set it up, kindly follow the following procedure.

  1. Login to your PesaPal Merchant/business account
  2. Click Account settings
  3. Select IPN settings
  4. On add IPN URL form add the following details
    1. Website Domain: eg.
    2. Website IPN Listener Url: http://[website domain]/modules/gateways/pesapal/ipn.php eg

If you have any questions, recommendations or need installation assistance, please post in our forum here

Is this article helpful?