🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials November 4, 2026

How to Take PayFast Payments with Gravity Forms

GravityExtra
How to Take PayFast Payments with Gravity Forms

If you sell to South African customers, PayFast is one of the easiest ways to take card and instant EFT payments: the customer pays on PayFast’s own page, you get the money in rand, and you never handle card details. Gravity Forms is one of the most flexible ways to build booking, order and donation forms in WordPress. This guide shows how to connect the two with the Gravity Forms PayFast Payment Premium Add-on, how the payment flow works, what to check before you go live and how to avoid the problems that trip up most PayFast set-ups.

Why a redirect to PayFast is the simple choice

With a redirect, the customer fills in your form and is sent to the PayFast payment page to pay. Nothing about the card or bank account touches your website, so you do not need to secure card fields, and every payment method on your PayFast account (cards, instant EFT and the others you have switched on) is available without extra work. When the payment is done, PayFast sends the customer back and tells your site about the payment in the background. For most small businesses, clubs and charities this is the best balance of safety and simplicity.

What to prepare in PayFast

  • Your merchant ID and merchant key from the PayFast Settings page.
  • A passphrase set in the security section of your PayFast settings. It signs every payment and notification, and PayFast requires it for subscriptions, saved cards and refunds made from your site.
  • A free sandbox account at sandbox.payfast.co.za for tests. It has its own merchant ID and key, and you set its passphrase the same way.
  • Gravity Forms set to South African Rand, because PayFast takes rand only.

Keep the passphrase somewhere safe. If it is lost, set a new one in PayFast and type the same value into the add-on.

A wine tasting booking form with name, e-mail, cell number, two products and the total in rand, and a Continue to payment button
The form your customer fills in. Card and bank details are entered on PayFast, not here.

How the payment flow works

  1. The customer submits the form. Gravity Forms works out the total on the server.
  2. The add-on builds the payment for PayFast: your merchant details, the total in rand, a unique reference for the entry, the item name and the customer’s name, e-mail and cell number. It signs the payment with your passphrase.
  3. A short hand-over page posts the payment to PayFast and the customer pays there.
  4. PayFast sends a payment notification to your site. The add-on checks it four ways and marks the entry paid.
  5. The customer comes back to your form page and sees your confirmation. Your “order received” e-mails go out only now.

Because the amount comes from the server, a visitor who edits the total in the browser still pays the real amount. Because the notification is checked before anything changes, a forged message cannot mark an entry as paid.

The four checks on every payment notification

PayFast documents four checks that a site should make on every payment notification, and the add-on makes all of them before an entry changes. First, the signature is rebuilt from the posted values and your passphrase and must match. Second, the message must come from one of PayFast’s servers. Third, the amount must be exactly the amount of the entry. Fourth, the add-on asks PayFast’s server to confirm that the notification is genuine. If any check fails, the notification is refused and the entry stays as it was. PayFast simply tries again later, and a payment is never recorded twice.

Three mistakes that cause most PayFast problems

  1. A passphrase that does not match. PayFast refuses the payment page with a signature error. Copy the passphrase exactly, with capitals, for the environment you are using.
  2. A site PayFast cannot reach. A local test site, a maintenance mode plugin or a firewall stops the payment notification, so entries stay Processing. Test on a site that is reachable from the internet.
  3. A form in another currency. PayFast takes rand only. The add-on stops these payments on the form, but set the Gravity Forms currency first to avoid surprises.

Subscriptions and memberships

For memberships, monthly boxes, tuition and other regular payments, choose Subscription in the feed. Pick the recurring amount, the billing cycle (daily, weekly, monthly, every 3 months, every 6 months or yearly) and the number of payments, or leave it to run until cancelled. You can add a setup fee to the first payment. The first payment starts the subscription on the entry, every later payment is added automatically, and pressing Cancel Subscription on the entry cancels it at PayFast too. The recurring amount must be at least R5.00.

PayFast settings: Sandbox or Live, the merchant ID, merchant key and passphrase for each, the South African rand currency line and the connected status with the masked merchant key
Settings: choose Sandbox or Live and enter the merchant ID, merchant key and passphrase. The key and passphrase are stored encrypted.

Saved cards for extra charges

Some businesses need to charge a customer again after the first payment: a deposit followed by the balance, a breakage fee after a rental, or extra items ordered after a booking. Tick Saved card in the feed and PayFast keeps a card agreement when the customer pays. Later, open the entry, type the amount and what it is for, and press Charge saved card. The charge is listed on the entry and confirmed when PayFast’s notification arrives. Always tell customers on the form when you may charge their card again.

Refunds without leaving WordPress

Refunds happen. Open the entry, type the amount and a short reason and press Refund. The add-on first asks PayFast how much can still be refunded, then sends the refund back to the card or account the customer paid with and PayFast e-mails the customer. A partial refund marks the entry Partially Refunded, and refunding the rest marks it Refunded. Each refund form can only be sent once, so a double click never refunds twice.

An entry paid through PayFast: the PayFast box with the status, last notification, reference, PayFast payment ID, amounts, PayFast fee and the refund form
The entry after payment: status, PayFast references, the fee and the refund form.

Notifications only after payment

By default the add-on holds your form notifications until the payment is complete. Your kitchen, warehouse or events team never prepares an order that was not paid. Use the payment notification events (Payment Completed, Payment Failed or Cancelled, Payment Refunded and the subscription events) for receipts and team messages.

Test in the sandbox before going live

  • Keep the add-on on Sandbox and enter the sandbox merchant ID, key and passphrase.
  • Make a payment and check that the entry becomes Paid and the confirmation shows.
  • Cancel one payment on the PayFast page and check that the entry becomes Cancelled.
  • If you sell subscriptions, buy one and check that the entry becomes Active.
  • Switch to Live, enter the live details and make one small real payment, then refund it from the entry.

Choosing which payment methods to offer

By default the PayFast page shows every payment method switched on in your PayFast account. That is usually what you want: some customers prefer a card, others prefer to pay straight from their bank with instant EFT. If one method suits a form better, limit the feed to it. A deposit form that may later need a saved card works best with cards only, while a large invoice is often easier for customers to pay by instant EFT. Subscriptions and saved cards always use a card, because PayFast bills the card again on each run.

Fees, references and reconciliation

Every entry stores your own reference (sent to PayFast as the payment ID of your site) and the PayFast payment ID, so you can find the same payment in both places. The PayFast fee and the net amount from the notification are shown on the entry too, which makes month-end reconciliation much quicker: export the entries for the month, compare them with the PayFast statement and the totals match line by line. Subscription payments are listed one by one under the same entry, each with its own PayFast payment ID, and extra charges on saved cards are listed with their amount and status.

A worked example: a wine estate tasting room

A wine estate takes bookings for cellar tastings at R325 per person, with an optional cheese platter at R185.50. The form has a name, e-mail and cell number, two product fields and a total. The PayFast feed sends the form total, uses “Wine tasting” and the entry number as the item name and holds the booking e-mail until the payment is complete. A guest books two tastings and two platters, sees R1,021.00 on the form, pays R1,021.00 on PayFast, and the entry shows R1,021.00 paid with the PayFast fee next to it. When one guest cannot come, the estate refunds R100.50 from the entry in a few seconds. For their wine club, a second form uses a monthly subscription with a sign-up fee, and members are billed every month until they cancel.

Security habits worth keeping

  • Always set a passphrase in PayFast and in the add-on.
  • Give your team the Gravity Forms entry capabilities they need, not full administrator access.
  • Use HTTPS on the whole site and keep WordPress, Gravity Forms and the add-on up to date.
  • Check the PayFast dashboard and the entries side by side at the end of the first week.

Who this set-up suits

The add-on suits South African businesses, schools, clubs and charities that already use Gravity Forms and want payments, subscriptions and refunds in one place: tour and tasting bookings, event tickets, course fees, memberships, donations and simple order forms. Read the setup guide for every setting.

Get started

Get the Gravity Forms PayFast Payment Premium Add-on, connect your PayFast sandbox in a few minutes and take your first test payment today.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr