Would you like to use PayPal Commerce to manage payments on your WordPress site? The PayPal Commerce addon for WPForms makes it easy to process credit card and PayPal payments through your forms.
This tutorial will show you how to install and use the PayPal Commerce addon for WPForms.
In This Article
Requirements: To use the PayPal Commerce addon for WPForms, you’ll need:
Before getting started, you’ll first need to make sure WPForms is installed and activated on your WordPress site. Once you’ve verified your license, you can install and activate the PayPal Commerce addon.
Note: Be sure to disable the PayPal Standard addon if you have it installed. Both PayPal addons can’t be used at the same time.
Connecting to PayPal Commerce
WPForms makes it easy to connect to PayPal Commerce in just a few steps. When you’re ready to connect, in the WordPress dashboard, go to WPForms » Settings and click the Payments tab to access your payment settings.
Next, scroll to the PayPal Commerce section and click Connect with PayPal Commerce to open the login window.
Note: A PayPal Business account is required to connect your site to PayPal Commerce.
Enter the email address associated with your PayPal Business account in the email field.
Then, choose your country or region from the dropdown list.
Note: PayPal Commerce is currently unavailable to users in Switzerland. You won’t be able to connect your PayPal account to PayPal Commerce from this region.
Once you’ve entered your email and location, click Next to continue.
In the next login screen, enter your password in the password field.
Once you’ve completed the setup process, your settings will show that your site is connected in Production mode.
Note: If you’d like to test payment transactions on your site, you’ll need to enable Test Mode. For more information, see our comprehensive guide to testing payments with PayPal Commerce.
PayPal Commerce offers a wide range of features for handling payments. This section will detail the setup process, supported payment methods, and how to view and manage payments on your WordPress site.
Setting Up Payments
Once your site is connected to PayPal Commerce, you can add this integration to any of your forms. To do this, either create a new form or edit an existing form to access the form builder.
If you’d like, you can use a form template or start with a blank form and add your customizations however you’d like.
Note: Want to learn more about using payment forms? Our guide to setting up payment forms has extensive information to help you on your way.
Next, click or drag the PayPal Commerce field to the preview area.
After adding the PayPal Commerce field, you’ll see a popup telling you to enable PayPal Commerce payments.
Click the OK button to dismiss the dialog.
In the sidebar, click Payments to access the payment integration settings.
Next, click on PayPal Commerce to configure this integration.
On the next screen, you’ll see 2 different payment frequency options: One-Time Payments and Recurring Payments. You’ll need to choose at least 1 to allow your form to process payments.
Both payment frequencies can be enabled simultaneously if conditional logic is enabled. When your form is submitted, only 1 of either payment frequency will be used, depending on the rules you’ve set up in your conditional logic.
Customers can make non-recurring payments for products and services with one-time payments. To enable one-time payments, set the Enable one-time payments toggle to the on position.
After this setting is enabled, some additional settings will become available. These are optional, and pass the corresponding information from your form to PayPal Commerce.
Among them, the following fields are available:
When selected, each of these fields is mapped to a corresponding field in your form. For example, you’ll need an Address field in your form to set up a value for the Billing Address option.
Note: Selecting a value for each field is optional. To leave a specific field blank, leave the value in its dropdown list as unset.
This field sets the name of the customer making the payment. It draws from an existing Name field in your form. To choose which field to use, select a Name field from the dropdown list.
If you set a value for the Email field, it passes an email from your form to PayPal. To map an existing field from your form, choose the corresponding field in the Email dropdown list.
With this field, the customer’s mailing address can be mapped from a field in your form. Select a field to map to the Billing Address in PayPal, and select any Address field from your form using the Billing Address dropdown list.
With this option, you can add additional details about each one-time payment. The description should be entered in the Payment Description field.
This field is not shown to the customer on the frontend but will be visible in your PayPal dashboard.
This field pulls the customer’s shipping address from your form and passes it through to PayPal. To select a field from which to map the shipping address, choose a corresponding field from the Shipping Address dropdown list.
If left blank, no shipping address is requested.
Recurring payments, also called subscriptions, are set up and stored as individual plans. Your form can have as many plans as you’d like, but only 1 plan can be processed at a time.
Note: Credit card fields are not supported for subscriptions.
To enable recurring payments from the form builder, go to Payments » PayPal Commerce and toggle on the Enable recurring subscription payments option.
By default, a single plan is created for you. If you need additional plans, click the Add New Plan button.
In the dialog, give the new plan a name, then click the OK button to continue.
If you’d like to remove a plan, click the red trash can icon in the top right corner of the relevant plan.
Configuring Recurring Payment Plans
Several parameters are available for configuration for each plan, including:
Note: After saving your form, you won’t be able to edit the Plan Name, Product Type, or Recurring Times for an existing plan.
If you’d like to change these parameters, you’ll need to remove the existing plan and add a new plan.
Every subscription plan requires a name. For example, the default plan is called Plan Name #1.
Replace the text in the Plan Name field to rename any plan before saving your form.
You won’t be able to change this value in existing plans after saving your form.
This option allows you to choose the type of product you are selling. There are 3 product types available:
Go ahead and select your product type from the Product Type dropdown list.
Note: The product type is only displayed in the PayPal dashboard and not in your WPForms entries.
This option allows you to choose how often customers will be charged for each subscription. The available intervals include:
To select an interval, click the Recurring Times dropdown list and choose the interval you want to use for your plan.
This option allows you to choose how long a subscription should last by setting a maximum number of payment cycles. For example, if you select a value of 5, the subscription will last for 5 recurring payments.
To select a value for this field, choose a number between 1 and 99 from the Total Cycles dropdown list. Alternatively, use the default value of Infinite if you need to set up an indefinite subscription.
If set, this field grabs the customer’s shipping address from your form and conveys it to PayPal. A corresponding Address field is needed to map this information from your form.
To set this up, select the appropriate Address field from the Shipping Address dropdown list.
If this field is left blank in your payment plan’s settings, no shipping address is assigned.
There are 2 other options associated with recurring payment plans. Each can be enabled by setting the associated toggle switches to the on position.
- Try to bill the customer again if the payment fails on the 1st attempt: When this option is enabled, PayPal will attempt to bill the customer again upon failing to complete the 1st payment.
- Enable Conditional Logic: This option allows you to tap into the WPForms conditional logic system for fine-grained control over payments.
Supported Payment Methods
To be able to utilize the PayPal Commerce field, you’ll need to select at least 1 of the 2 supported payment methods:
To access payment settings, select the PayPal Commerce field and go to Field Options in the sidebar.
By default, both methods are enabled and available to customers. If you’d like to disable either option, set its toggle to the off position.
Credit Card Payments
This method allows customers to use credit cards from supported and enabled providers. You can choose which cards your site accepts by toggling their options on or off as needed.
This method allows customers to make payments using any payment method they’ve set up in their PayPal account.
Note: When using this payment method, your form’s submit button will be replaced with a PayPal button.
Choosing the Default Payment Method
To choose the default payment method, click on the Default Payment Method dropdown list and select PayPal Checkout.
Once you’ve configured your payment methods, be sure to save your form.
Enabling Conditional Logic
The PayPal Commerce addon supports conditional logic to control payment methods and plans further. You can enable conditional logic for one-time payments and recurring payments.
Note: If you’re using conditional logic with multiple recurring payment plans, only 1 plan can be processed at a time. If multiple plans match your conditional logic, only the 1st to match your conditions will be processed.
To enable conditional logic for one-time payments, set the Enable Conditional Logic toggle to the on position.
With conditional logic enabled, payments are only processed if the right conditions are met. For example, we’ll demonstrate how to prevent payments from processing if the customer has not agreed to your terms and conditions.
In this example, we’ve added 1 Checkboxes field with a single option.
We’ll use a conditional logic rule to prevent customers from purchasing if they haven’t agreed to the terms and conditions. We’ve set the logic to say: Process this charge if the Terms and Conditions field is not empty.
If more complex logic is needed, additional rules can be added by clicking the And button.
If you need to add alternative options to your logic, click the Add New Group button.
This will add a separate set of rules, which will apply if the 1st set of rules does not.
If you’d like, you can also set conditional logic for recurring payments. This can be useful if you’d like to allow users to choose between one-time or recurring payments before completing their payment.
For this example, we’ll add a Checkbox Items field to the form builder.
Next, configure the Label and Items for the field to allow users to choose between One time and Monthly Plan.
After configuring the Checkbox Items field, head back to Payments » PayPal Commerce and scroll to the Recurring Payments section.
Once there, scroll down and set the Enable Conditional Logic option to the on position.
We’ll use conditional logic to allow users to choose whether to make a one-time payment or subscribe to monthly payments. We’ve set the logic to say: Process this charge if Select your plan is set to Monthly Plan.
If the user selects the Monthly Plan option when filling out the form, they’ll be subscribed to the recurring payments plan.
Note: Conditional logic for WPForms offers far more than we’ve demonstrated in this simple example. To learn more about what conditional logic can do, check out our full guide to using conditional logic in WPForms.
Viewing Completed Payments
Once you’ve received some payments through your forms, you’ll be able to view and manage them right from your site’s admin area.
To do this, go to WPForms » Payments and select the Overview tab to access the Payments page.
If the transaction is recurring, you’ll see Subscription next to it under Type.
To view additional details about a specific entry, click the entry number under the Payment column.
You’ll see payment details for the specific entry you selected. If you’d like to see a detailed breakdown of the transaction, click the View in PayPal Commerce link.
Clicking on this link will direct you to your PayPal dashboard to view the transaction details.
For one-time payments, you’ll see One-time next to the payment entry under the Type column.
To learn more about viewing and managing your payments, please see our managing payment entries guide.
Note: If you’d like, you can create coupon codes and give users a discount when filling out your payment form. To learn more, check out our Coupons addon tutorial.
WPForms records declined payment events if activity logging is enabled on your site. To view the activity logs, go to WPForms » Tools and click on the Logs tab.
Note: To log declined payments, you’ll need to enable activity logging in your WPForms settings.
Failed payments are listed under the Types column as Errors and Payment. In the log table, you’ll also see a message detailing the cause of the failure, the Form ID, and the date.
Customizing the PayPal Commerce Field
There are various options available for setting up the appearance of your payment forms. To access these options in the form builder, select the PayPal Commerce field and go to Field Options » Advanced.
The available customization options include:
Note: The PayPal Commerce field and the included PayPal button can be modified to fit your site’s appearance better.
However, if you’d like to apply even more customization, you can customize your form with CSS.
The Field Size option allows you to set the relative width of the inputs included in the PayPal Commerce field. You can choose between Small, Medium, and Large sizes, with the Large taking up the available width of your form.
Choose a value from the Field Size dropdown list to select the size you’d like to use.
This option sets the size of the PayPal button displayed when PayPal Credit is chosen as the payment method or when recurring payments are enabled.
Along with the Small, Medium, and Large options, there is a Responsive option, which resizes the button according to the device’s screen size.
This option allows you to choose between a Pill or Rectangle shape for the PayPal button.
If you’d like to change the color of the PayPal button, there are various styles available. To view the available styles and select which design you prefer, click on the Button Color dropdown list.
The selected button style is visible in the form builder and form preview.
Frequently Asked Questions
Below are some of the top questions we receive about using PayPal Commerce with WPForms.
I’m getting this error saying my connection is invalid. Why am I seeing this?
Your PayPal Commerce connection is not valid. Please reconnect your PayPal Commerce account.
If you’re seeing this error, your account is likely missing PayPal Complete Payments Product (PPCP) support. If you’re getting this error, please contact PayPal support to enable PPCP.
Why am I unable to log in to my PayPal sandbox account?
If you are having difficulties connecting to your PayPal sandbox account, please ensure that you’ve enabled Test Mode in WPForms » Settings » Payments.
You may still encounter login issues using an older sandbox account. In the event this occurs, please generate a new PayPal sandbox account. To do this, go to your Sandbox Accounts on the PayPal Developer site and click on Create account.
In the popup that appears, choose Account Type and location, then click Create.
Note: Be sure to choose Business (Merchant Account) as the Account Type because this is necessary for connecting your site to PayPal Commerce.
That’s it! Now you know how to install and use the PayPal Commerce addon for WPForms.
Next, would you like to learn more about managing payments in WPForms? Check out our tutorial on creating payment forms in WPForms for further information.