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

Gravity Forms Flutterwave Premium Add-on Setup Guide

Updated 12 min read Gravity Forms Integrations A–Z
On this page
  1. Video walkthrough
  2. What you need
  3. Get your secret key
  4. Connect the add-on
  5. Set up the webhook and the secret hash
  6. Add a Flutterwave feed to a form
  7. Feed options
  8. What the customer sees
  9. How a payment is verified
  10. Payment statuses and notes
  11. The five-minute status check
  12. Refunds and other actions from the entry screen
  13. Currencies
  14. Going live
  15. Troubleshooting
  16. Privacy and data
  17. Uninstalling
  18. For developers

Video walkthrough

Gravity Forms Flutterwave Setup Guide: Test Mode, Secret Keys & Webhook (WordPress Side)
Video setup guide: Gravity Forms Flutterwave Watch on YouTube

The Gravity Forms Flutterwave Premium Add-on lets your Gravity Forms take payments through Flutterwave Standard, the Flutterwave hosted checkout. When someone submits a form, the add-on creates a Flutterwave payment on your server for the exact form total and sends the customer to the Flutterwave checkout, where they pay with a card, bank transfer, mobile money, USSD or the other methods enabled on your account. When the customer comes back, the add-on verifies the transaction with Flutterwave on the server and only then updates the entry.

You use your own Flutterwave business account and your own secret key, so the money settles straight to your Flutterwave balance. There is a test mode for trying everything with Flutterwave test cards and a live mode for real payments. This guide covers the setup, every option, webhooks and the secret hash, refunds, currencies, and what happens when a payment fails or is cancelled.

What you need

  • WordPress with Gravity Forms 2.9 or newer.
  • PHP 7.4 or newer, with the openssl extension (used to encrypt the keys).
  • An active license key for this add-on.
  • A Flutterwave account. A new account gives you a free test environment straight away; live payments need your business verified by Flutterwave (their KYC, done in your dashboard).
  • An HTTPS site address for live payments, so Flutterwave can deliver webhooks to it.

Get your secret key

The add-on authorises every request to Flutterwave with your secret key. You find it in the Flutterwave dashboard:

  1. Log in to the Flutterwave dashboard and use the Test / Live switch to choose the mode. Start with Test.
  2. Open Settings → API Keys.
  3. Copy the Secret key. A test secret key starts with FLWSECK_TEST-; a live secret key starts with FLWSECK-. Do not use the Public key (FLWPUBK) or the Encryption key: the add-on recognises them and tells you which key to paste instead.

Treat the secret key like a password. Anyone with it can create payments and refunds on your account. The add-on stores it encrypted and never shows it again in full. If you ever think a key leaked, generate new keys in the dashboard and paste the new secret key.

Connect the add-on

  1. Install and activate the add-on, then open Forms → Settings → Flutterwave and activate your license key.
  2. Leave Mode on Test for your first payments.
  3. Paste the test secret key into Test secret key and click Save Settings.
  4. The add-on checks the key before it saves it: the kind of key, that it belongs to the mode of the field, and that Flutterwave accepts it. A key that fails is not saved, and the old key stays in place. When the key works, the Connection line turns green and shows the key masked.
  5. The Currency line confirms that your Gravity Forms currency is one Flutterwave collects.
The Flutterwave settings page in Gravity Forms: license key, mode, test and live secret keys stored encrypted, the currency check, the live connection, the webhook URL and the secret hashes with the last verified webhook
The settings page: mode, the two secret keys (stored encrypted), the connection check, the webhook URL and the secret hash of each mode.

Keys and secret hashes are encrypted with AES-256-GCM using a key derived from your site’s security salts, so a copy of the database alone does not reveal them. If you ever change the salts in wp-config.php, paste the key and the secret hash again.

Set up the webhook and the secret hash

Webhooks tell your site at once that a payment succeeded or failed, even when the customer closes the browser, which matters most for bank transfers and mobile money.

  1. Copy the Webhook URL from the add-on settings. It looks like https://your-site/?callback=gfflutterwave.
  2. In the Flutterwave dashboard, open Settings → Webhooks for the same mode, paste the URL and tick the payment events. Turn on webhook retries.
  3. Set a Secret hash there. In the add-on, the Generate button next to the secret hash field makes a strong random value you can copy; use the same value in both places.
  4. Save in the dashboard and in the add-on. Repeat for Live when you go live; each mode has its own secret hash.

Flutterwave sends the secret hash in a verif-hash header with every webhook. The add-on compares it, in constant time, with the secret hash you saved for each mode:

  • A request without the header, or with a different value, is answered with HTTP 401 and changes nothing.
  • A webhook signed with the test secret hash never changes an entry paid in live mode, and the other way round.
  • The webhook body is only a signal. The add-on always calls Flutterwave’s verify endpoint for the transaction before it touches the entry, so a forged body cannot mark anything as paid.
  • The settings page shows when the last verified webhook arrived.

Add a Flutterwave feed to a form

A feed tells the add-on which form takes payments and how. Your form needs at least one pricing field (a Product, and usually a Total) and an Email field, because Flutterwave requires the customer’s email for every payment.

  1. Open the form, go to Settings → Flutterwave and click Add New.
  2. Choose the Transaction Type: Products and Services or Donations. Every payment is a one-time payment.
  3. Set Payment Amount to Form Total (or a single product field).
  4. Map the billing information: email (required), full name and phone. They prefill the checkout and appear with the payment in your dashboard.
  5. Fill in the checkout options below and save the feed.
The Flutterwave feed settings in Gravity Forms: payment amount, customer email, name and phone, checkout title, payment description, payment methods and the notification option
A Flutterwave feed: the amount, the customer fields, the checkout title and description, and the payment methods.

Feed options

Option What it does
Checkout title Shown at the top of the Flutterwave checkout, usually your business name. The default is your site name.
Payment description Shown on the checkout and stored with the payment. Merge tags work, for example Workshop registration #{entry_id}.
Payment methods Leave all unticked to show the methods set on your Flutterwave account. Tick methods to limit a form to them. Flutterwave honours this only when the dashboard payment options are off in your business preferences, and hides methods that do not fit the currency.
Notifications When ticked (the default), the form notifications that fire on submission are held until the customer has paid, so a booking email is never sent for an unpaid entry. They go out once, as soon as the payment is verified.
Conditional logic The usual Gravity Forms condition: the payment is only taken when the condition matches.

What the customer sees

The customer fills in the form and clicks the submit button. The add-on works out the amount on the server from the entry (never from the browser), creates the payment with a unique reference and sends the customer to the Flutterwave checkout. The checkout session stays open for 60 minutes.

A front-end Gravity Form for registering for a design workshop in Lagos with name, email, mobile number, two products and a total in naira, with a Continue to payment button
A registration form on the site. The total is worked out by Gravity Forms and sent to Flutterwave from the server.

If a card is declined, the Flutterwave checkout stays open so the customer can try again with another card or another method; the add-on writes one note per failed attempt and keeps waiting. After paying, the customer comes back to your form. Before showing your confirmation, the add-on verifies the transaction with Flutterwave. If the payment is still being confirmed (common with bank transfers), a short “Confirming your payment” message is shown and the page checks again by itself every few seconds.

  • Paid: your normal Gravity Forms confirmation (a message, a page or a redirect).
  • Cancelled on the checkout: “The payment was cancelled. You have not been charged.” with a link back to the form. The add-on first checks that Flutterwave has no payment for the reference.
  • Failed (the customer gave up after a failed payment): “The payment was not completed, so you have not been charged.”
  • Flutterwave could not be reached when the payment was created: “We could not start the payment with Flutterwave. You have not been charged.” The entry is marked Failed with the reason in a note.

How a payment is verified

Nothing the browser or a webhook says is trusted on its own. Whenever the add-on needs to know the state of a payment, it asks Flutterwave: by transaction ID (GET /v3/transactions/{id}/verify) when it has one, otherwise by the entry’s reference (verify_by_reference). An entry is marked Paid only when all of these match:

  • The transaction’s reference (tx_ref) is the one created for this entry. A transaction ID from another entry, pasted into a return link, is ignored.
  • The status is successful.
  • The amount is exactly the form total, in the smallest unit of the currency.
  • The currency is the entry’s currency.

When the amount or currency differ (a lower or a higher amount), the entry is never marked paid; it gets one error note with both amounts and the transaction ID so you can check it in your dashboard and refund it.

Payment statuses and notes

Status Meaning
Processing The customer has been sent to the checkout, or Flutterwave is still confirming the payment.
Paid The transaction is verified as successful for the right amount and currency.
Partially Refunded / Refunded Part or all of the payment was refunded, here or in the Flutterwave dashboard.
Cancelled The customer cancelled, the checkout expired without a payment, or you closed the payment link.
Failed The payment failed, or the transaction did not match the entry.

The add-on writes a note for every step (checkout, failed attempts, the verified payment and where it was confirmed, refunds and errors); test-mode notes say “Test”. Notification events: Payment Completed, Payment Refunded and Payment Failed or Cancelled.

Each change is made once, from the entry’s current status. Flutterwave can send the same webhook again, a webhook can arrive at the same moment as the customer’s return, and the status check can run in between: the entry is still marked paid exactly once, with one note and one set of notifications. If money arrives for an entry that had already been marked Cancelled or Failed (for example a bank transfer confirmed late), the entry is completed and the note says so. A second payment for the same entry is never fulfilled; a note asks you to refund it.

The five-minute status check

Every five minutes, a scheduled task verifies the payments of entries that are still Processing (from the last three days). A missed webhook therefore never leaves a paid entry waiting. A checkout that expired without any transaction is marked Cancelled after 75 minutes, so your entry list stays tidy.

Refunds and other actions from the entry screen

Open an entry to see the Flutterwave box: the status, the transaction ID, the reference, the amount and how much is refunded.

A Gravity Forms entry screen with the order in naira, Payment Details showing Paid, the Flutterwave box with the transaction ID, reference, amount, refund field and Verify with Flutterwave, and the payment notes
A paid entry: the Flutterwave transaction ID and reference, the refund box and the notes written by the add-on.
  • Refund: type the amount (the rest of the payment is filled in for you) and confirm. Partial refunds are possible until the whole amount is refunded. The refund is deducted from your Flutterwave balance (card refunds take 3 to 15 days). Below Flutterwave’s minimums, such as NGN 100, its message is shown.
  • Close the payment link: for an entry still waiting for the customer. The link is disabled at Flutterwave so it can no longer be paid, and the entry is marked Cancelled.
  • Verify with Flutterwave: checks the payment with Flutterwave now.

Every action asks for confirmation, checks a security token and the user’s permission to edit entries, and carries a one-time request ID, so a double click or a reloaded page never sends a refund twice. Refunds you make in the Flutterwave dashboard are picked up through the refund webhook: the add-on reads the refund from the API, checks it belongs to the entry’s transaction and records it once.

Currencies

Payments are created in your Gravity Forms currency (Forms → Settings → Currency). Flutterwave Standard collects these currencies:

Codes Currencies
NGN, GHS, KES, ZAR, EGP, MWK, TZS Naira, cedi, Kenyan shilling, rand, Egyptian pound, kwacha, Tanzanian shilling
UGX, RWF, XAF, XOF Ugandan shilling, Rwandan franc and the two CFA francs (no decimals)
USD, EUR, GBP US dollar, euro, pound sterling

Gravity Forms does not list most African currencies by default, so the add-on adds the missing ones (with the right symbol and decimals) to the currency list. Currencies without decimals, such as UGX, RWF, XAF and XOF, are sent as whole amounts. If your form uses a currency Flutterwave does not collect, the settings page warns you and the form shows “Online payment is not available in …” instead of sending the customer to a checkout that would fail.

Going live

  1. Make a few test payments with the Flutterwave test cards: one successful, one that fails, one cancelled, and try a refund.
  2. Complete your business verification in the Flutterwave dashboard, then switch the dashboard to Live and copy the live secret key.
  3. In Forms → Settings → Flutterwave, choose Live, paste the key into Live secret key, add the webhook URL and a live secret hash in the dashboard and the same secret hash in Live secret hash, and save. A test key pasted into the live field is refused.
  4. Make one small real payment and refund it from the entry screen.

Entries keep the mode they were paid in, so you can still verify and refund older test entries after you switch to live.

Troubleshooting

What you see What to do
“Flutterwave did not accept this key” The key is wrong or was regenerated. Copy the Secret key again from Settings → API Keys in the right mode.
“This is a test key” / “This is a live key” Test keys (with _TEST) go in the Test field, live keys in the Live field.
Webhook answered 401 The secret hash in the dashboard and in the add-on differ, or none is saved for that mode. Generate one, save it in both places.
Entries stay Processing The customer has not finished paying, a bank transfer is not confirmed yet, or webhooks cannot reach your site. The status check confirms paid transactions within five minutes anyway.
“Please enter a valid email address to pay online” Flutterwave needs the customer’s email. Map an Email field in the feed and make it required.
“Online payment is not available” on the form The license is not active, no secret key is saved for the selected mode, or the currency is not one Flutterwave collects.

Privacy and data

The add-on only contacts the Flutterwave API (api.flutterwave.com). It sends the amount, the currency, the reference, the checkout title and description, the form and entry numbers, and the customer’s email, name and phone. Card, bank and wallet details are entered on the Flutterwave checkout and never touch your site. Keys and secret hashes are never written to logs or notes.

Uninstalling

Uninstalling the add-on from Forms → Settings → Uninstall removes the stored keys and secret hashes, its scheduled task and its settings. Remove the webhook URL in the Flutterwave dashboard as well. Your entries, payments and notes stay in Gravity Forms, and your transactions stay in Flutterwave.

For developers

  • gravityextra_flutterwave_payment_payload filters the payment body before it is sent (for example to add subaccounts for split payments).
  • gravityextra_flutterwave_webhook_url filters the webhook address, for sites behind a proxy.
  • gravityextra_flutterwave_session_minutes sets the checkout session length (default 60).
  • Requests use Flutterwave API v3 with the secret key as a Bearer token and never follow redirects.

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