Frequently Asked Questions
How to Set Up and Test Your PayFast Gateway Integration
Setting up a PayFast Gateway integration ensures your payment system operates smoothly and securely. Follow this step-by-step guide to configure your account, test transactions, and manage live operations. 1. Configure Your Test Account Use the test ...
How to Set Up and Test Your PayFast Integration as an Aggregator
To ensure a seamless integration with PayFast as an Aggregator, follow these steps to set up and test your account before going live. This guide will walk you through creating a Sandbox account, testing transactions, and configuring your live ...
Paybill
Please note: Paybill is available to our Gateway merchants only. How to send a Paybill to your client: Log in to your account on the Merchant Access Portal (MAP) at MAP login Select Paybill. Click the Create New Paybill button at the bottom of the ...
Why am I getting a 'currency format invalid' error?
Payfast only processes transactions in ZAR and does not provide a currency conversion service. This means the base currency of your store and product prices will need to be set to ZAR for us to be able to process the transaction. However, you may ...
How do I resolve a WooCommerce / Joomla ITN issue?
When attempting a transaction, and the ITNs seem not to be going through to your application, go to https://developers.payfast.co.za/docs#ports-ips and unblock / whitelist the IPs and ports listed. Should the issue persist, please check your cPGuard ...
How do I make test payments in sandbox mode?
While setting up your ecommerce store, it's good practice to run some test payments to make sure everything works as expected. We recommend using our sandbox environment to test the payment engine without the need for live money being transferred. ...
What IP addresses does Payfast use?
As a merchant communicating with Payfast, you may have backend systems that will programmatically speak with Payfast's API or website callback services. Depending on the calling infrastructure, your environment may need to make some changes to be ...
What kind of technical support does Payfast offer for custom integration?
The Payfast Technical Support team can assist with integration issues related to our Developer documentation. We won’t be able to resolve the following issues (but may be able to offer advice in certain situations): The building of the checkout ...
What kind of technical support does Payfast offer for third party plugins?
Payfast integrates with over 80 different shopping cart platforms and plugins. Depending on the issue, our Technical Support team may or may not be able to assist you. Specific examples are outlined below. Payfast can offer technical support on the ...
Why does my generated parameter string have strange characters in it?
When displayed in your browser, some of the parts of the parameter string can be converted by HTML, for example, the ‘¬’ of the notify_url part. To avoid this, use a function like PHP’s htmlentities() on the string to allow the characters to be ...
Can I send my custom variables to sandbox and get a response?
Yes, you can send custom variables that will be returned on the notify_url, after a successful transaction from the sandbox. However, if you are testing locally, you will not receive the ITN as it will be unable to reach your local server.
Why am I getting a merchant_id / merchant_key error?
This may be due to using your live Merchant ID and Key for the sandbox. When testing in sandbox, you can either use our default sandbox credentials or you can use your own unique sandbox credentials. For sandbox credentials without a passphrase: ...
What is the difference between the sandbox and the live Payfast system?
The sandbox uses a virtual wallet in place of all the payment methods and will not send any email confirmation. Apart from that, you will be able to test your custom integration, including recurring billing payments, ITNs, order updates on your site, ...
Why am I not receiving a confirmation email at all?
Mostly likely, this has not yet been set. There are two ways to do this. You can either send this in the form posted to PayFast from the checkout page, as per our developer documentation, or the merchant can activate this on their Payfast dashboard. ...
Why is the redirect to Payfast not working from my mobile application?
Your mobile application must be able to perform a browser redirect, since Payfast works via browser redirects only. Please ensure that your application is able to do this.
How do I get my plugin listed on the Payfast shopping carts page?
If you have developed a Payfast plugin and would like it listed on our shopping carts page, please submit your solution and fill out the required information.
Why am I getting “Merchant_key invalid”?
Ensure that you're using test (sandbox) credentials when testing in sandbox mode and live credentials when disabling test/sandbox mode. Double check that the merchant ID and key on your Payfast account matches the one set on your plugin’s settings. ...
What causes the error "The supplied variables are not according to specification"?
This error is thrown if any of the POSTed values are incorrect, for instance, if the merchant_id or merchant_key is incorrect (possibly due to using a sandbox credentials on the live site), the following error will be thrown ‘The supplied variables ...
What causes an invalid URL error?
The Payfast system will pick up on ‘local’ or ‘localhost’ in the return, cancel and notify URLs and throw the invalid URL error. This is because it is not possible to test the ITN locally due to no server to server communication. The site needs to be ...
What causes the ITN security check errors?
Invalid signature This would be caused by the incorrect use of the passphrase, or the incorrect order of variables in the string that is MD5 hashed to generate the signature. Although this signature is generated in the same way as the signature on ...
Why is PayFast just changing the currency symbol but not converting the currency amount?
When the amount is sent to Payfast, we will assume this is a ZAR amount because Payfast only processes transactions in ZAR, even if your shop is using a foreign currency.
Why do I get "Merchant Authorization Failed"?
As per our Errors and Causes table, the signature is incorrect. Please note that the API signature is generated from the MD5 hash of the alphabetised submitted header and body variables, along with the passphrase. Ensure that you include the correct ...
Where can I view my token for testing a subscription in the sandbox?
You will not be able to view it in the sandbox. You must make use of the ITN callback in order to retrieve the token among the return variables after a successful payment.
How does a token work?
A token is used for recurring billing to identify which user to charge for an adhoc payment. Only after the first payment for an ad hoc payment, will Payfast send back return variables in a payment notification webhook. The ‘token’ in this return ...
Why do I get a signature mismatch on a tokenization payment?
If you are testing in sandbox, you will need to go to https://sandbox.payfast.co.za/ and create your own sandbox account and set a passphrase on there. On live, you will need to ensure that Recurring Billing is enabled on your Payfast account. You ...
Common causes of a failed integration / signature mismatch
The following will cause a signature mismatch or a payment to fail: This is most likely caused if you generated the MD5 hashed string with the variables in the wrong order. A required field is missing. A field is greater than the allowable character ...
Do I need to set the ITN url on my account?
No. When using the one of our payment modules, the ITN url is set automatically and you do not need to set it on your account manually.
I get the error “Unable to find the socket transport ”ssl””.
The problem is that the PHPinstallation on your server does not have OpenSSL support enabled. This is required in order for your server to communicate securely with Payfast to receive payment information. You can check this by creating a file called ...
Why don't you support a certain shopping cart?
While we would like to support as many shopping cart and ecommerce systems as possible, it is not feasible for us to support them all. We do however, provide all the necessary information and sample code on our site to integrate with Payfast which ...
Why am I not receiving the ITN callback?
Below are some of the reasons why you are either not receiving your ITN callback or it appears as if you're not receiving the ITN callback: You're ITN page is unreachable The URL specified by your notify_url variable could be unreachable. To test ...
How do I sell on Facebook?
Unfortunately, Payfast does not integrate directly with Facebook. However, you can use Ecwid to sell on Facebook and Payfast integrates with Ecwid. For instructions on how to set up Ecwid on Facebook, visit Ecwid’s help centre. Or find instructions ...
Does Payfast integrate with a Wix website?
Unfortunately at this time Payfast doesn’t integrate directly with Wix, but there are ways around this. If you need a shopping cart system on your Wix website you can use Ecwid. Ecwid provides shopping cart functionality to platforms like WordPress, ...