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

Gravity Forms PayPlug Premium Add-on Setup Guide

Updated 10 min read Gravity Forms Integrations A–Z
On this page
  1. How a payment works
  2. Install and activate
  3. Settings
  4. Getting an API key
  5. The feed
  6. The form and the PayPlug page
  7. Payment statuses
  8. The entry screen
  9. Refunds
  10. Testing in Test mode
  11. Going live
  12. For developers
  13. How it differs
  14. Troubleshooting
  15. Uninstall

The Gravity Forms PayPlug Premium Add-on lets your Gravity Forms take card payments in euros through PayPlug, the French online payment service. When a form is submitted, the add-on creates a PayPlug payment for the exact total and sends the customer to the PayPlug payment page, where they pay by card. When they come back, or when PayPlug sends its notification, the add-on reads the payment back from PayPlug and only then marks the entry as paid. Refunds, full or partial, are made from the entry screen. This guide covers every setting, the feed, what happens during a payment, refunds, testing in Test mode and going live.

What you need

Gravity Forms 2.9 or newer, the form currency set to euros (EUR), a PayPlug account with an API key for Test mode (and one for Live mode when you go live), and a site reachable from the internet so PayPlug notifications can arrive.

How a payment works

  1. The customer fills in the form. Gravity Forms works out the total; the add-on checks that it is a euro amount with at most two decimals, from 0.30 to 20,000.00 EUR, and that the email address is valid.
  2. The entry is saved with the status Processing. The add-on creates a PayPlug payment on your server with the total in cents, the customer details you mapped in the feed, the delivery type, a description, a unique order reference, a signed return link, a signed cancel link and a signed notification address.
  3. PayPlug answers with the payment and its payment page. Before the customer is sent there, the add-on checks that PayPlug created it for the right amount, in euros, in the mode you chose, and that the page is on payplug.com. If anything differs, the payment is aborted at PayPlug and the customer is told that nothing was charged.
  4. The customer pays by card on the PayPlug page, including strong customer authentication when their bank asks for it. Card details are entered on PayPlug and never reach your website.
  5. PayPlug sends the customer back to your form page and posts a notification to your site. Either way, the add-on reads the payment from PayPlug with your key and updates the entry: Paid, Failed or Cancelled.
  6. If the customer clicks Cancel payment on the PayPlug page, the add-on aborts the open payment at PayPlug and marks the entry Cancelled straight away.

Install and activate

  1. In WordPress go to Plugins → Add New → Upload Plugin, upload the zip and activate it.
  2. Open Forms → Settings → PayPlug, enter your GravityExtra license key and activate it. The settings below appear once the license is active.
  3. Check Forms → Settings: the currency must be Euro.

Settings

Open Forms → Settings → PayPlug. Both modes have their own key field; only the key of the mode you choose is used for new payments. An entry always keeps the mode it was created in, so a payment started in Test mode is still read with the Test key after you switch to Live.

PayPlug settings: Test or Live mode, the Test and Live API keys, what customers buy, the euro currency line, the connection line with the masked key and the notifications line
Settings: choose Test or Live and paste the API key of each mode. Keys are checked with PayPlug and stored encrypted.
Setting What it does
Mode Test (the default) uses your Test API key: payments are made with PayPlug test cards and no money moves. Live uses your Live API key for real payments.
Test API key / Live API key The key you generate in the PayPlug portal under API keys. It is checked with PayPlug when you save, stored encrypted and only ever shown masked (first four and last four characters). Older secret keys that start with sk_test_ or sk_live_ are accepted too, and must be pasted in the field of their own mode.
What customers buy Sent to PayPlug as the delivery type of every payment: goods sent to the billing address, digital goods or services, travel or event tickets, or other (donations, deposits). It helps the card issuer during strong customer authentication.
Currency A check line: PayPlug takes euros only, so the Gravity Forms currency must be EUR.
Connection Shows whether PayPlug accepts the key of the current mode, with the masked key.
Notifications Every payment carries its own signed notification address, so there is nothing to set up in the PayPlug portal. The line shows when the last verified notification arrived.

Getting an API key

  1. Sign in to the PayPlug portal and open API keys.
  2. Choose API Key, pick the mode (Test first) and generate the key.
  3. PayPlug shows the key only once. Copy it and paste it into the Test API key field, then save. The connection line turns green when PayPlug accepts it.

The feed

Open your form, go to Settings → PayPlug and add a feed. Choose Products and Services or Donations and the payment amount (usually the form total). Then map the customer fields: the email is required; first and last name, address, city, postcode, country and mobile phone are optional but recommended, because PayPlug passes them to the card issuer during strong customer authentication and fills in the payment page with them. A French mobile number typed as 06 12 34 56 78 is sent in international form (+33 6 12 34 56 78); numbers from other countries need their international prefix.

The PayPlug feed: products and services with the form total, the customer name, email, address and mobile phone mapping, the description with merge tags and notifications after payment
The feed: map the customer details and write the description shown on the PayPlug page.
  • Description: shown to the customer on the PayPlug page, up to 80 characters. Merge tags work; the default is the form title and the entry number.
  • Notifications: tick Send form notifications only after the customer has paid to hold the usual form notifications until the payment is confirmed. They are sent once, when the entry becomes Paid.
  • Payment events: in the form notifications you can also choose Payment Completed, Payment Failed or Cancelled and Payment Refunded as the event.

The form and the PayPlug page

Use Gravity Forms product, quantity, option and total fields as usual. The amount sent to PayPlug is the total Gravity Forms calculated on your server, so a total changed in the browser cannot lower the price. The submit button can say Continue to payment, because the customer goes to the PayPlug page next.

A ceramics workshop booking form with quantities, the customer name, email and mobile phone, and the total in euros, with the Continue to payment button
The form: Gravity Forms works out the total in euros; the customer pays it on the PayPlug page.

When the customer comes back, they see your normal confirmation if the payment is paid. If PayPlug has not confirmed the payment yet, a short waiting message checks again by itself every few seconds. If the payment failed or was cancelled, the customer is told that nothing was charged and can return to the form.

Payment statuses

What PayPlug reports for the payment Entry
Paid, for the exact amount in euros, in the mode the entry was created in, with the entry’s order reference Paid, with the PayPlug payment id as the transaction id and the card brand and last four digits in the box
Paid, but for another amount, currency or mode Stays Processing with a note asking you to check the payment in the PayPlug portal. It is never marked Paid on its own.
Failed (for example card_declined or insufficient_funds) Failed, with the failure code in the box. No money was taken.
Aborted or timed out (the customer cancelled, or the payment page expired) Cancelled. No money was taken.
Still open Processing. The return page checks again for about a minute; the status check aborts payments left open for twenty minutes.
Refunded in full Refunded, with each refund recorded as a transaction and a note.

The entry screen

Every PayPlug entry has a PayPlug box on the right with the status, the amount, the PayPlug payment id, the order reference, the card (brand and last four digits), the failure code if there was one, and the refunded total. Test payments carry a Test badge.

An entry paid through PayPlug: the PayPlug box with the status, amount, payment id, order reference and card, the Refresh status button and the refund form, and the entry notes
The entry: status, payment, order reference and card, read back from PayPlug, with refunds one click away.
  • Refresh status reads the payment from PayPlug again and applies it.
  • Refund with PayPlug sends a full or partial refund to the customer’s card. Type the amount in euros (the field starts with the amount left) and confirm.

Refunds

Before a refund is sent, the add-on reads the payment from PayPlug and checks that it is paid for the entry amount, in the entry’s mode, inside PayPlug’s refund period, and that the amount fits what is left (from 0.10 EUR). Each refund form can be used once, so a double click or a reloaded page cannot refund twice. Refunds are recorded on the entry as transactions with a note; when the whole amount has been refunded the entry becomes Refunded. Refunds you make in the PayPlug portal are recorded too, when PayPlug notifies your site.

Testing in Test mode

  1. Leave the mode on Test and save your Test API key.
  2. Open the form on your site, fill it in and continue to payment.
  3. On the PayPlug page, pay with one of the PayPlug test cards from the PayPlug documentation. Test cards that are declined let you check the Failed path too.
  4. Back on your site, check the confirmation, then the entry: it should be Paid with the Test badge, and the held notifications should have been sent.
  5. Try a partial refund from the entry screen and check that it appears in the PayPlug portal.
  6. Start another payment and click Cancel payment on the PayPlug page: the entry should show Cancelled.

Going live

  1. Generate a Live API key in the PayPlug portal and paste it into the Live API key field.
  2. Switch the mode to Live and save. The connection line should say Connected to PayPlug (Live).
  3. Make one small real payment, check the entry and refund it from the entry screen.

Your site must be reachable

PayPlug posts notifications to your site. A local site, a site behind a login or a firewall that blocks PayPlug still works, because the return page and the five-minute status check read every payment, but entries update faster when notifications arrive.

For developers

  • gravityextra_payplug_payment_fields filters the payment before it is sent (for example to add metadata). The amount, currency, return, cancel and notification addresses and the order reference cannot be changed by it.
  • gravityextra_payplug_rate_limit changes the per-visitor limits (payment starts 10, return page 30, notifications 120 per minute).
  • gravityextra_payplug_payments_per_hour changes the site-wide cap of new payments per hour (300).
  • gravityextra_payplug_notification_base changes the base address of the notification link (for a site behind a proxy).
// Add the booking date to the PayPlug metadata for one form (ID 7).
add_filter( 'gravityextra_payplug_payment_fields', function ( $payment, $feed, $entry, $form ) {
    if ( 7 !== (int) rgar( $form, 'id' ) ) {
        return $payment;
    }
    $payment['metadata']['booking_date'] = rgar( $entry, '8' );
    return $payment;
}, 10, 4 );

How it differs

  • Nothing is trusted from the browser or the notification: every result is read back from PayPlug with your key and checked against the entry’s payment id, order reference, amount, currency and mode before the entry changes.
  • Each payment gets its own signed notification address. A notification with a wrong or missing signature is refused, and a repeated notification is dropped, so a payment can only be completed once.
  • The mode is checked on every new payment: a Live key saved as the Test key (or the other way round) is caught at once and the payment is aborted before the customer pays.
  • The cancel link and the status check abort open payments at PayPlug, so an old payment page cannot be paid after the entry was cancelled.
  • Refunds from the entry screen are checked against PayPlug first and protected by a one-time form, and refunds made in the PayPlug portal are recorded too.
  • Payment creation, the return page and notifications have per-visitor limits, and new payments have an hourly cap, so a flood of form posts cannot create payments without end.

Troubleshooting

What you see What to do
“PayPlug did not accept this Test API key” Generate a new key in the PayPlug portal (API keys), pick the right mode, and paste it straight away: PayPlug shows a key only once.
“This is a Live key. Paste it in the Live API key field” Secret keys say their mode (sk_test_ / sk_live_). Paste each one in the field of its own mode.
The entry note says the key “belongs to PayPlug Live mode; the payment was aborted” The key saved for Test is a Live key (or the other way round). PayPlug reported the mode of the new payment, the add-on aborted it and the customer was not charged. Swap the keys.
“Online payment is not available in USD” Set the Gravity Forms currency to EUR in Forms → Settings.
“Online card payment is available for totals from 0.30 EUR to 20,000.00 EUR” PayPlug takes amounts from 30 cents to 20,000 euros. Check the form total, or take larger orders another way.
Entries stay Processing after the customer paid Notifications cannot reach a site that is not public (for example a local or password-protected staging site). The return page and the five-minute status check still read the payment; you can also click Refresh status on the entry.
“Too many payment attempts right now” A visitor started more than ten payments in a minute, or the site started more than 300 in an hour. Both limits can be changed with filters.

Uninstall

Uninstalling the add-on from Forms → Settings → Uninstall removes its settings (including the encrypted keys), the status check schedule, its locks, counters and cached checks. Entries, their notes and transactions stay in Gravity Forms, and payments and refunds at PayPlug are not touched.

Plans: one site $49 a year, five sites $69 a year, unlimited sites $199 a year. Questions? Contact GravityExtra support.

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