How to accept payments through WordPress forms
WordPress does not process payments through a form by itself. For a fixed price, you can submit the form and send the visitor to a hosted PayPal payment link; for variable totals, subscriptions, payment status or a true in-form checkout, use a payment add-on and test it in sandbox before going live.
- 01Choose the payment flow
- 02Build the form fields
- 03Set up the manual route
- 04Connect a payment add-on
- 05Control what happens after payment
- 06Test before taking payments
What you need
- A WordPress site with an SSL certificate
- A payment processor account, such as a PayPal Business account
- A form plugin that supports pricing fields or payment integrations
- Administrator access to WordPress
Choose the payment flow
Decide whether the customer must pay inside the form or can be sent to a hosted checkout page. A hosted payment link is suitable for a fixed price, such as a consultation booking or simple donation. The form can collect contact details first and then send the visitor to the payment page.
For variable totals, recurring payments, payment confirmations or fulfilment that should happen only after payment, use a payment add-on. WordPress core and ordinary contact forms do not provide payment processing by themselves.
Build the form fields
Add the fields needed to identify the customer and understand the order: name, email address, product or service choice, quantity and any required notes. If the amount changes according to the visitor's choices, use product and total fields supplied by your form plugin rather than allowing the visitor to type an unchecked amount.
Make the email field required and explain what happens after submission. Do not ask customers to enter unencrypted card details into ordinary text fields.
Set up the manual route
For a fixed amount, create a payment link or buy button in your payment provider's dashboard, then configure the form confirmation to redirect to that hosted checkout page. PayPal's payment links and buttons send buyers to a PayPal-hosted checkout and can be configured with a return URL.
This route is quick, but it has an important limitation: the form submission and payment are separate events. Unless you add custom server-side matching or webhook handling, you cannot reliably tell which form entry was paid, and it is unsuitable for changing totals or subscriptions.
Connect a payment add-on
For payments tied to the form, install and activate the payment integration supported by your form plugin. In Gravity Forms, the PayPal Checkout Add-On is the current PayPal integration for one-time payments and subscriptions. Add a PayPal field or pricing fields to the form, then connect the form to your PayPal account through the add-on settings.
Create a payment feed for the form and choose whether the transaction is a one-time product or service payment, a donation-style payment or a subscription. Map the payment amount to the form total or the relevant product field. Subscription settings include the recurring amount and billing cycle.
Control what happens after payment
Configure the confirmation message and email notifications separately from the payment feed. If you have more than one payment method or payment feed, add a required payment-method field and use conditional logic so only the matching feed runs. Payment add-ons process only one feed per submission; without conditions, the first feed may be used.
Delay fulfilment where possible. For example, do not send a download, create a paid account or release a booking merely because the form was submitted. Use a post-payment action or payment-status check so the action occurs only after the processor confirms payment.
Test before taking payments
Connect the payment account in sandbox or test mode first, submit the form with successful and failed payment scenarios, and check the entry, confirmation, notification and payment status. Then make a small real payment and verify the transaction in the payment provider's dashboard before promoting the form.
Check the site uses HTTPS, the total is correct, the return page works and cancelled payments are not treated as completed. If the integration reports that its webhook is inactive, fix that before launch; webhooks communicate events such as completed, failed or cancelled payments back to the form system.
The fast way: use Gravity Forms with the Gravity Forms PayPal Checkout Add-On, add the pricing and PayPal fields, connect PayPal, create a one-time or subscription feed, and test it in sandbox. It avoids building the payment and payment-status connection yourself while keeping the checkout attached to the form.
Let Gravity Forms PayPal Checkout Add-On do it
Adds PayPal one-time and recurring payments to Gravity Forms, ideal when payments need to happen inside a form.
Sources
- developer.paypal.com /payment-links-buttons/customize/?utm_source=openai
- docs.gravityforms.com /which-paypal-add-on-should-i-use/?utm_source=openai
- docs.gravityforms.com /configure-paypal-checkout-subscriptions/?utm_source=openai
- docs.gravityforms.com /working-with-multiple-feeds/?utm_source=openai
- docs.gravityforms.com /how-to-use-post-payment-actions/?utm_source=openai
- docs.gravityforms.com /creating-webhooks-in-paypal/?utm_source=openai
Questions
- Can WordPress accept payments through a form without a plugin?
- No, WordPress itself does not provide a payment gateway for ordinary forms. You can use a form to collect details and redirect the visitor to a hosted payment link, but a payment add-on or custom integration is needed when the amount is dynamic, the payment must be connected to the form entry, subscriptions are required or fulfilment depends on confirmed payment.
- Can I redirect a form to PayPal after submission?
- Yes, a form can redirect the visitor to a PayPal-hosted payment link or button after submission. This works well for a fixed price, but the form submission and payment remain separate unless you add matching logic or webhook handling. Do not mark an order as paid merely because the visitor reached the form confirmation or returned to your website.
- How do I accept recurring payments through a WordPress form?
- Use a payment integration that supports subscriptions, then map the recurring amount to a product field or the form total and set the billing cycle in its payment feed. Gravity Forms' PayPal Checkout documentation describes subscription settings including recurring amount, billing cycle and retry behaviour. Test renewals and failed payments before enabling the live feed.
- Why did the form submit but no payment arrive?
- A submitted form does not always mean that payment succeeded. Common causes include a payment feed that is inactive, test mode left enabled, incorrect account connection, conditional logic selecting the wrong feed, a missing webhook or a customer cancelling at checkout. Check the form entry, feed settings and payment-provider transaction log, then run a failed and successful test payment.