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.

Connecting Ninja Forms to PayPal

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.

You will need both a PayPal Business account and a PayPal Sandbox Business account to get started.

Getting your Test/Sandbox API credentials

Test/Sandbox API credentials are used to test the functionality of your PayPal Express connection before rolling your form out live to your customers.

You can obtain your Test/Sandbox API credentials by logging into your PayPal Sandbox Business account and following PayPal’s documentation on requesting your Sandbox API signature.

  • You need NVP/SOAP API integration (Classic) credentials
  • You’re wanting an API signature, not certificate.

These credentials need to be entered under Ninja Forms > Settings > PayPal Express.

Getting your Live API credentials

Live API credentials are used to actually collect payments from your customers once your connection has been tested and confirmed to work.

You can obtain your Live API credentials by logging into your PayPal Business account and following PayPal’s documentation on requesting your Live API signature.

  • You need NVP/SOAP API integration (Classic) credentials
  • You’re wanting an API signature, not certificate.

These credentials need to be entered under Ninja Forms > Settings > PayPal Express.

You’re now ready to set up a form to collect payments. You’ll be able to switch back and forth between Test and Live credentials from each new form as desired.

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 your purchase total is contained within a 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.