How to Integrate PayLexer with WPForms
Connect PayLexer to WPForms to take one-time payments and subscriptions with any payment gateway, using the PayLexer for WPForms add-on.
WPForms is a WordPress form builder with built-in payment support. PayLexer for WPForms is PayLexer's own add-on for it, and lets your forms accept payments and subscriptions across multiple payment gateways. It adds every gateway you connect in PayLexer, such as Stripe, PayPal and more, to WPForms' own Payments settings in the form builder, each as its own payment method. You switch each gateway on and choose Test or Live under Settings → Payments, then pick the gateways per form in the builder. It works with both WPForms Lite and WPForms Pro.
WPForms needs two PayLexer plugins: the PayLexer plugin, which connects your site to PayLexer, and the PayLexer for WPForms add-on, which brings your gateways into your forms. The add-on never sees or stores gateway credentials.
Supported Features
- One-time payments - Use WPForms' own payment fields and total. The customer pays on the gateway's secure hosted page or popup.
- Subscriptions - Turn on WPForms' Recurring Payments plan for a gateway. The gateway bills every renewal, and each one is added as its own payment.
- One payment method per gateway - Each gateway you connect in PayLexer gets its own section under WPForms → Settings → Payments, with a Status switch and a Test Mode switch, like WPForms' own Stripe. On each form, Payments in the builder lists the gateways you turned on, with switches for one-time and recurring payments.
- WPForms does the rest - Payments show under WPForms' own Payments screen. The form's notification emails and confirmation wait until the payment is confirmed.
- Refund and cancel from WPForms - WPForms' own Refund and Cancel buttons send the refund or cancellation to the gateway through PayLexer. Refunds made in the gateway's dashboard or the PayLexer dashboard are recorded on the payment.
- PayLexer Details on every payment - See the customer email, gateway, transaction ID and PayLexer order ID.
- Multiple payment gateways and websites - Connect and manage several gateways and websites from one PayLexer account.
Before You Start
Make sure you have the following before starting:
- Admin access to your WordPress site.
- WPForms 2.0 or later, installed and active. The free WPForms Lite is enough. You don't need WPForms Pro. Download WPForms →
- PayLexer plugin 2.1.4 or later. You install it in the first integration step below.
- The email address you want to use for PayLexer. If you don't have a PayLexer account yet, one is created for you while you connect.
- A payment gateway account, such as Stripe or PayPal. If you're new to PayLexer, you configure it after connecting your website. Choose and configure a gateway →
Setup Journey
If you haven't configured PayLexer yet, follow these steps in order before continuing:
Getting Started
Complete the PayLexer setup. Setup guide →
Connect Your Website
Install the PayLexer plugin and select Connect Account. Connect your site →
Configure Payment Gateway
Choose and configure your gateway. Gateway docs →
Platform Integration
You're here! Continue below.
Test Transactions
Verify everything works. Test guide →
Integration Steps
Install the PayLexer WordPress Plugin
- Go to WordPress Admin → Plugins → Add New Plugin.
- Search for PayLexer, then click Install Now.
- Click Activate to enable the plugin on your site.

Connect Your PayLexer Account
- In the WordPress sidebar, go to PayLexer. The General page opens with the Connect to PayLexer card.
- Click Connect Account and enter your email address. What happens next depends on your account:
- New to PayLexer: your account is created and your website is connected.
- Existing account: enter your password to sign in and connect.
- Already signed in on this browser: you skip the password and go to the authorization page. Check the account and website, tick the terms checkbox, then click Connect Account and Authorize.

You only connect once. Every gateway you configure in PayLexer runs through this connection.
Prefer to start from PayLexer? Add your website from Websites → Add Website, then finish with Connect Account in the plugin. See both ways to connect →
Install the PayLexer for WPForms Add-on
- On the PayLexer General page, find PayLexer for WPForms under Available Add-ons.
- Click Install, then click Activate.

You can also install it from Plugins → Add New Plugin by searching for PayLexer for WPForms.
You can activate the add-on before WPForms or the PayLexer plugin are ready. Until both are installed and active, it shows a notice in the WordPress admin with a button to install, activate or update them, and adds nothing to your forms.
Check the Connection
- In WordPress, the card on the PayLexer General page changes to Connected to PayLexer with the status Active, and shows the email of your PayLexer account.
- On the same page, WPForms shows as Activated under Supported Integrations, and PayLexer for WPForms shows as Activated under Available Add-ons.

- In the PayLexer dashboard, go to Websites. Your website appears in the table with the status Connected.

On failure: Click Connect Account again and check the email and password you entered. Your website must show as Connected before payments can be processed.
Enable Your Gateways in WPForms
- Go to WPForms → Settings → Payments. A PayLexer section shows the Connection Status, with a Manage in PayLexer link.
- Below it, each gateway connected in PayLexer has its own section with a Status switch and a Test Mode switch. The line under the gateway name shows whether it works in Live and Test mode and accepts your WPForms currency.
- Turn Status on for the gateways you want to offer, and set Test Mode.
- Click Save Settings.


Until you save, every gateway is on and in Test Mode. A gateway can only be used on a form when it accepts the currency set at the top of Settings → Payments.
Build the Payment Form
- Go to WPForms → All Forms, then edit the form you want to take payments on, or create a new one.
- Add the fields that set the amount, from Payment Fields: for example a Single Item, a Multiple Items or a Total field.
- Add an Email field for the customer. A Name field is optional.
- Click Save.


The form needs an Email field. Without one, the customer sees "This form needs an Email field to take payments." when they submit.
Turn On a Gateway for the Form
- In the form builder, go to Payments. The gateways you turned on under Settings → Payments are listed, named after the gateway, such as Stripe or PayPal.
- Open a gateway and turn on Enable one-time payments.
- Click Save.

You can turn on several gateways on the same form. Gateways you don't turn on here, or that are switched off under Settings → Payments, aren't offered to customers.
Keep AJAX Form Submission On
- In the form builder, go to Settings → General → Advanced.
- Make sure Enable AJAX form submission is turned on, then click Save.

Gateways that open a popup need AJAX. If it is off and the gateway needs it, the customer sees "This payment method needs AJAX form submission. Turn it on under the form's Settings → General → Advanced."
Publish and Test the Form
- Add the form to a page or post with the WPForms block or shortcode, then open it on the front end.
- Fill in the form, choose a payment method and submit.

See Test Mode before taking real payments. Test or live is set per gateway under Settings → Payments, so it applies to every form.
What Customers See
- The customer fills in your form. If you turned on more than one gateway, a Pay with list appears above the submit button, with each gateway's name and card icons. With a single gateway there is nothing to choose.
- They submit the form and pay on that gateway's own secure payment page or popup. Card and account details are entered there, never on your site.
- They return to your site and see your form's confirmation (message, page or redirect) as soon as the payment goes through.
If the payment is still being confirmed when the customer returns, they see "Thank you. Your payment is being confirmed." If it did not go through, they see "The payment did not go through. Please try again."
Cancelling on the payment page and closing it are not the same. If the customer cancels on the gateway's page, the payment is marked Failed. If they close the page without paying, the form simply stays as it was and the payment stays pending.
The form's notification emails wait until the payment is confirmed, so nothing goes out for an unpaid submission. If the customer never pays, the emails are never sent.
Selling Subscriptions
To bill a form as a subscription, turn on Recurring Payments for a gateway in the form builder, under Payments. The gateway charges the customer on each renewal date, PayLexer reports it, and the add-on adds each charge as its own payment under WPForms → Payments.
- Open the gateway under Payments and turn on Enable recurring subscription payments.
- Set the plan:
- Plan Name - Shown to the customer and in PayLexer. If empty, the form name is used.
- Recurring Period - Daily, Weekly, Monthly, Quarterly, Semiyearly or Yearly.
- Customer Email - The form's Email field.
- Customer Name - The form's Name field.
- Click Save.
The amount charged on each renewal is the form's payment total.

The add-on supports one plan per form, with no free trials, sign-up fees or pause and resume buttons. Recurring Payments only appears for gateways that can bill subscriptions. If you turn on both one-time and recurring payments for a gateway, the form is billed as a subscription.
With 2Checkout, the customer must leave Enable auto-renewal ticked on 2Checkout's checkout page, or the subscription is not renewed. 2Checkout cancels a subscription by turning off automatic billing, so it can show Active until the paid period ends.
Managing Subscriptions
- Cancel from WPForms: open the subscription under WPForms → Payments and click Cancel. The add-on cancels it at the gateway first, and records it in WPForms only when that succeeds.
- Changes made elsewhere: renewals, failed renewals and cancellations made at the gateway or in PayLexer update the subscription. Each renewal is added as its own payment, a failed renewal marks the subscription Past Due, and a cancelled subscription never moves again. Pauses and resumes are noted in the payment log only, because WPForms has no status for them.
WPForms works out its own Renewal Date from the last payment and the plan's period. It can differ from the gateway's date after an early renewal.
Customize Gateway Settings
Under WPForms → Settings → Payments, each gateway has two switches that apply to every form:
- Status - Offer the gateway in the form builder and on forms. Turn it off to hide it everywhere.
- Test Mode - Use the gateway's sandbox with your Test credentials, or turn it off to process real payments with your Live credentials. A gateway you haven't saved yet starts on Test Mode.
Under Payments in the form builder, each form chooses from the enabled gateways:
- Enable one-time payments - Offer the gateway for one-time payments on this form.
- Enable recurring subscription payments - Bill the form as a subscription on this gateway, when it supports subscriptions.


A gateway you turn off under Settings → Payments disappears from the form builder. Forms that used it stop offering it, and if you save such a form in the builder its settings for that gateway are not kept.
Payments and Refunds
Payment Status
Payments appear under WPForms → Payments with WPForms' own statuses. A payment is marked:
- Completed when the payment is confirmed, either by PayLexer's verified webhook or by the status check when the customer returns from the gateway.
- Failed when the customer cancels or the gateway reports a failure. A later successful payment still moves it to Completed.
- Refunded or Partially Refunded when money is returned.
A Completed, Refunded or Partially Refunded payment never moves back to an earlier status, except when a refund is voided at the gateway: it then returns to Completed or Partially Refunded, matching what the gateway now holds.
Subscriptions show Active, Past Due or Cancelled.
PayLexer Details
Every payment taken through PayLexer has a PayLexer Details box under WPForms' own Details box, with the customer email, the gateway, the transaction ID and the PayLexer order ID, each with a link.

Refunds
- From WPForms: open the payment under WPForms → Payments and click Refund. The add-on sends the refund of the remaining balance to the gateway through PayLexer. The payment is updated when the gateway confirms it, and the message says "Refund requested. The status updates when the gateway confirms it."
- From the gateway or PayLexer: full and partial refunds made in the gateway's dashboard or the PayLexer dashboard are recorded on the payment, and its status updates to match.
WPForms only shows Refund and Cancel next to a transaction link. If the gateway didn't send one, the View in [gateway] link goes to the PayLexer Details box on the same payment.
If PayLexer refuses a refund, the add-on shows the reason and nothing is recorded as refunded. Refund it in PayLexer or at the gateway instead. Don't refund the same payment twice.
Test Mode
PayLexer supports full testing without real charges through each gateway's Test Mode switch under WPForms → Settings → Payments.
How Test Mode Works
- Add the gateway's Test credentials in PayLexer, on the Payment Gateway Configuration page.
- Go to WPForms → Settings → Payments, find the gateway and turn on Test Mode.
- Click Save Settings.
- Submit a form that offers the gateway, using the gateway's test card. To see the test payment, turn on Test Data under WPForms → Payments, then check that it is marked Completed.
When Test Mode is on:
- PayLexer uses your Test credentials from the Payment Gateway Configuration page.
- Payments are processed in test mode, so no real money moves.
- It applies to every form that offers the gateway.
When Test Mode is off, PayLexer uses your Live credentials instead.

Test mode only works if you added the gateway's test (sandbox) keys in PayLexer. A gateway starts on Test Mode until you save the setting, so switch it off under Settings → Payments before going live.
Payment Flow Overview
A new PayLexer order is created for every payment attempt, including each subscription renewal.
Next Steps: Test Transactions
After setting up your form, check the full payment flow before going live.
- Basic testing: Keep Test Mode on for the gateway under Settings → Payments and submit a form without real charges.
- Advanced testing (subscriptions, refunds, multi-gateway): Follow the dedicated guide. Test Transactions & Platform Integration →
Troubleshooting
Best Practices
- Always test with Test credentials before switching to Live.
- Enable webhooks for better reliability and real-time payment event syncing.
- Keep an Email field on every payment form.
- Keep AJAX form submission on for forms that take payments.
- Run one small real payment after going live to confirm everything works end to end.
- Before removing the add-on, cancel active subscriptions. They keep billing at the gateway, but WPForms can't record the renewals while the add-on is off.
Final Checklist
Before going live, confirm all of the following:
- The Connected to PayLexer card shows Active in WordPress
- Your website shows as Connected in the PayLexer Websites table
- WPForms shows as Activated under Supported Integrations
- PayLexer for WPForms shows as Activated under Available Add-ons
- At least one gateway is added to your website
- WPForms → Settings → Payments → PayLexer shows the gateway with Status on, and it accepts your currency
- The form has an Email field, and the gateway is turned on under Payments in the form builder
- Payment gateway tested successfully with Test Mode on
- Live credentials added (not just test)
- Test Mode turned off, and saved, for every gateway you offer
FAQs
Still Have Questions?
PayLexer Support
Open a support ticket with the PayLexer team.
WPForms Support
Visit the official WPForms support resources.
For settings and advanced configuration, see the WPForms documentation.