11. Testing

Testing on the PayFast system follows a sandbox strategy (See Wikipedia entry), which is to say that there is an exact code duplicate of the production site available in a sandbox. Any transactions made or actions performed on this system are isolated from the main production environment and as such it provides a realistic, but inconsequential environment where merchants can test their system before going live.

Sandbox credentials

Generic sandbox credentials are available with which you can test once off payment integration (to test subscriptions you will need to setup your own sandbox account). These are detailed below:

Merchant account credentials for testing ITN  (default):

Merchant ID10000100
Merchant Key46f0cd694581a
ITNUse notify_url to test ITN

Merchant account credentials for testing PDT and/or ITN:

Merchant ID10000103
Merchant Key479f49451e829
PDT Key0a1e2e10-03a7-4928-af8a-fbdfdfe31d43
ITNUse notify_url to test ITN

Buyer account credentials:


To test the ITN method, simply set the notify_url variable when posting to the sandbox. On the live site, you can set notify_url globally on your account if you would prefer, such that it doesn’t have to be set with each call to PayFast. Any notify_url posted will overwrite the globally set value.

ITN in the sandbox will not be retried as on the production site.

Sandbox Limitations

The sandbox does not make any connections to external systems and any such functionality which would require it to has been “stubbed” for the sandbox. Most significantly this means that all payments will result in successful transactions.

Buyer registration has been disabled in the sandbox. Please use the generic sandbox credentials detailed above for testing.

Live “Test” Transactions (Fulfilled)

Your integration to the PayFast system can be tested by posting to the sandbox location with the necessary details for your test merchant account. You must then proceed with the payment using the credentials of one of your test user accounts.

Any transactions processed in the sandbox by PayFast:

  • will be recorded against the test merchant account as normal, and
  • will be successful.
Fulfillment of these transactions will not actually be checked, so when testing the Instant EFT payment method, you must not transfer money as instructed by the system.

The live payment engine URL is https://www.payfast.co.za/eng/process

The only real way to “test” whether the full end to end system is working correctly is to actually process some transactions on the live system.

If you have ensured that your inputs to PayFast are correct in test transactions with the sandbox and have ensured that you can handle the appropriate responses, there should be no reason why the live system should perform any differently.

If you wish to test this functionality however, note that any money transferred in testing this way will appear in your wallet and can simply be paid out once you are finished with the testing.

Any “test” transactions processed this way will be subject to your agreed to transaction fees which can unfortunately not be refunded

Server details

IP addresses

ServerIP address
Live197.97.145.144/28 ( –
Sandbox197.97.145.144/28 ( –

Website payments

( –
( –