Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Setup & site building · Guide

How to Create Payment Form in WordPress (Step by Step)

How to Create Payment Form in WordPress (Step by Step)

Short answer

To create a payment form in WordPress, install a form plugin with payment support such as WPForms, Gravity Forms or Fluent Forms. Connect it to Stripe or PayPal, add item, total and card fields, then test it in test mode. Embed the form on a page with its block or shortcode and switch to live mode.

Key takeaways

  • WordPress needs a plugin and a gateway to take payments.
  • WPForms, Gravity Forms and Fluent Forms all support payment fields.
  • Always test with your gateway's test cards before going live.
  • Gateways handle card data, but your site still needs HTTPS.
  • Use WooCommerce instead when you sell a catalog of products.

How do you create a payment form in WordPress?

Install a form plugin that supports payments, connect it to a gateway such as Stripe or PayPal, add payment fields to a form, test it in test mode, then embed it on a page.

WordPress cannot take payments on its own. A plugin handles the form, and a payment gateway processes the card and sends the money to your account.

Payment forms suit donations, deposits, event fees, service bookings and simple one-off products. If you sell many products with stock and shipping, a full store plugin is usually a better fit.

The steps below use the common pattern most form plugins follow. Menu names differ a little between plugins, so check your plugin's documentation for exact labels.

Which plugin should you use for a payment form?

Pick a form plugin you already know if it supports your gateway, or a dedicated payment plugin if you only need checkout forms; use WooCommerce when you sell a catalog of products.

Here is how the main options compare:

OptionBest forGateways to check
WPFormsBeginners who want a drag-and-drop builderStripe in the free version, more in paid plans
Gravity FormsComplex forms with conditional logicStripe, PayPal and others through add-ons
Fluent FormsFast, lightweight forms with payment fieldsStripe and PayPal, more in Pro
Formidable FormsForms that also store and display dataStripe and others depending on plan
WP Simple PayStripe-only payment and subscription formsStripe
WooCommerceFull shops with products, stock and ordersMany gateways through extensions

Feature sets and prices change often. Look at each plugin's pricing page before you commit, especially for recurring payments and transaction fees.

If you already use one of these for contact forms, start there. Our guide to using WPForms covers the basics of that builder.

Gravity Forms users can follow our guide on using Gravity Forms for its add-on setup.

How do you set up a payment form with WPForms?

Install WPForms, connect Stripe in the payments settings, create a form from a payment template or blank form, add item and card fields, then enable Stripe payments in the form's settings.

  1. Go to Plugins > Add New, search for WPForms, then install and activate it.
  2. Open WPForms > Settings > Payments and click the button to connect with Stripe. You log in to Stripe and approve the connection.
  3. Go to WPForms > Add New and pick a payment or order template, or start blank.
  4. Add payment fields such as Single Item, Multiple Items or Checkbox Items, plus a Total field.
  5. Add the Stripe credit card field, which collects card details securely.
  6. Open the form's Payments settings and turn on Stripe payments, then map the name and email fields.
  7. Save the form.

The free WPForms Lite plugin supports Stripe. WPForms says the free version adds an extra fee on transactions, which paid licences remove, so check its Stripe with WPForms Lite page for current terms.

How do you add a payment form to a page?

Edit the page, add your form plugin's block, choose the payment form from the dropdown, then publish or update the page.

Most form plugins add their own block to the editor. Search for the plugin's name in the block inserter.

You can also use a shortcode. Form plugins show it on the forms list, and you paste it into a Shortcode block.

Put the form on a clear, focused page. A short headline, the price, what the buyer gets and the form itself convert better than a form buried in a long article.

Our guide on adding a page to WordPress walks through creating and publishing the page itself.

What fields should a payment form have?

A payment form needs the buyer's name and email, a clear item or amount field, a total, the card or gateway field, and any details you need to deliver the product or service.

Keep it short. Every extra field gives people another reason to leave.

  • Name and email: Needed for receipts and for contacting the buyer.
  • Item or amount: A fixed price, a choice of items, or a user-entered amount for donations.
  • Quantity: Only if people can buy more than one.
  • Total: Shows the final amount before they pay.
  • Card field or gateway button: Provided by the plugin and gateway.
  • Delivery details: Address or booking date only if you actually need them.

Add a consent checkbox for your terms or refund policy if your business needs it. This is general information, not legal advice, so check local rules on consumer payments and refunds.

How do you test a payment form before going live?

Switch the plugin or gateway to test mode, submit the form with a test card number from your gateway, confirm the payment shows in your test dashboard, then switch back to live mode.

Stripe publishes test card numbers that simulate successful payments, declines and cards that need extra authentication.

Run at least these checks:

  1. A successful payment, and confirm the entry and the Stripe test record match.
  2. A declined card, and check the error message is clear.
  3. A card that needs authentication, if you sell to regions that use it.
  4. The confirmation message or redirect after payment.
  5. The email receipts to you and to the buyer.

Only switch to live mode after every check passes. Make one small real payment and refund it to be sure live keys work.

Our guide to testing WooCommerce payments covers the same idea for store checkouts.

Do you need SSL and PCI compliance for payment forms?

Yes, your site should run on HTTPS, and while gateways like Stripe and PayPal handle most card security, you are still responsible for your part of PCI compliance.

Most modern form plugins never store card numbers on your server. The gateway's secure field or hosted page takes the card details directly.

That reduces your PCI scope a lot, but it does not remove it. The PCI Security Standards Council sets the rules, and your gateway tells you which self-assessment applies.

Keep WordPress, your theme and plugins updated, use strong admin passwords, and remove plugins you no longer use. This is general information, not legal or compliance advice.

If your site still shows a not secure warning, fix that before taking payments. Our guide on why a WordPress site is not secure explains SSL problems.

Can you take recurring payments with a form?

Yes, several form and payment plugins support subscriptions through Stripe or PayPal, but recurring payments are often limited to paid plans.

Recurring payments suit memberships, monthly donations and retainers. The gateway stores the payment method and charges it on a schedule.

Check how cancellations work before you launch. Buyers should be able to stop a subscription easily, and you need to know where to manage it in your gateway dashboard.

If you need member areas or content restrictions as well, a membership plugin may fit better than a form plugin alone.

When should you use WooCommerce instead of a form?

Use WooCommerce when you sell several products, need stock control, shipping, tax rules, coupons or order management; a payment form is better for a single service, fee or donation.

A form is quick to set up and light on your site. It has no cart and no product pages.

WooCommerce gives you a full store, with more setup and maintenance. Our guide on setting up Stripe in WooCommerce shows the gateway side of a store.

If you are unsure how gateways work in general, our explainer on what a payment gateway is covers fees and payouts.

Why is my WordPress payment form not working?

Payment forms usually fail because the gateway is still in test mode, the connection to Stripe or PayPal has expired, a caching or security plugin blocks the form, or emails are not being delivered.

Work through these checks:

  • Wrong mode: Live forms with test keys, or test forms with live keys, reject payments.
  • Disconnected gateway: Reconnect from the plugin's payment settings.
  • Caching: Exclude the payment page from page caching so security tokens stay fresh.
  • JavaScript conflicts: Card fields rely on scripts. Disable other plugins one by one to find a clash.
  • Missing receipts: Payments work but emails fail. Set up SMTP so notifications arrive.

If notifications are the problem, our guide to forms not sending email covers SMTP setup.

Spam submissions are another common issue, and our guide on stopping form spam helps with that.

Frequently asked questions

Can I create a payment form in WordPress for free?

Yes. Some free form plugins, such as WPForms Lite, support Stripe payments. Free versions may add an extra transaction fee or limit features like subscriptions, so check the plugin's current terms before launching.

Which payment gateway is best for WordPress forms?

Stripe and PayPal are the most widely supported by form plugins. Stripe works well for card payments on your own page, while PayPal suits buyers who prefer paying through their PayPal account.

Do I need WooCommerce to accept payments?

No. A form plugin with payment fields can take one-off payments, donations and deposits without a store. WooCommerce makes more sense when you need products, a cart, stock control and shipping.

Is it safe to take card payments through a WordPress form?

It can be, when the form uses the gateway's secure card field and your site runs on HTTPS. Card numbers then go straight to the gateway, not your server. Keep WordPress and plugins updated.

How do I test a payment form without real money?

Turn on test mode in your form plugin or gateway, then submit the form using the gateway's published test card numbers. Check the entry, the test payment record and the email receipts before switching to live mode.

Sources

  1. Creating a Payment Form WPForms
  2. Using Stripe With WPForms Lite WPForms
  3. WPForms Lite WordPress.org Plugin Directory
  4. Testing Stripe Docs
  5. PCI Security Standards Council PCI SSC

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.