You don’t need a complicated ecommerce service to accept payments in WordPress!
You might not think about WordPress forms when you think about how to accept payments with WordPress. Or think forms are just too basic to handle more complex needs, like serving as the backbone for an entire athletic team. Don’t underestimate what you can do with your forms!
No matter what you want to accept payments in WordPress for, there’s a way to do it that doesn’t require a ton of technical know-how.
Getting payments set up probably sounds super complicated if you’ve never done it before. You’ll find lots of options searching through Google. You may have already discovered big names like WooCommerce, Shopify, and Square. They’re incredibly good services for big marketplaces, but they’re also incredibly complicated.
You don’t have to be a genius with the web to start accepting payments. You don’t have to be a developer. Or hire one. But you sure can look like one!
What do you need to do?
- Sell a single item with a set price
- Sell an item with different variations (e.g. small/medium/large)
- Offer quantities of an item
- Get a total price from several different items or selections
- Accept credit card payments
- Accept PayPal Payments
- Set up recurring or subscription billing
How to use a WordPress form to accept payments for a single item
Do you have just one thing you need to accept payment for? Price and quantity always going to be the same? You have it easy.
All you really need to do is communicate what you’re charging for. That’s really easy to do stylishly with a simple HTML field. Here’s a quick example:
From there it’s just connecting to the right service to collect the payment. Want to accept payments with PayPal? Credit cards? Jump here to find out how. Want this to be a recurring payment that happens every month? Year? You can do that too!
How to offer variations of an item at different prices
Offering variations (like large, medium, small for example) at different prices sounds like it could get complicated. No one could blame you for thinking that, but it really isn’t. You won’t need to code a single thing. It’s a 3 step process and everything you need is right in front of you.
1. Add a field for your customers to make their selection
Radio List and Select fields are the perfect way to offer variations of a single item. You can also use a Select Image field if you want a picture to accompany each option! Each variant can be assigned its own price:
You’ll need to have “Developer Mode” enabled to see the features in the image above, but don’t worry. It’s just a name; there’s still no code involved.
In the image above of a Radio List field, the Label column is what your customers will see. The Value column is what you’ll see in submissions, and the Calc Value column is the price the customer will be charged for each item.
2. Create a calculation where the “total” will live
Click on the Advanced tab of your form builder. Select Calculations. Add a new Calculation, and use the little sandwich icon to add the field you just created.
3. Choose how your customers can pay
If this is all you need to offer, you’re ready to connect your form to your payment service of choice and begin collecting payments. Want to accept payments with PayPal? Credit cards? Jump here to find out how!
Need to include 2 or more items with variation or pricing differences? Skip down to this section now.
Need to offer quantities of an item? It’s just 2 simple steps.
There are 2 ways you can do this. Is your item always going to be the same price? Will there be different variations & prices of the item?
My item will always be the same price
Step 1: Add a Number field to your form. This will be where your customers select the quantity they need.
Step 2: Create a calculation. Make sure “Developer Mode” is enabled on your form (Don’t worry. It’s just a name; there’s still no code involved.) and click on the Advanced tab of your form builder. Select Calculations.
Add a new Calculation, and use the little sandwich icon to add your Number field. After the number field (or before it), add the price. Now place an * between them to multiply them together.
That’s all there is to it. Your calculation can now be used as your total, and you’re ready to connect your form to your payment service of choice and begin collecting payments. Want to accept payments with PayPal? Credit cards? Jump here to find out how!
Need to include 2 or more items with variation or pricing differences? Skip down to this section now.
I have different variations/prices of my item
Step 1: This section above describes how to add a field offering different variations/prices. With that in place, add a Number field for the customer to indicate the quantity they need.
Step 2: Create a calculation. Make sure “Developer Mode” is enabled on your form (Don’t worry. It’s just a name; there’s still no code involved.) and click on the Advanced tab of your form builder. Select Calculations.
Add a new Calculation, and use the little sandwich icon to add both your item and the Number field. Place an * between them to multiply them together.
That’s all there is to it. Your calculation can now be used as your total, and you’re ready to connect your form to your payment service of choice and begin collecting payments. Want to accept payments with PayPal? Credit cards? Jump here to find out how!
Need to include 2 or more items with variation or pricing differences? Skip down to this section now.
Here’s how to get a total price from several different items or selections
Need a single total price from several different items or selections your customer makes? You don’t even need to use math. Your WordPress form will do it for you. There are just 3 steps to get started accepting payments in WordPress!
1. Add fields where users can make their selections
Any of the list fields will work for this. Here are your options:
- Single Checkbox: let customers select a single item
- Checkbox List: let customers select one or more items
- Select List: let customers select a single item from a dropdown
- Multi-Select: let customers select one or more items from a dropdown
- Radio List: let customers select a single item from a list
- Select Image: let customers select one or more items with an image
Functionally it doesn’t matter which ones you pick, the steps to make this work are the same.
What’s important is that you set a Calc Value for each list option that’s equal to that option’s cost. Those values will be used to determine the total in the next step.
You’ll need to have “Developer Mode” enabled to see the features in the image above, but don’t worry. It’s just a name; there’s still no code involved.
The Label column is what your customers will see. The Value column is what you’ll see in submissions, and the Calc Value column is the price the customer will be charged for each item.
2. Create a calculation where the “total” will live
Click on the Advanced tab of your form builder. Select Calculations. Add a new Calculation, and use the little sandwich icon to add the fields you just created. The below example shows 3 fields added together to determine the total:
Calculations support basic math rules & respect order of operations: parentheses > exponents > multiply & divide > add & subtract.
3. Choose how your customers can pay
You’re now ready to connect your form to your payment service of choice and begin collecting payments. Want to accept payments with PayPal? Credit cards? The section immediately below is where you need to be 🙂
Accept PayPal and credit card payments with your new WordPress form
Already moved through any of the sections above? You now have a WordPress form that customers can use to make their selections. All that’s left is actually collecting payment when the form submits. You can use your form to accept credit card payments, PayPal payments, or both! You can also set up recurring payments/subscription billing. Here’s how.
Connect your form to PayPal, Stripe, or Elavon for one-time purchases
For accepting PayPal payments with Ninja Forms, you’ll need to add the PayPal Express add-on.
To accept credit card payments with Ninja Forms, you’ll want the Stripe or Elavon add-on.
Want to do both? Do both. Ask how the user want to pay, then use Conditional Logic to control which options triggers!
Whichever you choose, be sure to follow the documentation on setting up your API key. Then you’re ready to connect your form below.
Any of these three add-ons will add a Collect Payment action to your new WordPress form. It can be found in your form builder under the Emails & Actions tab.
Add this action and open it. Choose your payment option (PayPal, Stripe, or Elavon) in the Payment Gateways field. Then check out the Get Total From setting. This is where you determine the amount that gets sent to your chosen service.
Get Total From gives you three options:
- Fixed Amount
- Field
- Calculation
If the total will always be the same, select Fixed Amount and then enter the amount. When the form is submitted, this amount will be charged every time.
Field will take the total from a Number field, allowing your customer to determine their own price to be paid.
Calculation will let you select a calculation value to be used for the total. This is by far the most common option. If you’ve followed any one of the sections above, you’ve already gotten one set up.
Just select the option you need and you’re ready to start accepting payments in WordPress!
Set up recurring or subscription billing with Stripe or Recurly
You can set up recurring payments within your Stripe or Recurly accounts. You can then connect your form to that recurring payment plan using either the Stripe add-on or Recurly add-on.
With Stripe, you’ll find a Recurring Payment Plan ID setting under the Advanced section of the Collect Payment action. Just enter the plan ID from your Stripe account there. All payments from this form will be processed in that account.
With Recurly, there’s a Recurly action that you’ll add to the form. You just enter the plan code from your Recurly account there, and you’re set.
Accept payments in WordPress from any form, anywhere on your site!
If you’ve read through the sections above that are relevant to your needs, you can now build a WordPress form that will accept payments for just about anything. Unless you’re building a massive online store, there’s very little reason to invest the time it takes to learn and maintain a complicated ecommerce service!
Comments are below, and your needs drive the future of the plugin. What other payment gateways or features would you like to see for Ninja Forms?
Ralph the Wonder Llama says:
I already have a form with Stripe payment. How do I add Paypal as another Payment option?
Quay Morgan says:
Sir Llama,
– Add a second Collect Payment action to the form and set it to PayPal
– Place a Radio List field with an option for Stripe and another for PayPal to let your customers indicate their choice
– Use Conditional Logic on the PayPal action so that it will only fire when PayPal is selected in the Radio List field, and then do the same for the Stripe action.
If you need any help getting set up, let us know!
Cheers,
Quay
joyce says:
how about in the Submission listing page, where is the payment info will show whether it is paid or not ?
Keystone Mennonite says:
Is it possible for either the Stripe or PayPal add-on to fail to submit if the customer doesn’t complete the payment? I noticed that with the PayPal add-on at least, the info is submitted into the form’s database as soon as they click the “submit” button, whether they pay or not once the PayPal screen appears. Or is this just because I’m testing in Sandbox mode?
Quay Morgan says:
Hey! This is an older article I should probably rewrite, but it’s still accurate if a bit dated: https://ninjaforms.com/blog/ninja-forms-calculations-payment-gateway/
Pricing fields were removed as they were too buggy for too many people. The calculations method the article describes will get you where you need to be 🙂
Cheers,
Quay
Jesse Longbrake says:
Are there any plans to add the ability to send payment information from different forms to different PayPal accounts? I work somewhere that has different departments that handle finances separately and it would be very useful to be able to send payments to their own accounts.
Malachy Ikechukwu says:
How can I add other payment gateways other than Paypal and stripe
Quay Morgan says:
Hey! We currently also integrate with Recurly and Elavon:
https://ninjaforms.com/extensions/recurly/
https://ninjaforms.com/extensions/elavon/
Are there others you’d like to see? We’re always happy to hear requests!
trent says:
with Stripe add-on – is there a way to have a currency field and a second field with amount. then in processing it picks up both fields for a donation for a Non Profit organisation
eg currency field of – USD, CAD, GBP
number field – enter amount.
I see in set up the currency is defined, can this be overridden by this field
Quay Morgan says:
Yes, you’d just need to write an additional calculation that totals both those fields, and then use that calculation as the Total in your Stripe action.
Ravikumar says:
Direct Bank Transfer (BACS) this one possible in ninja using stripe?
Any addon’s available. Please provide information.
https://stripe.com/docs/payments/payment-methods/bacs-debit
Quay Morgan says:
Unfortunately not right now, but thanks for bringing this up. We’ll definitely be adding more payment gateway options in the future, and direct debit/transfer are asked for frequently. Every voice we hear that needs this, makes it more likely that’s a feature we focus 🙂
Moshe Leitner says:
HI
This is exactly what i am looking for. I would like to accept both card and Direct debit (BACS) payments
SL Bradford says:
Very helpful. Looking to set up recurring membership form with PayPal or Stripe (or both). This helped me get started. Thanks!
Andrew Abraham says:
Hello,
I’ve setup the Evalon integration, however I’m not seeing the transaction ID stored anywhere in the Store Submissions. Is there something I need to do to add it in?
Thanks!
Silvio Jose Fortunato says:
I need to know how do I setup multiply recurring payment plan ID at stripe field ? like with coma seperated or just simply add it ?
Quay Morgan says:
You’d want to set up the recurring plans in your Stripe account, and then create a Stripe action for each recurring plan with their respective ID entered into the action. From there, use conditional logic to determine which plan fires based on the selection that’s made in the form.
Robert says:
Thanks for this helpful posting.
I am using PayPal Express with Ninja. After PayPal completes, it returns to my former with no notification. Just a page with the form’s header. Can I redirect on return to a different WordPress page.
I assume there is no communication back to Ninja from PayPal so I can’t know if the transaction was canceled bu the user in PayPal, succeeded or failed. Is this correct?
Ellice Sanchez says:
Are there any plans to use Square as the payment processor? I totally prefer PayPal and Stripe, but my client wants to use Square. I’ve seen a third party Square plug-in for Ninja Forms, but I would feel more safe using an official NF add-on, plus I already pay for an annual membership here. Thank you.
Lenka Uhliarova says:
Hi Ellice,
our team has discussed creating a plugin for this, but I do not have an ETA on when the plugin would be available.
Laiq Siddiqui says:
Hi
I am using Ninja Forms on two different sites with professional membership.
On one site I can add Credit Card fields but on other site I can not find Credit Card field option which I can add to the form.
Please advise.
Thanks
Diane Peters says:
Is there a way to make it mandatory for the payment to process via PayPal Express in order to actually submit the form? I’ve noticed when testing that I can fill out the form and press submit without actually processing payment via PayPal and the form submission still shows up in the backend WordPress submissions.
Thanks for your help in advance
Pete says:
I have the same question. I would like something like this: After someone fills in the form and complete the payment, this person will receive a success message where he can download a PDF file. It’s like automatically selling a digital product.
texas beekeepers says:
I’m trying to work up an event registration form with the PayPay Express payment gateway. I think this question has been asked a few times but never answered. How can we get the payment status and transaction ID into the download of submissions? I’ve found that I can use the merge field to get the transaction ID included in the admin email or manually edit each record to see the status and transaction ID, but that’s only practical for very few submissions. I was able to use a hidden field to get my cart total into the download, but that didn’t work with the transaction ID. Is this doable?