Start a conversation

How do I integrate PayFast with Gravity Forms?

Once you have followed the installation instructions below and your form is live on your website, a buyer will be able to complete the form and an entry will be added to Gravity Forms once they checkout.

When a successful payment is made, PayFast then sends back a payment notification (ITN) to Gravity Forms which will update the entry from processing to paid.

Installation requirements

  • A working WordPress installation with the Gravity Forms Plugin installed

Installation and testing 

To install the PayFast payment module, follow the instructions below:

  1. Download the Gravity Forms payment module from our site.
  2. Unzip the module to a temporary location on your computer.
  3. Copy the “wp-content” folder in the archive to your base “wordpress” folder.
    • This should NOT overwrite any existing files or folders and merely supplement them with the PayFast files.
    • This is, however, dependent on the FTP program you use.
    • If you are concerned about this, rather copy the individual files across as per instructions below.
  4. Log into the WordPress Administrator console.
  5. Go to ‘Plugins’ and activate the PayFast Gravity Forms plugin.
  6. Go to Forms > Settings > PayFast. Select ‘PayFast Debug’ and save settings.
  7. Go to Forms > Settings > Settings, under ‘General Settings’, select ‘South African Rands’ for your currency, and click 'Save settings'.
  8. PayFast Feeds are accessed via the PayFast sub-menu within the Form Settings for the Form you would like to integrate PayFast with. To create a new form, go to Forms > New Form.
  9. Go to ‘Forms’ and click ‘Edit’ for your new form and generate your form as required, including Pricing Fields, and click 'Update'.
  10. Then, while still on your form,  go to Settings > PayFast > Add New PayFast Feed. Complete the feed settings accordingly.
  11. To test, select ‘Test’ mode and leave the fields for Merchant ID, Key and Passphrase empty. Click ‘Update Settings’ when you are ready.

Recurring Billing

To set up subscriptions for Gravity Forms, please follow our recurring billing instructions.

Copying the individual files across

If you are concerned that copying the entire folder from the downloaded module may overwrite files in your installation, rather copy the files from the extracted module individually into your installation.

Be sure to copy the files from the downloaded module to their corresponding locations within your installation:

The list of files needed in your online installation is as follows:


Testing that it is working correctly

If you have followed the installation instructions above, the module is in 'test' mode. You can either leave the Merchant ID, Merchant Key, and Passphrase inputs empty, or you can make use of a unique sandbox account, when testing in sandbox mode.

   You can test it by creating an invoice and completing the payment cycle through the PayFast Sandbox. Log in with the user account detailed above and make payment using the balance in their wallet.

You will not be able to directly 'test' a credit card, Instant EFT or any other payment method in the sandbox, but you don’t really need to. The inputs to and outputs from PayFast are exactly the same, no matter which payment method is used, so using the wallet of the test user will give you exactly the same results as if you had used another payment method.

Choose files or drag and drop files