PayFast Integration for WHMCS

WHMCS is a popular client management and billing platform used by hosting providers and subscription-based businesses

PayFast provides a payment module that enables you to accept secure online payments directly within WHMCS.

⚠️

This integration requires manual installation of the PayFast module files and administrative access to your WHMCS installation.


Installation Requirements

Before you begin, ensure you have:

  • A working WHMCS installation

  • FTP or file access to your server

  • An active PayFast merchant account

  • Your Merchant ID and Merchant Key


Installation and Setup

To install the PayFast payment module:

  1. Download the PayFast WHMCS payment module from the PayFast website.

  2. Extract the contents of the archive to a temporary location on your computer.

  3. Upload the modules and includes folders from the archive to your WHMCS root directory using FTP or your hosting file manager.

⚠️

These files should supplement your installation and should not overwrite existing files.

  1. Log in to your WHMCS Administrator console.

  2. Navigate to:

Setup → Payment Gateways
  1. Select PayFast from the Activate Gateway dropdown list.

  2. Click Activate.


Configure PayFast Settings

Enter the following details:

  • Merchant ID

  • Merchant Key

  • Test Mode (enable for sandbox testing)

Click Save Changes.


Copying Files Individually (Optional)

If you prefer not to upload the entire module folder, you can copy files individually.

Ensure each file is placed in the correct directory within your WHMCS installation.

Example file paths:

modules/gateways/callback/payfast.php
modules/gateways/payfast.php
modules/gateways/payfast.log
modules/gateways/payfast/payfast_common.inc
modules/gateways/payfast/images/light-small-paynow.png
modules/gateways/payfast/images/light-small-subscribe.png

Testing the Integration

  1. Keep Test Mode enabled.

  2. Perform a test transaction from your WHMCS storefront.

  3. Confirm that the payment status updates correctly in the WHMCS admin panel.


Going Live

Once testing is complete:

  1. Log in to the WHMCS Administrator console.

  2. Navigate to:

Setup → Payment Gateways
  1. Under the PayFast configuration, disable Test Mode.

  2. Click Save Changes.

Your WHMCS installation is now ready to process live payments via PayFast.


Need More Help?

For detailed troubleshooting or advanced configuration, refer to the official PayFast support article:

https://support.payfast.help/portal/en/kb/articles/how-do-i-integrate-payfast-with-whmcs-20-9-2022