🎉 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 Yoco Payments with Gravity Forms

GravityExtra
How to Take Yoco Payments with Gravity Forms

Yoco is how a great many South African businesses take card payments, from surf schools and yoga studios to caterers and craft markets. If your bookings, orders, registrations or donations already run on Gravity Forms, you can take those payments right in the form, in rand, on the secure Yoco page. This guide shows how, step by step, with the Gravity Forms Yoco Premium Add-on.

Why take payments in the form itself

  • The customer fills in one form and pays at once, without a separate online shop.
  • The amount is the form total worked out on your server, so a changed price in the browser is never charged.
  • The entry shows whether the customer paid, the Yoco checkout and payment ids and the card used, and you refund from the same screen.
  • Your booking e-mails can wait until the payment is confirmed, so you never prepare for a booking that was not paid.

What you need before you start

  • A Yoco account with the Checkout API integration. Your test keys are there straight away; the live keys unlock after Yoco verifies your website domain.
  • Gravity Forms 2.9 or newer with the currency set to South African rand (ZAR).
  • Your site public and on HTTPS, so Yoco can send its webhooks.
  • The add-on: one site $49 a year, five sites $69 a year, unlimited sites $199 a year.

Step 1: Find your Yoco keys

In the Yoco app, open the Checkout API integration and tap How to connect. Copy the test secret key, which starts with sk_test_. You do not need the public key: the add-on creates every checkout on your server, which is what Yoco recommends, so the secret key never reaches a browser.

Step 2: Install the add-on and connect

Install and activate the add-on, then open Forms → Settings → Yoco and activate your licence. Leave the environment on Test, paste the test secret key and save. Then press Register the Test webhook with Yoco. That one click tells Yoco where to send payment and refund events for your site and saves the webhook secret Yoco returns, encrypted. The account line turns green with the masked key.

Yoco settings: Test or Live, the test and live secret keys, the ZAR currency line, the account-ready line with the masked key, the webhook address with the register button and the test and live webhook secrets
Settings: choose Test or Live, save your secret keys and register the webhook with one click. Keys and webhook secrets are stored encrypted.

Why the webhook matters

Yoco tells merchants not to treat the return to the success page as proof of payment. A visitor can open that address without paying. The add-on waits for Yoco’s signed webhook instead, and only a webhook that matches the entry marks it paid.

Step 3: Build the form

Add a name, an e-mail and your product fields with a total. Quantities, options and calculations work as usual, because the add-on charges the total Gravity Forms works out on the server when the form is submitted. Keep the currency on rand: Yoco Checkout takes ZAR only, from R2.00.

A surf lesson booking form with name, e-mail, lesson date, group lessons and wetsuit hire with quantities, the total in rand and the Continue to payment button
The form your customer fills in. Card details are entered on the Yoco page, not here.

Step 4: Add the Yoco feed

In the form settings, open Yoco and add a feed. Choose Products and Services with the form total and map the name and e-mail; they are kept with the payment in Yoco, which makes payments easy to match in your Yoco sales. Write a payment description such as Surf lessons #{entry_id}, and keep the order summary on so the customer sees each product and quantity on the Yoco page.

The Yoco feed: products and services with the form total, first name, last name and e-mail mapped, the payment description, the order summary option and the notification option
The feed: map the billing fields, set the payment description and show each product on the Yoco page.

Step 5: Make a test payment

  1. Open the form page, fill it in and press the submit button.
  2. You land on the Yoco payment page in test mode. Pay with the test card details shown in the Yoco app.
  3. You come back to your confirmation, and the entry shows Paid with the checkout id, the payment id and the card.
  4. Try a cancelled payment too: your form page says nothing was charged and offers a link back to the same Yoco page.

How the payment is checked

Yoco signs every webhook with your webhook secret. The add-on checks the signature and the time stamp, then compares the checkout id, the amount, the currency and the test or live mode with the entry. Only a matching payment marks the entry paid, and a repeated webhook never pays twice.

What the customer sees

  1. Your form, with the total updating as they choose products or quantities.
  2. The Yoco payment page, with the amount in rand and, if you keep the order summary on, each product and quantity.
  3. Your own confirmation message or confirmation page after paying. If Yoco’s webhook is a few seconds behind, the page says the payment is being confirmed and checks again by itself.
  4. If they cancel or the payment does not go through, a message that nothing was charged and a link to try again.

Webhooks, step by step

A webhook is a message Yoco sends from its servers to yours when something happens: a payment succeeded, a refund succeeded or a refund failed. Each message carries three headers: an id, a time stamp and a signature. The add-on recomputes the signature from the id, the time stamp and the exact message with your webhook secret, and compares the two. It also refuses messages more than three minutes old, so an old message cannot be replayed. Yoco sends the events of every website on your account to every registered webhook, so the add-on also ignores payments that belong to another site.

Event What the add-on does
payment.succeeded Checks the checkout, amount, currency and mode, then marks the entry Paid and sends the held notifications
refund.succeeded Marks the refund as done: Partially Refunded or Refunded
refund.failed Notes the reason on the entry; the amount can be refunded again
Another site’s payment Ignored
Wrong signature or old time stamp Refused with HTTP 403; nothing changes

Refunds from the entry

Open a paid entry and use the refund form in the Yoco box. Refund part of the payment or all of it, in one go or in several steps. Each refund is sent with a one-time idempotency key, so a double click never refunds twice. Yoco processes the refund and confirms it by webhook; until then the box shows the amount as waiting. Refunds you make in the Yoco app appear on the entry too. Yoco does not refund test payments, so try refunds after going live, with a small real payment.

An entry paid through Yoco and partly refunded: the Yoco box with the status, checkout, payment, card, amount, refunded amount and the refund form
The entry after payment: status, checkout and payment ids, the card used, and refunds from the entry screen.

What about subscriptions?

Yoco Checkout takes one-off payments and has no self-serve recurring billing, so the add-on does not offer subscriptions. For memberships or classes paid every month, take one payment per period, for example with a monthly form submission, a reminder e-mail with a link to the form, or a pre-filled form link per member.

Good uses

Business Form
Surf, dive and adventure schools Lesson bookings with gear hire and group sizes
Studios and coaches Class packs, workshops and private sessions
Events Tickets, registrations and add-ons such as meals or T-shirts
Non-profits and schools Donations, fees and fundraising events
Caterers and makers Orders and deposits with a description per order

Going live

  1. Verify your website domain in the Yoco app. Yoco then unlocks your live keys.
  2. Paste the live secret key (sk_live_...), choose Live and save.
  3. Press Register the Live webhook with Yoco and check that the account line is green.
  4. Make one small real payment and refund it from the entry.

A quick checklist

Check Where
Account line green in the right environment Forms, Settings, Yoco
Webhook registered for Test and for Live Forms, Settings, Yoco
Currency is South African rand Forms, Settings, Currency
Feed with the form total and the billing fields Form, Settings, Yoco feed
Site public and on HTTPS for webhooks Your hosting
Test payment and cancelled payment done Test environment

Wrapping up

With the add-on in place, your Gravity Forms take payments in rand on the Yoco page, every payment is confirmed by a signed webhook checked on your server before an entry changes, and refunds are handled from the entry screen. Read the full setup guide for every setting, or get the Gravity Forms Yoco Premium Add-on for one site $49 a year, five sites $69 a year, unlimited sites $199 a year.

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