How to Add PayPal to WordPress with Ninja Forms

You want people to be able to pay you through PayPal right on your WordPress site, and you’d like the setup to be straightforward. That’s a reasonable thing to want, and it shouldn’t require a research project.

Maybe you’re taking payment for a product, charging for a service, or collecting a one-time donation. Whatever it is, you probably don’t want to install a full ecommerce plugin just to accept PayPal on a single form. If you already use Ninja Forms, or you’re open to adding it, you can wire up PayPal directly on the same form that’s already collecting a name and an email.

There’s also a good chance your price isn’t one flat number. If what someone owes depends on which product they picked, how many they’re ordering, or an amount they enter themselves, you need a setup that charges the correct total every time, not the same number for everyone.

Here’s how to add PayPal to WordPress with Ninja Forms: connect your PayPal account, add a PayPal Checkout action to your form, and set up the amount so it always matches what someone’s actually buying.

What you’ll need

To follow along, you’ll need Ninja Forms (free), the PayPal Checkout add-on (included with Plus and higher memberships or available as a standalone add-on), and a PayPal Business account. A personal PayPal account won’t work for this; PayPal requires a Business account to accept checkout payments through a website.

How to add PayPal to WordPress with Ninja Forms

Adding PayPal to a WordPress form comes down to five steps. Install Ninja Forms and the PayPal Checkout add-on, connect your PayPal Business account, add a PayPal Checkout action to your form, choose how the charge amount is calculated, and test the whole flow before you take it live.

  1. Install Ninja Forms and the PayPal Checkout add-on.
  2. Connect your PayPal Business account through Ninja Forms’ built-in onboarding flow.
  3. Add a PayPal Checkout action to your form.
  4. Choose how the charge amount is set: a fixed price, a calculation, or a field.
  5. Test with PayPal’s sandbox mode, then switch it off and go live.

The rest of this guide walks through each of those steps in order.

Connect your PayPal Business account to Ninja Forms

Ninja Forms connects to PayPal through a one click onboarding flow, so you never have to generate or paste an API key yourself.

  1. In your WordPress dashboard, go to Ninja Forms, then PayPal Onboarding.
  2. Click the link to begin onboarding your PayPal Business account.
  3. Log in to PayPal and approve the connection. Ninja Forms stores the resulting credentials automatically once you’re done.
Ninja Forms PayPal Onboarding page in the WordPress dashboard, showing a connected sandbox PayPal account with a confirmation message that it is set up and ready to receive payments.

Once connected, the PayPal Onboarding page confirms your account is ready to receive payments. You can reconnect or switch accounts from the same page at any time, and a separate section on the page handles a sandbox connection for testing, which is worth setting up before you touch a live form.

Add a PayPal Checkout action to your form

PayPal Checkout works through a form action, the same mechanism Ninja Forms uses to send emails or save submissions, so hooking it up takes about a minute.

  1. Open the form you want to accept payments on and click into the Emails and Actions tab.
  2. Click the blue plus icon to open the Actions window.
  3. Select PayPal Checkout from the list of available actions.
Ninja Forms builder Actions window with the PayPal Checkout action tile visible in the list of available actions.

This opens the action’s settings window. Give it a name you’ll recognize later (this is just an internal label; shoppers never see it), then move on to deciding how much it should charge.

Choose how to charge: a fixed price, a calculation, or a field

Inside the PayPal Checkout action settings, the Get Total From dropdown controls how the charge amount is set. This is the part that separates a form that can only ever charge one price from one that can charge the right amount for whatever someone’s actually ordering.

Three options are available.

  • Fixed Amount: enter a flat dollar value. Good for a single product or a service with one price.
  • Field: pull the amount from a field on the form, such as a number field where someone enters a custom amount or a tip.
  • Calculation: pull the amount from a calculation you’ve built for the form, useful when the total depends on more than one field, like a quantity multiplied by a price.
Ninja Forms PayPal Checkout action settings window with Get Total From set to Fixed Amount and the Enter Amount field populated with a dollar value.

Fixed Amount and Field are both quick to set up and get a working PayPal checkout button live right away. For Field, almost anything that can hold a number works: a Number field for a custom amount, a Select or Radio List with a price built into each option, or a Checkbox list where each choice adds to the total.

If your total is built from more than one field, for example quantity times price, build a calculation first under Form Fields, then select it here so Ninja Forms pulls the result in automatically. Test a real submission carefully after connecting a calculation, before you rely on it for live orders.

Ninja Forms PayPal Checkout action settings window with Get Total From set to Calculation and the Select Calculation dropdown showing an available calculation.

Set which payment options your shoppers see

Ninja Forms doesn’t limit checkout to a plain PayPal login. The same settings window includes an Enable Payment Options section, where you decide what shoppers can use to pay.

  • PayPal balance, PayPal Credit, and Pay Later are on by default.
  • Guest Checkout is also on by default. It lets someone pay with a debit or credit card directly, without needing a PayPal account.
  • Apple Pay, Google Pay, and a handful of regional options, including iDEAL and SEPA, are available if you want to turn them on. A few of these need one extra verification step in your PayPal account before they’ll display; the PayPal Checkout documentation covers how to set that up.

Test everything with sandbox mode before you go live

Don’t skip testing just because the settings look right. PayPal Checkout includes a Sandbox Mode toggle in the action’s Advanced settings. Turn it on, connect a sandbox PayPal account through the PayPal Onboarding page, and you can run through a full test order without touching real money or your real PayPal account.

Submit the form yourself the way a real shopper would, and confirm the amount charged matches what you expect for that order. Once you’ve confirmed a submission goes through the way you expect, turn Sandbox Mode back off. Your form is now set to process real payments.

See PayPal’s checkout buttons on your form

With everything connected, embed the form on a real page or post, the same way you’d embed any Ninja Forms form. When someone fills it out and hits submit, the submit button is replaced by PayPal’s own checkout buttons: a PayPal button, a Pay Later button, and an inline card form for Guest Checkout.

Preview links inside the form builder won’t show this, since PayPal’s checkout buttons only load on a form that’s actually published on a live page. Check an embedded version of the form to see the real thing.

A Ninja Forms form on a live WordPress page after submission, showing PayPal's checkout buttons rendered in place of the submit button, including a PayPal button, a Pay Later button, and an inline Guest Checkout card form.

Start taking PayPal payments today

You’ve connected PayPal to WordPress, added a PayPal Checkout action, and chosen how to charge the right amount for every order. Run one test in sandbox mode, switch it off, and you’re live. If you haven’t picked up the add-on yet, grab PayPal Checkout and you can have a payment form on your site this afternoon.

Try Ninja Forms Today

Always free, with premium features available through our memberships.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.