PayPal Express

The PayPal Expresss add-on needs to be installed and activated to see the features mentioned in this this documentation.

Note: Make sure your website meets PayPal security standards before use

PayPal has specific HTTPS and TLS security standards that your website must meet to be able to use their service to collect payments. If your website does not meet these security standards, you will not be able to communicate payment information to the PayPal service. Please see their documentation for details. If you have questions about your WordPress website meeting these standards, please contact your hosting provider.

Connect Ninja Forms to PayPal / Entering Your PayPal Express API Credentials

The first step to using PayPal with Ninja Forms is entering your API credentials for PayPal. This will allow your forms to communicate with PayPal and is a required first step before payments can be collected.

Please see the guides below for assistance.

Getting Your Test API Credentials
Go to https://developer.paypal.com/ and log in with your PayPal account.

Once logged in, go to your developer Dashboard

Under “Sandbox” on the left sidebar, click “Accounts”, then “Create Account.”

Complete the “Account Details” for your new account to your specifications (add PayPal balance, simulated card details and more), then click “Create Account” at the bottom of the form.

Select the BUSINESS account you’ve created from the “Accounts” screen, and click “Profile”

In the “API Credentials” tab, you will find the credentials for your new test business account.

Sandbox API Credentials

Getting Your Live API Credentials

Simply visit the PayPal Express Checkout page and click “Sign Up Now”.  Complete the questions about your business, and then log in to your PayPal account.

Express Checkout Site

In your PayPal Dashboard, click “Profile”, then “Profile and Settings”

PayPal Dashboard

Under “My Selling Tools” in the left sidebar, find the “API Access” line and click “Update.”

PayPal Profile

Under NVP/SOAP API Integration, click “View API Signature.”  You will find this near the bottom of the page.

Click Show for the “API Username”, “API Password”, and “Signature” respectively.  These are the credentials you will add to Ninja Forms.

PayPal Live API Credentials

Once you have obtained your API keys, input them in your WordPress dashboard under Ninja Forms -> Settings -> PayPal Express.

Ninja Forms API Keys Input

You can change between Live and Sandbox keys under the Advanced Settings of the Collect payment Action.

Setting Up a Form to Collect Payments

Before setting up your form, be certain that you have set up your live API credentials as described in the section above.

First, open your payment form and click on the Emails and Actions tab at the top of the form builder.

Next, click the blue circle/+ icon in the bottom right of the screen to open the list of available actions.

Choose either the Collect Payment or PayPal Express action from the list of available actions. They’re functionally identical, so selecting either is fine.

With the action added to your form, click to open it. If you selected the Collect Payment action, you’ll need to set the PAYMENT GATEWAYS setting to PayPal Express. If you selected the PayPal Express action, this is already set for you.

You now need to set the total that will be sent to PayPal in the GET TOTAL FROM setting. This can be one of three options:

  1. A Fixed Amount
  2. A Calculation
  3. A Field

Charging a Fixed Amount

If the total sent to PayPal is a static amount that will never be different from purchase to purchase, select the Fixed Amount Option. Simply enter the amount you wish to charge in the ENTER AMOUNT setting.

When the form is submitted, users will be prompted to pay this fixed amount via PayPal.

Using a Calculation to generate a total

If you are charging variable amounts per purchase via a Ninja Forms calculation, that total can be sent to PayPal directly as the amount the user will be charged.

Simply select Calculation from the GET TOTAL FROM setting, and then select the calculation itself in the SELECT CALCULATION dropdown.

When the form is submitted, users will be prompted to pay the calculation’s value via PayPal.

Using a form field as the total sent to PayPal

If you’re using the Total field, or if your purchase total is contained within another field such as a Number field, you can have the value of that field sent directly to PayPal.

Simply select the Field option from the GET TOTAL FROM setting, and then select the field that houses your total from the SELECT FIELD dropdown.

When the form is submitted, users will be prompted to pay the field’s value via PayPal.

Sending additional Transaction Data to PayPal, including notes for the buyer, and enabling sandbox testing mode

Under the Advanced settings of the Collect Payment/PayPal Express action, note the fields for Details and Note to Buyer.

 

Information entered into the Details section here will be saved as Transaction Data in PayPal. Use the merge tag icon to map in fields for shipping address, email, etc if desired.

Text entered into the Note to Buyer section will be displayed for the user in the PayPal checkout window when the form is submitted.

To enable testing for your form, toggle on the Sandbox Mode setting. With the appropriate sandbox API credentials entered as described in section one above, submitting the form in this mode will allow you to test the form with PayPal. This must be toggled off to accept live payments.

How helpful was this documentation?

Gold Star Green Light Yellow Light Red Light
Very helpful Helpful Unclear/Unhelpful Not helpful at all