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

Gravity Forms Conekta Premium Add-on Setup Guide

Updated 9 min read Gravity Forms Integrations A–Z
On this page
  1. What you need
  2. Install and activate
  3. Connect your Conekta account
  4. Webhooks
  5. Add a feed to your form
  6. How a payment works
  7. OXXO cash and SPEI transfers
  8. Refunds
  9. Subscriptions
  10. Test and live mode
  11. For developers
  12. Troubleshooting
  13. Privacy

The Gravity Forms Conekta Premium Add-on takes payments in Mexico with your forms through Conekta. When a visitor submits the form, the add-on creates a Conekta order for the exact total Gravity Forms worked out on the server and sends the visitor to the hosted Conekta payment page. The visitor pays there with a card, with cash at OXXO or another store, or with a SPEI bank transfer, so card details never reach your website. Before an entry changes, the add-on reads the order back from Conekta and checks the order, your reference, the amount, the currency, the mode and the payment status.

Mexico and pesos

Conekta is a payment gateway for businesses in Mexico, and this add-on charges in Mexican pesos (MXN). Set the Gravity Forms currency to Mexican Peso (it is in the Gravity Forms list; the add-on only adds it if another plugin removed it). Your customers can pay with a card, with cash at OXXO and other stores, or with a SPEI bank transfer, as far as these methods are active on your Conekta account.

This guide covers the setup, the feed, payments, webhooks, cash and SPEI references, refunds and going live. 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 Conekta account. Test mode is available right away; live payments start when Conekta has activated your account.
  • The private key of each mode, from Developers → API Keys in the Conekta panel.
  • The Gravity Forms currency set to Mexican Peso.
  • Your site public and on HTTPS, so Conekta can reach the webhook address.
  • A form with at least one product field (or a total), a name, an email and a phone field.

The add-on talks to the Conekta API (api.conekta.io, version 2.3.0) to create orders, read them back, refund cards and create a webhook signing key. No Conekta script is loaded on your pages: the customer is redirected to the payment page. Apart from that, the add-on checks gravityextra.com for your licence and plugin updates.

Install and activate

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

Connect your Conekta account

Conekta settings: test or live mode, the private key of each mode, the payment methods card, cash and SPEI, the payment window, the MXN currency line and the account-ready line
Settings: choose test or live mode and paste the private key from Developers, API Keys. Keys are stored encrypted.
  1. Leave Mode on Test for now.
  2. In the Conekta panel, turn on test mode, open Developers → API Keys and copy the private key (it starts with key_) into the Test private key field.
  3. Tick the payment methods to offer: Card, Cash (OXXO and stores) and SPEI bank transfer. They must also be active on your Conekta account.
  4. Optional: set a payment window in hours (1 to 720). It decides how long the payment page and an OXXO or SPEI reference stay valid. Empty means 72 hours.
  5. Save. The Account line turns green with a masked key and the payment methods. The key is stored encrypted and never shown again.
  6. The Currency line confirms that your forms use MXN.
Setting Used for
Private key (per mode) Creating each order, reading it back and card refunds, on your server only
Payment methods What the Conekta page offers: card, cash, SPEI
Payment window How long the page and cash / SPEI references stay valid
Webhook signing key (per mode) Checking the signature of every webhook event

Webhooks

Conekta reports every change of an order to a webhook address. Copy the address from the Webhooks section of the settings, then in the Conekta panel open Developers → Webhooks, create a webhook with that address and the order events, once in test mode and once in live mode. The same address serves both modes.

Next, press Create a test webhook signing key (and later the live one). The add-on asks Conekta for a webhook key with your private key and saves its public key. From then on every event must carry a valid DIGEST header, an RSA-SHA256 signature of the event made by Conekta; unsigned or changed events are refused. If you already created a webhook key through the Conekta API, you can paste its public key instead.

Every event is checked, then verified with Conekta

Even a correctly signed event is only a hint: the add-on reads the order back from Conekta with your private key and compares the order, your reference, the amount in cents, MXN, the mode and the payment status before the entry changes. An event for an order of the other mode, or for an order that is not the current one of the entry, is never applied.

Add a feed to your form

The Conekta feed: products and services with the form total, first name, last name, email and phone mapped, the payment description and the notification option
The feed: map the customer details Conekta needs (name, email, phone) and set the payment description.
  1. Open the form, then Settings → Conekta → Add New.
  2. Choose Products and Services and usually the Form Total.
  3. Map the first name, last name, email and phone. Conekta needs the name, email and phone for every order and sends payment instructions to the email.
  4. Set the payment description. It is shown on the Conekta page and used as the item name when the form products do not add up to the total. Merge tags work, for example Booking #{entry_id}.
  5. Keep Send form notifications only after the customer has paid ticked, so your booking emails go out for paid entries only.
A pottery workshop booking form with name, email, mobile number, workshop places and lunches with quantities, the total in Mexican pesos and the Continue to payment button
The form your customer fills in. Card details are entered on the Conekta 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 creates a Conekta order for that amount in cents, with your reference, the items, the customer details, the return address and the payment window.
  2. The visitor goes straight to the Conekta payment page to choose a method and pay.
  3. Conekta sends a signed webhook event. The add-on checks the signature, reads the order and marks the entry Paid only when Conekta reports it paid and the order, reference, amount, currency and mode match.
  4. Conekta sends the visitor back to your form page. The return page also reads the order; if there is no result yet, it waits and checks again by itself, then shows your confirmation.
  5. A payment is never completed twice, however many events or returns arrive.
What Conekta reports for the order Entry
paid Paid, with the order, the charge and the method in the notes
pending_payment with an OXXO reference or a SPEI CLABE Pending, with the reference shown to the customer and on the entry; paid automatically when the customer pays
pending_payment without a payment yet Stays Processing while the customer is still on the payment page
declined, expired or canceled Failed: nothing was charged, and the customer gets a link to try again
refunded or partially_refunded Refunded or Partially Refunded, each refund booked once
charged_back A note on the entry so you can answer the chargeback in the Conekta panel

OXXO cash and SPEI transfers

When the customer chooses cash, Conekta gives a payment reference to pay at OXXO or another listed store; with SPEI it gives a CLABE to transfer to. The entry becomes Pending, the return page shows the reference and the date to pay by, and the reference is saved on the entry. When the customer pays, Conekta sends a new event and the entry becomes Paid, with your held notifications sent at that moment. If the payment window closes first, the entry becomes Failed and the customer can start again.

When a payment is declined or expires, your form page says that nothing was charged and offers Try the payment again. The add-on then creates a new Conekta order for the same amount. An event about the earlier order is not applied to the entry.

Refunds

An entry paid by card through Conekta and partly refunded: the Conekta box with the status, order, charge, card, Conekta status, amount, refunded amount and the refund form
The entry after payment: status, Conekta order and card, and refunds from the entry screen.

Open a paid entry. The Conekta box shows the status, the order, the charge, the card, the Conekta status and the amounts. Type an amount in pesos and press Refund. The add-on first reads the order (it must be paid by card and refundable), then sends the refund for that charge with an idempotency key, so a repeated request is the same refund at Conekta and never a second one. It reads the order again and books the refund: the entry becomes Partially Refunded or Refunded.

Payment method Refund
Card (credit or debit) From the entry screen: full or partial, in several steps up to the amount paid
Cash at OXXO and other stores From your Conekta panel (Conekta pays cash refunds out separately); the refund is recorded on the entry
SPEI bank transfer From your Conekta panel; the refund is recorded on the entry

Refunds you make in the Conekta panel arrive as events and are booked on the entry after the add-on has read and checked the order.

Subscriptions

Subscriptions are not offered. Conekta documents its subscription checkout only for the embedded checkout component, which runs Conekta’s script on your page; this add-on keeps payments on the hosted page. Each form submission is one payment.

Test and live mode

  • In test mode, entries are marked as test payments and no money moves. Pay with the test cards in the Conekta documentation.
  • For live payments, paste the live private key, create the live webhook signing key, choose Live and save.
  • Make one small real payment and refund it from the entry.
  • Entries remember the mode they were paid in; events and refunds use the key of that mode, and a live event never pays a test entry.

For developers

The order request can be adjusted with gravityextra_conekta_order_body (for example the methods per form), and the webhook address with gravityextra_conekta_webhook_url. The amount, the reference and the mode are always checked again when the order is read back.

// Offer only cards on the Conekta page for one form (ID 7).
add_filter( 'gravityextra_conekta_order_body', function ( $body, $feed, $form, $entry ) {
    if ( 7 !== (int) rgar( $form, 'id' ) ) {
        return $body;
    }
    return array_merge( $body, array( 'checkout' => array_merge( rgar( $body, 'checkout' ), array( 'allowed_payment_methods' => array( 'card' ) ) ) ) );
}, 10, 4 );

Troubleshooting

What you see What to do
“This is not a Conekta private key” Copy the private key (it starts with key_) from Developers → API Keys, completely and without spaces. The public key is for card scripts and is not used.
“key_is_live_mode” or “key_is_test_mode” in the entry notes The private key belongs to the other mode. Switch the Conekta panel to test mode for the test key, and paste each key into the field of its mode.
“Online payment is not available in USD” This add-on charges Mexican pesos. Choose Mexican Peso in Forms → Settings.
“please enter your name, a valid email address and a phone number” Conekta needs the customer’s name, email and phone for every order. Map these fields in the feed and make them required in the form.
“This is not a public key” for the webhook key Paste the whole block from -----BEGIN PUBLIC KEY----- to -----END PUBLIC KEY-----, or use the button that creates the key for you.
The customer returns but the entry stays Processing The customer has not paid yet. The return page checks again by itself, and the entry updates when the webhook arrives. Check that the webhook address is saved in the Conekta panel for the mode you use.
“Conekta says this order cannot be refunded right now” Conekta has not released the payment for refunds yet. Try again later, or refund from the Conekta panel.

If an entry stays Processing although the customer paid, open it and press Check the payment with Conekta in the Conekta box: the add-on reads the order and updates the entry.

Privacy

The add-on sends Conekta the amount, the items, the entry number and your reference, and the customer details you map (name, email, phone). Card details are entered on the Conekta page and never reach your site. The private keys are stored encrypted with keys 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