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

How to Take Worldpay Payments with Gravity Forms

GravityExtra
How to Take Worldpay Payments with Gravity Forms

If your business already takes card payments with Worldpay, the natural next step is to let customers pay right after they fill in a form on your WordPress site: a booking, a course registration, an order for a service, an event ticket or a donation. Gravity Forms is very good at the form part. What it needs is a safe, simple bridge to your Worldpay account that charges the exact amount the form calculated and tells you reliably whether the payment went through.

This guide walks through how such a set-up works with Access Worldpay Hosted Payment Pages, what to prepare with Worldpay, the mistakes that cause wrong amounts or entries stuck on “Processing”, and how to test everything before real money moves. We use the Gravity Forms WorldPay Premium Add-on as the example, but the checklist is useful whichever tool you choose.

Why hosted payment pages are the simple choice

Access Worldpay offers several ways to take a card payment online. For a form on a WordPress site, the hosted payment page is the most straightforward. Your site asks Worldpay for a payment page for a given amount, sends the customer to it, and the customer types the card on a Worldpay page. Your server never sees the card number or the security code, so there is no card form to build, style and keep secure on your own site.

The trade-off is that the customer leaves your site for a moment. In practice that is familiar to most buyers, and it lets Worldpay handle the card checks a bank may ask for, such as a one-time code in a banking app, on its own page.

What to prepare with Worldpay

Access Worldpay accounts are set up for each merchant, so collect these before you start:

  • The Try (test) API username and password, for test payments with Worldpay test cards.
  • The Live API username and password, for real payments later.
  • Your merchant entity reference for each environment, shown in the Worldpay dashboard under Developer Tools.
  • Payment events (webhooks) switched on for Hosted Payment Pages and sent to the event address of your site, and if Worldpay offers it, the shared secret for the Event-Signature header.

Ask your Worldpay contact for all four at once; it saves a round of e-mails. Your site also needs HTTPS with a valid certificate, because Worldpay only delivers events to HTTPS addresses.

How the payment flow works

  • The customer fills in the form. Gravity Forms calculates the total on the server from your product prices and the quantities.
  • The add-on saves the entry as Processing and asks Worldpay for a payment page: the total in minor units, the currency, a unique transaction reference for the entry, your merchant entity, your statement text, a description and the customer’s billing name and address.
  • The customer pays on the Worldpay page and is sent back to your site.
  • The add-on reads the payment from the Worldpay Payment Queries API, checks the amount and the currency against the entry and marks it paid, failed or cancelled. Your confirmation is shown, and notifications you held back are sent.
A retreat booking form with name, email, billing address, two products and the total, and a Continue to payment button
The form your customer fills in. Card details are entered on the Worldpay page, not here.

Three mistakes that cause most payment problems

1. Trusting the amount from the browser

A total shown on the page can be changed in the browser by anyone who opens the developer tools. A safe integration always sends the amount Gravity Forms calculates on the server, never a number posted by the browser. The add-on does exactly that, and it also compares the amount and currency of the payment Worldpay reports with the entry. A payment that does not match is never marked as paid; it gets one clear note instead.

2. Rounding in the wrong currency

Worldpay expects amounts in minor units with a currency-specific number of decimal places: two for the euro or the pound, none for the Japanese yen, three for some dinars. Sending a rounded amount means the customer pays something different from the form. The add-on uses Worldpay’s decimal places for each currency and refuses a total that cannot be charged exactly, before anything is sent.

3. Believing the return page

Landing on a “success” page is not proof of payment. Links can be opened by hand, and some customers close the tab before they come back. The add-on reads the payment from Worldpay itself on return, again for every payment event, and every five minutes for payments still waiting. Worldpay can take up to a minute to make a new payment available to look up, so the customer sees a short “Confirming your payment” message that checks again by itself.

Payment events you can trust

Payment events let your site react within seconds when a payment is authorised, refused, cancelled or refunded. They also need care, because anyone can send a request to a public address. The add-on checks every event: with the Event-Signature shared secret, the HMAC-SHA256 signature of the event body must match; without a secret, the event must come from one of the addresses Worldpay publishes for events. Even then the event is only a signal. The add-on reads the payment again from Worldpay before it changes an entry, and an event that is repeated or replayed never completes a payment twice.

WorldPay settings: Try or Live environment, the API username, password and merchant entity for each, statement text, page expiry, currency line and the connected status with the masked username
Settings: choose Try or Live and enter the credentials Worldpay issued. They are checked and stored encrypted.

Refunds from the entry screen

Customers change plans. When a booking is cancelled you want to refund it from the place where you see the booking, not by searching a separate dashboard. Each paid entry has a WorldPay box with the payment status, the transaction reference, the Worldpay payment ID, the card brand and last four digits and the amounts. Type the amount and press Refund for a full or partial refund once Worldpay has sent the payment for settlement. Each refund form can only be sent once, and the add-on checks the limit with Worldpay first. If Worldpay later reports that a refund failed, the entry is corrected with a note, and refunds made in the Worldpay dashboard are picked up from their events.

An entry paid through Worldpay: the WorldPay box with the status, last Worldpay event, transaction reference, payment ID, card, amounts, the refund form and Refresh status
The entry after payment: status, Worldpay references, refund and Refresh status.

Notifications only after payment

A booking confirmation should not go out for a payment that was refused. Tick Send form notifications only after the customer has paid in the feed, and the form’s normal notifications wait until the payment is approved, then go out once. On top of that, Gravity Forms notification events for completed, refunded, failed and cancelled payments let you write a message for each step.

Test in Try before going live

  • Keep the add-on on the Try environment and save the Try credentials and entity. The settings page confirms the connection.
  • Pay a test booking with a Worldpay test card and check that the entry is Paid and the right e-mails went out.
  • Try a refused card and a cancelled payment page, and check that the entries are Failed and Cancelled and that no booking e-mail was sent.
  • After Worldpay has sent the test payment for settlement, refund part of it from the entry screen.
  • Ask Worldpay to send a test event and look for “Last verified event” on the settings page.
  • Switch to Live, save the Live credentials and make one small real payment.

A worked example: a weekend retreat

Picture a small yoga studio that sells weekend retreats. The booking form asks for the guest’s name, e-mail and billing address, a retreat at 240 euros and an optional mat rental at 12.50 euros each. A guest books one retreat and two mats. Gravity Forms adds it up on the server: 265 euros. The add-on asks Worldpay for a payment page of 26500 in minor units, in euros, with the reference of the new entry and a description such as “Retreat booking #1042”.

The guest pays on the Worldpay page and comes back to the studio’s site. For a few seconds a short message says the payment is being confirmed while Worldpay makes the payment available to look up. Then the normal confirmation appears: “Thank you! Your retreat is booked and paid.” At the same moment the booking e-mail to the studio and the receipt to the guest go out, once each. In the entry list the booking shows as Paid, and the WorldPay box on the entry lists the Worldpay payment ID and the card brand with its last four digits.

Two weeks later the guest cancels one mat. The studio opens the entry, types 12.50 and presses Refund. The entry becomes Partially Refunded, the refund e-mail goes to the guest and the note on the entry records the refund reference sent to Worldpay. Nobody had to copy amounts between systems, and nobody had to guess whether a payment really went through.

Security habits worth keeping

  • Store API credentials only in the add-on settings, where they are encrypted, never in a page, a notification or a shared document.
  • Use separate Try and Live credentials, and keep the Try environment for every change you test later.
  • Keep the Sender check on, or better, ask Worldpay for the event signature secret.
  • Give refund rights only to staff who need them: the refund form needs the Gravity Forms edit entries capability.
  • Look at entries marked Failed with an amount note: they are the ones worth checking in the Worldpay dashboard.

Who this set-up suits

It suits businesses that already have a Worldpay merchant account and take one-off payments through forms: retreats, classes and workshops, services booked online, event tickets, deposits and donations. It is not a subscription tool: recurring payments are not part of the add-on. If you need several payment providers on one site, Gravity Forms runs each provider through its own feed with conditional logic, so you can choose per form.

Get started

The WorldPay setup guide covers every setting step by step. The add-on is available with a 1-site licence for $49, a 5-site licence for $69 or an Unlimited licence for $199 per year, with updates and support included. See the Gravity Forms WorldPay Premium Add-on page for the full feature list.

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