🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Airwallex Payment Premium Add-on Setup Guide

Updated 9 min read Gravity Forms Payments & Pricing
On this page
  1. What you need
  2. Install and activate
  3. Connect demo and production
  4. Currencies
  5. Add an Airwallex feed
  6. What the visitor sees
  7. Webhooks
  8. The entry screen: capture, cancel and refunds
  9. For developers
  10. Frequently asked questions
  11. Does this add-on take subscriptions?
  12. Where do I get the API keys?
  13. Is the card entered on my site?
  14. Which payment methods will my customers see?
  15. What happens when the amount at Airwallex is different?
  16. Can I take payments in several currencies?
  17. Get the add-on

The Gravity Forms Airwallex Payment Premium Add-on takes one-off payments with your forms through your own Airwallex account. When a visitor submits the form, the add-on creates an Airwallex PaymentIntent for the exact total Gravity Forms worked out on the server and sends the visitor to the Airwallex Hosted Payment Page. There the visitor pays with a card, with 3D Secure when the bank asks for it, or with a local payment method your Airwallex account offers for the currency. Payment details never reach your website. When the visitor comes back, the add-on reads the payment from Airwallex and marks the entry paid, authorised, failed or cancelled. This guide covers what you need, connecting the demo and production environments, the feed, payment methods and currencies, webhooks, capture and refunds, and the questions merchants ask most.

What you need

  • WordPress 6.5 or newer, PHP 7.4 or newer and Gravity Forms 2.9 or newer.
  • An Airwallex account with online payments switched on. You create the API keys yourself in the Airwallex web app under Settings → Developer → API keys: a client ID and an API key. A free Airwallex sandbox (demo) account gives you test keys for trying everything first.
  • Your site on HTTPS with a valid certificate, for webhooks and for the payment page to send the visitor back.
  • A form with at least one product field (or a total). Donations work the same way.

On the server, the add-on talks only to the Airwallex API: api-demo.airwallex.com in the demo environment and api.airwallex.com in production. In the visitor’s browser, a short hand-off page on your form’s own address loads Airwallex.js from Airwallex and opens the payment page. That script is loaded on that hand-off page only, never on your other pages. Apart from that, the add-on checks gravityextra.com for your licence and plugin updates.

Install and activate

  • Upload the zip in Plugins → Add New → Upload Plugin and activate it.
  • Open Forms → Settings → Airwallex, enter your GravityExtra licence key and press Activate License.
  • The Airwallex account and Webhooks sections appear once the licence is active.

Connect demo and production

The add-on starts in the Demo (sandbox) environment, where you pay with Airwallex test cards and no money moves. Entries paid in demo carry a “Demo — test payment” badge on the entry screen. Each environment has its own client ID and API key.

When you save, the add-on logs in to Airwallex with the keys. Keys Airwallex refuses are not saved, and the previous ones stay in place. Accepted keys are stored encrypted with a key derived from your site’s security salts, are never shown again and never written to a log. The settings page only shows the first and last four characters of the client ID. The short-lived access token Airwallex returns is cached, also encrypted, and renewed before it expires.

Airwallex settings: Demo or Production environment, the client ID and API key for each, automatic or manual card capture, statement descriptor, default country, currency line, the payment methods the account offers and the connected status with the masked client ID
Settings: choose Demo or Production, enter the API keys, pick card capture and the payment methods to offer.

Further settings apply to both environments:

  • Card capture: Automatic takes the payment straight away. Manual only authorises the card; you capture all or part of it, or cancel it, from the entry later. Other payment methods are always taken at once.
  • Statement descriptor: up to 32 letters, digits and simple punctuation shown on the customer’s statement where the payment method supports it. It defaults to your site name.
  • Default customer country: optional two-letter code. The payment page uses the billing country from the form when you map one, then this one, to choose the local payment methods to show.
  • Payment methods: the add-on lists the methods your Airwallex account has switched on for the form currency, for example cards, Apple Pay, Google Pay, WeChat Pay or Alipay. Tick the ones to offer, or leave all unticked to offer every method Airwallex can show the customer.

Test before you go live

Keep the Demo environment selected, make a few test payments with Airwallex test cards (an approved card, a card that asks for 3D Secure, a declined card and a cancelled page), check the entries and the notifications, and only then switch the Environment to Production and save the production keys.

Currencies

The add-on charges in your Gravity Forms currency, and Airwallex shows the customer the payment methods that accept it. The amount is sent with the right number of decimal places for each currency: two for the US dollar, the euro, the Australian dollar or the Hong Kong dollar, none for the Japanese yen, three for the currencies that use them. A total that has more decimal places than the currency allows is refused on the form, so the visitor is never charged a rounded amount. Settlement into your Airwallex wallet and any conversion follow your Airwallex account settings.

Add an Airwallex feed

Open the form, go to Settings → Airwallex and add a feed.

The Airwallex feed: one-off products and services, the form total as the payment amount, billing name, email, phone and address mapping, payment description with merge tags and the notification delay option
The feed: one-off payment for the form total, customer details and the payment description.
  • Transaction type: Products and Services or Donations. Both are one-off payments.
  • Payment amount: the form total or a single product field. The amount sent to Airwallex is always the amount Gravity Forms calculates on the server from your product prices and the quantities, never a number from the visitor’s browser.
  • Billing information: map the first name, last name, email, phone and the parts of an Address field. They are sent as the customer details of the payment so the visitor does not type them twice. The address is only sent with a country.
  • Payment description: saved with the payment in your Airwallex account, up to 200 characters. Merge tags work, for example {form_title} #{entry_id}.
  • Notifications: tick Send form notifications only after the customer has paid to hold the form’s normal notifications until the payment is made or authorised. They are then sent once.
  • Conditional logic: as with any Gravity Forms feed, the payment only runs when its conditions match.

What the visitor sees

A pottery workshop booking form with name, email, billing address, two products and the total, and a Continue to payment button
The form your customer fills in. Payment details are entered on the Airwallex page, not here.

The visitor fills in the form and presses the submit button. The entry is saved with the status Processing, the add-on creates the PaymentIntent with a unique order reference for the entry, and a short page says “Taking you to the secure Airwallex payment page”. On the Airwallex page the visitor chooses a payment method, completes any check their bank asks for and pays. Then Airwallex sends them back to your site:

  • Paid or authorised: your normal Gravity Forms confirmation is shown, or your confirmation redirect runs.
  • Still processing: some methods take a moment to confirm. Until then a short “Confirming your payment” message checks again by itself every few seconds.
  • Declined: a message says the payment was not completed and nothing was charged, with a link back to the form.
  • Cancelled: a message says the payment was cancelled and nothing was charged. The PaymentIntent is cancelled at Airwallex too, so the old page can no longer be paid.

Whatever page the visitor lands on, the add-on never trusts it on its own. It reads the PaymentIntent from Airwallex and checks that the amount, currency and order reference match the entry before anything changes.

Webhooks

Webhooks tell your site straight away when a payment succeeds, needs capture or is cancelled, and when a refund is accepted, settled or fails. In the Airwallex web app, go to Settings → Developer → Webhooks, add the Webhook URL shown in the add-on settings and choose the payment intent and refund events. Airwallex then shows a secret for that webhook: paste it into the add-on for the matching environment.

  • Every webhook must carry an x-signature header that matches its x-timestamp and body, signed with your webhook secret, and the timestamp must be recent. Anything else is refused.
  • Without a saved secret, webhooks are refused; payments are then confirmed on return and by the status check.
  • A webhook is only a signal. The add-on reads the PaymentIntent again from Airwallex before an entry changes, so a repeated or replayed webhook never completes a payment twice.

A status check runs every five minutes and reads payments that are still waiting and authorisations that are not captured yet, so a missed webhook never leaves an entry behind. A payment page that was never paid is closed after its link expires (an hour), at Airwallex too, and the entry is marked as cancelled.

The entry screen: capture, cancel and refunds

An entry paid through Airwallex: the Airwallex box with the status, payment intent, order reference, payment method, card with 3D Secure version, amounts, the refund form and Refresh status
The entry after payment: status, Airwallex references, capture, refund and Refresh status.

Each entry paid through Airwallex has an Airwallex box with the payment status, the PaymentIntent status, the PaymentIntent ID, the order reference, the payment method, the card brand, last four digits and 3D Secure version, and the amount, captured and refunded totals.

  • Capture (manual capture): enter the amount (the full authorisation is filled in) and press Capture. Capturing less than the authorisation is allowed; the entry then shows the captured amount.
  • Cancel authorisation: releases the hold on the customer’s card; the entry becomes Voided.
  • Refund: enter an amount (the rest of the payment is filled in) and press Refund. Full and partial refunds are supported. Each form can only be sent once, and the add-on reads the payment again first.
  • A refund that Airwallex later reports as failed is taken back off the entry with a note. A refund you make in the Airwallex web app is added to the entry from its webhook.
  • Refresh status reads the payment from Airwallex at once.

Gravity Forms notification events are available for Payment Completed, Payment Authorized, Payment Refunded, Payment Failed or Cancelled and Authorization Cancelled, so you can e-mail the customer or your team at each step.

For developers

The PaymentIntent request can be extended with the gravityextra_airwallex_intent_payload filter, for example to add your own metadata or order lines. The amount, currency, order reference, request id and return URL are always set by the add-on after the filter runs.

// Add your own metadata to the Airwallex PaymentIntent (amount, currency, order
// reference, request id and return URL are always set by the add-on).
add_filter( 'gravityextra_airwallex_intent_payload', function ( $payload, $feed, $entry, $form ) {
    $payload['metadata']['booking_ref'] = 'WS-' . $entry['id'];
    return $payload;
}, 10, 4 );

The options passed to the hosted payment page can be changed with gravityextra_airwallex_checkout_options (for example a locale or an appearance); the payment, its secret and the return addresses cannot. gravityextra_airwallex_webhook_tolerance changes the accepted webhook age (300 seconds by default).

Frequently asked questions

Does this add-on take subscriptions?

No. It takes one-off payments for products, services and donations. Recurring billing is not part of this version.

Where do I get the API keys?

In your Airwallex web app under Settings, Developer, API keys. You can create them yourself. Use the keys of your Airwallex sandbox account for the Demo environment and the keys of your live account for Production.

Is the card entered on my site?

No. The visitor enters payment details on the Airwallex payment page. Your site only receives the result and the payment references, never the card number or security code.

Which payment methods will my customers see?

The ones your Airwallex account has switched on and that accept the form currency in the customer’s country. The settings page lists them for your currency, and you can narrow the list.

What happens when the amount at Airwallex is different?

The entry is never marked as paid. It gets one error note with the expected and the reported amount, so you can look at the payment in your Airwallex account.

Can I take payments in several currencies?

Each payment uses the currency of the form, with the right decimal places. If your forms use different currencies, each payment is charged in its own currency and Airwallex shows the methods that accept it.

Get the add-on

The add-on is available with a 1-site, 5-site or Unlimited licence on the Gravity Forms Airwallex Payment Premium Add-on page. Updates and support are included while your licence is active.

Still need help?

Our support team answers tickets every day, usually within a few hours.

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