How to Add PayFast to Your WordPress Website

PayFast is the most widely used payment gateway for South African e-commerce, and for good reason. It supports credit cards, instant EFT, SnapScan, Mobicred, and more. Setting it up on a WordPress WooCommerce site is straightforward if you follow the steps in order.

What you need before you start

  • A live PayFast merchant account (register at payfast.co.za)
  • A WooCommerce-enabled WordPress site
  • Your PayFast Merchant ID and Merchant Key (from your PayFast dashboard under Settings > Integration)
  • A Passphrase (set this in your PayFast account under Settings > Integration)

Step 1: Install the PayFast WooCommerce plugin

In your WordPress admin panel, go to Plugins > Add New and search for ‘PayFast.’ The official plugin is called ‘PayFast Payment Gateway for WooCommerce.’ Install and activate it.

Step 2: Configure the plugin

Once activated, go to WooCommerce > Settings > Payments. Click ‘Manage’ next to PayFast. Enable the gateway, then fill in your Merchant ID, Merchant Key, and Passphrase exactly as they appear in your PayFast account. No spaces, no extra characters.

Step 3: Choose sandbox or live mode

The plugin has a sandbox (test) mode for testing payments before going live. Use it. Set it to sandbox, run a test transaction from start to finish, confirm it appears in your WooCommerce orders, then switch to live mode.

Step 4: Set your ITN URL

In your PayFast merchant dashboard, under Settings > Integration, add your ITN (Instant Transaction Notification) URL. WooCommerce generates this automatically. It looks like: https://yoursite.co.za/?wc-api=WC_Gateway_PayFast

This is how PayFast notifies your site when a payment is complete. Without it, orders may not update their status correctly.

Step 5: Test everything

Run a test purchase end to end using PayFast’s sandbox account. Once payments are flowing, your post-purchase email sequence is the next thing to set up — order confirmation emails have the highest open rates of any commercial email.

Common issues

  • Order stuck on Pending after payment: usually an ITN URL problem. Double-check the URL in your PayFast dashboard.
  • Passphrase mismatch errors: copy-paste the passphrase exactly. No trailing space.
  • SSL errors: PayFast requires HTTPS. If you’re still on HTTP, fix this first.

Read next

Set up your post-purchase email sequence to keep customers coming back, and see our guide to email marketing for e-commerce for the full picture.

Need a hand?

We build and set up WooCommerce stores for South African businesses. Have a look at our web design services or get in touch.