PayPal Commerce Addon

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.

In this tutorial, we’ll show you how to install and use the PayPal Commerce addon for WPForms.

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.

Accessing Payments

Next, scroll to the PayPal Commerce section and click Connect with PayPal Commerce to open the login window.

Connect to PayPal Commerce

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.

Enter your PayPal email

Then, choose your country or region from the dropdown list.

Select your country or region

Once you’ve entered your email and location, click Next to continue.

Click next

In the next login screen, enter your password in the password field.

Enter your password

Once you’ve completed the setup process, your settings will show that your site is connected in Production mode.

Connection Status

Note: If you encounter an error about an invalid PayPal Commerce connection, your PayPal account is likely missing PayPal Complete Payments Product (PPCP) support. If this occurs, please contact PayPal support to enable PPCP.

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.

Handling Payments

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.

Add the PayPal Commerce field

After adding the PayPal Commerce field, you’ll see a popup telling you to enable PayPal Commerce payments.

PayPal Commerce popup

Click the OK button to dismiss the dialog.

Click okay to close the popup

In the sidebar, click Payments to access the payment integration settings.

Click Payments in the sidebar

Next, click on PayPal Commerce to configure this integration.

Click on PayPal Commerce

Payment Frequencies

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.

One-Time Payments

Customers can make non-recurring payments for products and services with One-Time Payments. To enable One-Time Payments, set the One-Time Payments toggle to the on position.

Enable one time payments

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.

Name

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.

Select One Time Payment name

Email

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.

Select a One Time Payment email

Billing Address

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.

Select a billing address field

Payment Description

With this option, you can add additional details about each One-Time Payment. The description should be entered in the Payment Description field.

Enter a payment descriptionThis field is not shown to the customer on the frontend but will be visible in your PayPal dashboard.

Shipping Address

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.

Select a shipping address

If left blank, no shipping address is requested.

Recurring Payments

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.

Recurring Payments

By default, a single plan is created for you. If you need additional plans, click the Add New Plan button.

Add new recurring paymentIn the dialog, give the new plan a name, then click the OK button to continue.

Adding a new plan

If you’d like to remove a plan, click the red trash can icon in the top right corner of the relevant plan.

Delete 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.

Plan Name

Every subscription plan requires a name. For example, the default plan is called Plan Name #1.

Plan Name in PayPal Commerce

Replace the text in the Plan Name field to rename any plan before saving your form.

Custom Plan NameYou won’t be able to change this value in existing plans after saving your form.

Product Type

This option allows you to choose the type of product you are selling. There are 3 product types available:

  • Digital
  • Physical
  • Service

Go ahead and select your product type from the Product Type dropdown list.

Select A Product Type

Note: The product type is only displayed in the PayPal dashboard and not in your WPForms entries.

Recurring Times

This option allows you to choose how often customers will be charged for each subscription. The available intervals include:

  • Weekly
  • Monthly
  • Quarterly
  • Semi-Yearly
  • Yearly

To select an interval, click the Recurring Times dropdown list and choose the interval you want to use for your plan.

Select Recurring Times from the dropdown list

Total Cycles

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.

Select Total Cycles

Shipping Address

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.

Select a shipping address

If this field is left blank in your payment plan’s settings, no shipping address is assigned.

Additional Options

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.

PayPal Commerce Field Options

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.

Disable Payment Method

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.

Supported Credit Cards

PayPal Checkout

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.

Select a default Payment Method

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.

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 any payment type, set the Enable Conditional Logic toggle to the on position.

Enable conditional logic

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.

Example terms and conditionsWe’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.

Example conditional logic

If more complex logic is needed, additional rules can be added by clicking the And button.

Add an additional rule

If you need to add alternative options to your logic, click the Add New Group button.

Add new conditional logic group

This will add a separate set of rules, which will apply if the 1st set of rules does not.

New logic group added

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

Completed transactions are stored along with each corresponding form entry.

To view completed transactions, go to WPForms » Entries in the WordPress admin area and choose the name of the relevant form used for accepting payments.

Select payment form

Completed entries are denoted with a green money icon.

A completed entry

For more information on a single entry, click on the Transaction ID link under Payment Details.

Viewing Payment Details

Transaction ID

You’ll be taken to the corresponding PayPal entry by clicking on the Transaction ID link, which includes a detailed transaction breakdown.

A transaction in PayPal Commerce

Declined Payments

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.

Accessing the logs

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.

Failed payments in the log

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.

Customizing the PayPal Commerce field

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.

Field Size

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.

Choosing a field size

Button Size

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.

Choose a button size

Button Shape

This option allows you to choose between a Pill or Rectangle shape for the PayPal button.

Select a button shape

Button Color

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.

Choose a button color

The selected button style is visible in the form builder and form preview.

The PayPal Commerce button recolored in silver

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.

Create a new PayPal Sandbox 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.