Are you looking to integrate a WordPress contact form with PayPal?
PayPal is the favorite online payment service for a huge majority of people, thanks to its fast and reliable transactions. Adding a PayPal payment option to your WordPress forms will allow visitors to easily make payments for orders, donations, or any other purpose on your WordPress website.
The best part is that it’s really easy to do this using a powerful form-building plugin like WPForms.
In this post, we’ll show walk you step-by-step through making a WordPress contact form that accepts PayPal payments.
Let’s jump right in!
Does PayPal Integrate With WordPress?
PayPal integrates with WordPress in several ways. The traditional way is by installing an eCommerce plugin with native PayPal integration—like WooCommerce, for example.
But that’s not the only way to add PayPal to WordPres. You can also create a custom PayPal form using contact form plugins. Some popular plugins like Contact Form 7 and WPForms support native PayPal integration.
Using forms with PayPal payments is ideal if you want to let users pay you for purchase orders, send donations, or perform transactions for any other purpose.
How to Make a Contact Form With PayPal in WordPress
In This Article
1. Install and Activate WPForms
WPForms is the best WordPress plugin for making contact forms with PayPal payments. It’s a beginner-friendly plugin that requires no code to work with and includes tons of useful extra features.
Although some other options like Contact Form 7 also support PayPal payments, WPForms is a more powerful solution and is considerably easier to use. You can take a look at our WPForms vs. Contact Form 7 comparison for more details.
You’ll need a WPForms Pro or a higher plan to unlock PayPal payments for your forms.
After purchasing WPForms Pro, log in to your WPForms dashboard and head to the Downloads tab to find your WPForms Pro download file.
Once the file is downloaded, you can go ahead and install WPForms on your site. If you need assistance, see our doc guide on installing WPForms for detailed instructions.
2. Install and Connect WPForms PayPal Commerce Addon
Once WPForms Pro is active on your site, you’ll need to install the PayPal Commerce addon to be able to add PayPal to WordPress. This addon allows you to add a PayPal checkout field to your forms so you can easily take payments from your customers.
To install the addon, navigate to WPForms in the WordPress dashboard, then click on Addons.
Scroll down to find the PayPal Commerce addon or search for it using the search bar. Then, click Install Addon under PayPal Commerce Addon.
Note: PayPal Commerce is not to be confused with PayPal Standard. While both addons allow you to add PayPal checkout to your forms, PayPal Commerce offers a few more powerful features. We’ll be using PayPal Commerce in this tutorial.
Once the addon is installed, the next thing to do is connect your website with your PayPal account. From the WordPress dashboard, navigate to WPForms » Settings.
Once in, click on Payments.
Scroll down to the section labeled PayPal Commerce to find the WPForms PayPal settings. Then click Connect with PayPal Commerce.
This will redirect you to PayPal’s website, where you’ll be prompted to enter the PayPal email address associated with your Business account and select your country from the dropdown. Then press Next.
Note: You’ll need a PayPal Business account to connect with PayPal Commerce.
If the integration was successful, the Connection Status will show that you’re connected to PayPal in Production mode.
If you’d like to test PayPal Commerce first, see our doc on using PayPal Commerce in Sandbox mode.
Scroll down and click Save Settings and that’ll be all for this stage.
Great! Now PayPal is connected to your WordPress site.
The next step will be creating a new form in the WPForms form builder, where you’ll integrate a PayPal Commerce field.
3. Create a Simple Contact Form
It’s really easy to create a simple contact form using WPForms. You can create your payment form from scratch using the drag and drop form builder, or simply use one of the 500+ prebuilt form templates to get started.
To access the WPForms form builder, open your WordPress dashboard and go to WPForms » Add new.
This will open up the template library. Hover over Simple Contact Form and click Use Template to open it in the form builder.
As you can see below, you’ll have a basic contact form with fields such as name, email, and comment/message.
You can customize this template by adding or removing any fields you’d like. By default, the simple contact form template doesn’t include any payment fields.
We’ll be adding payment fields in the next step.
4. Set Up Payment Fields
You’ll need at least one payment field for the products or services that you’ll be selling. There are 4 options to choose from, which are:
- Single Item – When you’re selling only one item.
- Multiple Items – When you have multiple items only but only one of which can be selected (like different subscription plans).
- Checkbox Items – When you have multiple items with the option to select one or more of these (like different merchandise).
- Dropdown items – When you want users to be able to select only one of the available items in a dropdown menu.
For example, if you sell items of clothing, you could add a Checkbox Items field that allows users to order multiple items of clothing from the same form.
Here’s how to do this:
First, add a Checkbox Items field to your form by clicking on it or dragging it into position on your form template.
Click on the Checkbox Items field in your form to open up Field Options on the left-hand pane.
Field Options let you edit the label of your fields and add the name and value of the items you’re selling.
You may want to change the label “Checkbox Items” to something that better reflects the items you’re selling. We’ll label our Checkbox “Sullie Merch” for this example.
You can also edit the default labels for each item on the checklist. We’ll replace “First Item” with “Sullie Shirt”, “Second Item” with “Sullie Socks”, and “Third Item” with “Sullie Hat”.
Don’t forget to set a price for your items in the price field right next to the item label.
If you want the price to appear after each item label on the frontend, make sure to enable the Show price after item labels option.
Finally, you can add a description for your items if you’d like.
Here’s what our form looks like now:
Users can order any product from this form by simply checking the boxes next to each item.
However, there’s one more important step we have yet to go over: adding a PayPal checkout field to this form to enable transactions.
5. Add and Customize the PayPal Commerce Field
You’ll find the PayPal Commerce checkout field under the Payments Fields section on the left-hand pane of the form builder. Simply drag and drop it onto your form to add the field.
When you include the PayPal Commerce field in your form, you’ll see a modal prompting you to enable PayPal Commerce payments. Press OK.
Before enabling payments, let’s first customize the PayPal Commerce field.
As you’ll see, PayPal Commerce supports both PayPal and credit card payments.
There are lots of neat things you can do with the PayPal Commerce field. To access Field Options, click anywhere on the PayPal Commerce field.
You can then select which payment options between PayPal checkout and credit card should be available for visitors (you can include either one or both options). Plus, you can also select which credit cards you’re accepting payments from by simply using the toggle buttons under Supported Credit Cards section.
If you’d like to change the appearance of the PayPal Commerce field, you can find more options in the Advanced tab under Field Options.
Here, you can change the field size, and adjust the size, shape, and color of the PayPal checkout button.
When you’re done customizing the field, it’s time to enable PayPal Commerce and configure payment processing settings.
From the sidebar, click on Payments » PayPal Commerce.
You’ll have two options here: enable one-time payments or recurring payments.
Selecting one-time payments will expand a menu where you can map some fields (name, email, and address) from your form to your PayPal billing.
If you’d like instead like to include recurring payments, PayPal Commerce makes that very easy to configure.
Recurring payments are great for businesses offering subscription plans or payments in installments. There are no limits on how many plans you can create, but only one plan can be processed at a time.
The PayPal Commerce addon allows you to freely select recurring times and total cycles for your subscription plan. Use these settings to configure the frequency of payments that works for you and your users.
Note: Credit cards aren’t supported for recurring payments.
It’s possible to add multiple types of pricing options on the same form using conditional logic. Let’s take a look at how you can achieve that next.
6. Adding Conditional Logic to PayPal Commerce (Optional)
Conditional logic gives you a lot of freedom to change the behavior of the PayPal Commerce field depending on user responses.
One possible scenario is when you want to define logic so that the checkout field only appears if a user meets certain criteria. Or you may want to add multiple pricing plans with different recurring periods and other payment details.
In these scenarios, WPForms’ conditional logic can be incredibly handy.
Let’s say that you want customers to be able to choose a recurring period between monthly and annual payments.
We’ll first add a Multiple Items payment field and label it “Choose your plan“, with two options.
Now we’d want PayPal to process a charge depending on the customer’s selection between these two options.
For this, go back to Payments » PayPal Commerce and click on Enable Conditional Logic under one-time payments or recurring payments (depending on which scenario applies in your case).
In our scenario, we’ll use conditional logic for recurring payments. After enabling conditional logic, you should see a new set of options for setting up your rules.
We’ll set up two separate rules: one for charging payments monthly and the other for charging payments annually.
For monthly, we selected the Recurring Times setting to Monthly. Then, we defined the logic which says: Process this charge if the Choose your plan field is Monthly.
After that, we’ll create another plan for users that prefer an annual subscription. Click on the Add New Plan button to start.
Enter a plan name and press OK.
This time, we’ll select Yearly in the Recurring Times dropdown. The conditional logic here is defined as: Process this charge if the Choose your plan field is Annual.
Make sure to press Save after configuring these settings.
To summarize, we just added an option for customers to choose between monthly and annual subscription periods using conditional logic.
Now, when a user selects their preferred subscription period, they’ll be charged for the price you set for it and only on the defined recurring time.
7. Publish Your Form
You can add your form to a page right from the form builder. At the top right corner of your screen, you’ll see the options to Embed or Save your form.
Since we’re trying to add our form to a page right away, go ahead and click Embed.
This will redirect to a modal with the options to either embed the form in an existing page or create a new page and then embed it.
We’ll assume you’d like to create a new page, but the process is similar for both steps. For this guide, we’ll click on Create New Page.
Give your new page a name and click Let’s Go!
Your new PayPal Commerce-enabled form will now be visible on the new page. Publish the page and check it out on the frontend.
And that would be all for integrating a contact form with PayPal in WordPress. Now, you can start collecting payments using forms on your website!
Next, Create an Online Order Form in WordPress
We’ve just shown you how to add PayPal payments to your contact forms in WordPress. While this can work with pretty much any of your forms, it may be best to use an online order form to simplify the process even further.
Check out our guide to making an online order form in WordPress.
And remember, WPForms offer compatibility with multiple top payment gateway options, including Stripe.
Don’t wait to start building your online order form. Get started with the most powerful WordPress form plugin today. Looking for a free order form? WPForms Pro comes with a free online order form template and a 14-day money-back guarantee.