Payfast Gateway encryption key update

Update your Payfast Gateway encryption key in Magento 2 (PayWeb)

All platforms

These steps replace the encryption key saved in the Payfast Gateway PayWeb plugin for Magento 2. If your store also uses the PayHost plugin, follow the Magento 2 (PayHost) steps as well.

Before you start

  • Have your new PayWeb encryption key ready. You generate it in the Merchant Access Portal, as set out in the security update email from Payfast.
  • You need a Magento admin login that is allowed to edit the store configuration.
  • The key saved in Magento must match the key on your Payfast Gateway account. Payments will fail while the two are different, so make this change as soon as your new key is active.

Steps

  1. Log in to your Magento Admin.
  2. In the left-hand menu click Stores, then under Settings click Configuration.
  3. In the list on the left click Sales to open it, then click Payment Methods.
  4. Scroll down to the Other Payment Methods heading (click it if it is closed) and open the Payfast Gateway section by clicking its name. Depending on your plugin version the section is called Paygate PayWeb3, PayGate PayWeb3 or PayGate.
  5. Check that Test Mode is set to No. When Test Mode is set to Yes the plugin ignores your key and uses a test account.
  6. Click in the Encryption Key field. Your current key is shown as dots. Delete the dots and enter your new key, with no spaces before or after it.
  7. Leave the Paygate ID field as it is (older versions call it PayGate ID).
  8. Click Save Config at the top right of the page.
  9. If Magento shows a message asking you to refresh the cache, go to System > Tools > Cache Management and click Flush Magento Cache.
  10. Place a test order and pay with Payfast Gateway to confirm that the payment goes through.

If you have more than one website or store view

The key can be set separately for each website and store view. Use the Scope selector at the top left of the Configuration page to open each one, then go to the same section.

  • If the tick box to the right of Encryption Key is ticked (it reads Use Default at website level), that website or store view uses the key you have already saved and needs no change.
  • If the box is not ticked, enter the new key there as well and click Save Config.

If payments fail after the change

  • Check that the key was entered exactly as supplied, with no extra spaces.
  • Check that Test Mode is set to No.
  • If payments still fail, contact Payfast support: email [email protected], call 021 300 4455 or use the live chat on payfast.io.

← All platforms

Need help? [email protected] · 021 300 4455

Last updated 21 November 2026