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

Gravity Forms Wompi Premium Add-on Setup Guide

Updated 7 min read Gravity Forms Integrations A–Z
On this page
  1. What you need
  2. Install and activate
  3. Connect your Wompi account
  4. Set up the events URL
  5. Add a feed to your form
  6. How a payment works
  7. Wompi statuses
  8. Voids and refunds
  9. Subscriptions
  10. Sandbox and Production
  11. For developers
  12. Troubleshooting
  13. Privacy

The Gravity Forms Wompi Premium Add-on takes payments in Colombian pesos with your forms through Wompi Web Checkout, the payment page of Wompi by Bancolombia. When a visitor submits the form, the add-on prepares a signed Wompi checkout for the exact total Gravity Forms worked out on the server and sends the visitor to the secure Wompi page. The visitor pays there with a card, PSE, Nequi, the Bancolombia button or another method of your Wompi account, so payment details never reach your website. Before an entry changes, the add-on reads the transaction back from the Wompi API with your private key and checks its reference, amount, currency and status.

This guide covers the setup, the feed, the events URL, payments and statuses, voids and refunds, and going to Production. The add-on costs one site $49 a year, five sites $69 a year, unlimited sites $199 a year.

What you need

  • WordPress 6.5 or newer, PHP 7.4 or newer (with the openssl extension) and Gravity Forms 2.9 or newer.
  • A Wompi business account for Colombia. Wompi gives every account a Sandbox environment for tests and a Production environment for real payments.
  • The four keys of each environment from the Wompi dashboard, under Desarrolladores (Developers): the public key, the private key and, under Secretos para integración técnica, the integrity secret and the events secret.
  • The Gravity Forms currency set to Colombian Peso. The add-on adds it to the currency list if it is not there yet, shown as $ 95.000.
  • Your site public and on HTTPS, so Wompi can reach the events URL.
  • A form with at least one product field (or a total).

The add-on sends customers to checkout.wompi.co and reads transactions from the Wompi API (sandbox.wompi.co or production.wompi.co). Apart from that, it checks gravityextra.com for your licence and plugin updates. It loads no Wompi script on your pages.

Install and activate

  1. Upload the zip in Plugins → Add New → Upload Plugin and activate it.
  2. Open Forms → Settings → Wompi, enter your GravityExtra licence key and press Activate License.
  3. The Wompi sections appear once the licence is active. Payments and events work only with an active licence.

Connect your Wompi account

Wompi settings: Sandbox or Production mode, the COP currency line, the Sandbox and Production keys with the public key shown and the private key, integrity secret and events secret hidden, the ready lines with masked keys and the events URL
Settings: choose Sandbox or Production and save the four keys of each. Secrets are stored encrypted and shown masked.
  1. Leave Mode on Sandbox for now.
  2. Under Sandbox keys, paste the public key, the private key, the integrity secret and the events secret of your Sandbox environment.
  3. Do the same under Production keys now or later.
  4. Save. Each status line turns green with the masked keys, and the environment in use says In use for new payments. Secrets are stored encrypted and never shown again.

Why two sets of keys

Each entry remembers the environment it was paid in. Keeping both sets saved means events and voids for older Sandbox entries keep working after you switch to Production, and the other way round.

Set up the events URL

Wompi confirms every payment by sending an event to your site. Copy the Events URL from the settings page and paste it in the Wompi dashboard as the URL de eventos, once for Sandbox and once for Production. Each event is checked with the events secret: the add-on recalculates the SHA-256 checksum from the properties Wompi lists, the timestamp and the secret, and ignores anything that does not match. The settings page shows when the last event was accepted.

Add a feed to your form

The Wompi feed: products and services with the form total, first name, last name, e-mail, phone and document number mapped, the document type, the phone country code and the notification option
The feed: map the billing fields so the Wompi page is already filled in, and choose the document type.
  1. Open the form, then Settings → Wompi → Add New.
  2. Choose Products and Services, usually with the Form Total.
  3. Map the first name, last name, e-mail, phone and document number. Wompi fills them in on its page, so the customer types less.
  4. Choose the document type sent with the document number, for example CC for a cédula de ciudadanía, or map a field that holds one of Wompi’s codes (CC, CE, NIT, PP, TI, DNI, RG, OTHER).
  5. Keep the phone country code on +57 unless most customers type foreign numbers without a code.
  6. Keep Send form notifications only after the customer has paid ticked, so your booking e-mails go out for paid entries only.
A coffee farm tour booking form with name, e-mail, phone, cédula, tours and tasting boxes with quantities, the total in Colombian pesos and the Continue to payment button
The form your customer fills in, with prices in Colombian pesos. The payment itself happens on the Wompi page, not here.

How a payment works

  1. The visitor submits the form. Gravity Forms works out the total on the server, and the add-on prepares the Wompi checkout for that amount in centavos, with a unique reference for the entry and the integrity signature made with your integrity secret.
  2. The visitor goes straight to the Wompi page and pays there.
  3. Wompi sends the visitor back to the form page with the transaction number, and sends an event to the events URL.
  4. In both cases the add-on reads the transaction from the Wompi API with your private key. Only when its reference, amount, currency and the status APPROVED match is the entry marked Paid.
  5. The visitor sees your confirmation. If Wompi is still waiting for the money, the page waits and checks again by itself.

The return page never trusts the address bar

Anyone can open the return address with any transaction number. The add-on always asks Wompi for that transaction with your private key, and a transaction of another entry, another amount or another currency never changes the entry. A repeated event never pays twice.

Wompi statuses

Status from Wompi What the entry shows
APPROVED Paid, with the Wompi transaction, the payment method and how it was checked
PENDING Pending and a note; for example a PSE bank transfer or a cash payment on its way
DECLINED or ERROR Failed with Wompi’s reason; no money was taken and the customer gets a link to try again
VOIDED Refunded for a paid entry (a card payment voided in Wompi or from the entry)

When a payment is declined, your form page says that nothing was charged and offers Try the payment again. Wompi needs a new reference for every attempt, so the add-on prepares a new one for the same entry; all references of the entry are kept, and a late answer for an older attempt does not decide the entry any more.

Voids and refunds

An entry paid through Wompi: the Wompi box with the status, reference, transaction, card method, Wompi status APPROVED, the API check, the amount and the Void card payment button
The entry after payment: status, reference, Wompi transaction, payment method and how it was checked, with the void button for card payments.

Approved card payments can be voided from the entry while Wompi still allows it: press Void card payment in the Wompi box and confirm. The add-on calls Wompi’s void endpoint with your private key, reads the transaction again, and marks the entry Refunded when Wompi reports it as VOIDED. If Wompi no longer allows the void, the entry gets a note and stays Paid.

Other refunds, such as PSE or Nequi payments, are made in the Wompi dashboard. Wompi documents no Production refund API for these, so a refund made there does not change the entry by itself; add a note or change the payment status by hand if you track refunds in Gravity Forms.

Subscriptions

The add-on takes one-off payments. Wompi’s recurring charges work with saved payment sources, and saving a card needs Wompi’s own JavaScript widget on your page (or card numbers sent through your server), so the Subscription transaction type is not offered in the feed.

Sandbox and Production

  • In Sandbox mode, payments use your Sandbox keys and Wompi’s test results: no money moves and entries are marked as Sandbox payments.
  • When your account is ready, choose Production and save.
  • Make one small real payment and check the entry.
  • Entries remember the environment they were paid in. A Sandbox event for a Production entry, or the other way round, is ignored.

For developers

The events URL can be changed with the gravityextra_wompi_events_url filter. Amounts, the currency and the reference are always set by the add-on.

// Receive Wompi events on another public address of the same site
// (for example when the home page is behind a login).
add_filter( 'gravityextra_wompi_events_url', function ( $url ) {
    return add_query_arg( 'callback', 'gfwompi', home_url( '/pagos/' ) );
} );

Troubleshooting

What you see What to do
“This is a Production key. Paste it in the matching section” Sandbox keys start with pub_test_, prv_test_, test_integrity_ and test_events_; Production keys with pub_prod_, prv_prod_, prod_integrity_ and prod_events_. Paste each key under its own environment.
The Wompi page says the integrity signature is not valid The integrity secret does not belong to the public key. Copy both again from the same environment in the Wompi dashboard.
The customer returns but the entry stays Processing The add-on could not read the transaction from Wompi yet. Check the private key of that environment and that your server can reach the Wompi API. The events URL updates the entry as soon as Wompi sends the event.
“Online payment is not available in USD” Wompi Web Checkout takes Colombian pesos only. Choose Colombian Peso in Forms → Settings → Currency.
A note says a Wompi transaction does not match the entry The transaction exists in Wompi but has another reference, amount or currency. The entry was not changed; compare it with the transaction in the Wompi dashboard.
No event is ever received Paste the events URL in the Wompi dashboard for the environment you use (Sandbox and Production have separate URLs), make sure the site is public and on HTTPS, and check the events secret.

Privacy

The add-on sends Wompi the amount, the currency, the reference and, when you map them, the customer name, e-mail, phone and document number, so the Wompi page is filled in. Card and bank details are entered on the Wompi page and never reach your site. The private key and the secrets are stored encrypted with a key from your site’s WordPress salts. Uninstalling the add-on removes its settings, including the keys.

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