Build a Stripe Payment Form in WordPress (No Store Needed)
You have something people want to pay for. A day pass, a workshop seat, a deposit, a donation. Everyone says Stripe is how to take the money, and every guide you open starts with “first, set up your online store.”
You don’t want a store. You want one form that takes a card, maybe a second for donations. WooCommerce is a fine thing for a shop with two hundred products, and a heavy thing to bolt on for that.
Yes, it’s annoying. But a Stripe payment form in WordPress is a much smaller job than the store guides make it sound: a regular Ninja Forms form with one action added, and card details never touch your site, because Stripe’s own checkout page collects them. Below, we’ll connect your Stripe account, build the form, pick how the total gets set, and run a test payment before a real customer ever sees it.
What you’ll need
- Ninja Forms (free)
- The Stripe add-on (standalone, or included with memberships)
- A Stripe account
Connect your Stripe account to Ninja Forms first
Stripe and Ninja Forms talk to each other through two keys from your Stripe Dashboard, a publishable key and a secret key. You paste them into Ninja Forms once, and every payment form on your site uses them. Stripe gives you a test pair and a live pair, and you want both, so you can test without moving real money.
- Copy your Publishable key and Secret key from the API keys page in your Stripe Dashboard. Stripe’s guide to API keys shows where the test pair and the live pair each live.
- In your WordPress admin, go to Ninja Forms > Settings and scroll down to the Stripe section.
- Paste each key into its box: Test Publishable Key, Test Secret Key, Live Publishable Key, and Live Secret Key.
- Click Save Settings.
That’s the connection made. One thing to check before you build anything: Stripe only takes live payments from a site on HTTPS.
If your address bar shows a padlock, you’re set. If it doesn’t, ask your host about an SSL certificate now rather than on launch day.
Charging in something other than US dollars? Set Currency under Ninja Forms > Settings > General Settings, and every form on the site follows it.
No Stripe account yet? You don’t need a registered company to open one
Stripe signs up sole proprietors and individuals as well as companies. Signup asks for your details and whatever tax information your country requires. Stripe’s pricing page has the current per-transaction fee, and Ninja Forms adds no fee of its own on top.
Build your Stripe payment form in WordPress, or reuse one you already have
Any Ninja Forms form can take Stripe payments. The fastest start is the template that comes with the add-on: go to Ninja Forms > Add New and click Stripe Payment. It opens in the builder with First Name, Last Name, Email, Product, Quantity, a running Total, and a Stripe action already attached with Test Mode switched on.
The template also drops in a note field explaining the setup. Delete it before you publish, or your customers will read your homework.
Already have a registration or order form? Keep it. Open it, and skip on down to the next section, where you’ll add the Stripe action to it.
Our example form sells day passes for a llama trek, and you’ll see it in the screenshots below. It has First Name, Last Name, and Email, a Radio List called Choose Your Trek with a Half-Day option at $45 and a Full-Day option at $85, a Number field for Number of Trekkers, and a submit button labeled Continue to Payment. Swap in your own product, seat, or donation tiers, and the steps don’t change.
The one field setting that matters for money is on the Radio List. Click the field, and in its Options table each row has a Label, a Value, and a Calc Value. The Label is what your customer sees, the Value is what you see in submissions, and the Calc Value is the price, so put 45 and 85 in that third column.
Add the Stripe action and tell it what to charge
The Stripe action is what sends a visitor to Stripe’s checkout page when they submit. It lives on the Emails & Actions tab, and it needs two things from you: where the total comes from, and which field holds the customer’s email.
- Click the Emails & Actions tab, then click the blue (+) icon to open the Actions window.
- Click Stripe. You’ll see a Collect Payment tile next to it, and that one works too, but the Stripe tile has the gateway preselected, so pick Stripe.
- In Get Total From, choose Fixed Amount, Field, or Calculation. The three sections below show which is yours.
- In Customer Email Address, use the merge-tag picker in the box to insert your Email field.
- Expand Advanced and fill in Product Name. It’s what your customer sees on the Stripe checkout page, so make it something they’ll recognize.
The email mapping does more than label the charge. Stripe files the payment under that address and can send its receipt there, once you’ve turned receipts on in your Stripe account.
You can skip the old advice about switching on Developer Mode to reveal the Advanced accordion, by the way. It’s there for everyone.
Now, the total. Which of these sounds like your form?
One price for everyone? Choose Fixed Amount
Choose Fixed Amount and type the price into Enter Amount. A registration fee, a deposit, a single product at one price. You have it easy, and you’re done with this section.
Letting people pick a tier or an amount? Choose Field
Choose Field, then pick the field in Select Field. The list only offers fields that carry a Calc Value: Number, Single Checkbox, Select, Multi-Select, Radio List, Checkbox List, and Select Image. A Single Line Text field won’t appear, so don’t go hunting for it.
This is the donation setup: a Radio List with $25, $50, and $100 options, each amount in the option’s Calc Value, and Stripe charges whatever the donor picks. Want a “name your amount” option instead? A Number field works as the total too, and a donor types in whatever they like.
Two things to watch. For a choice field, the Calc Value is what gets charged, not the Value, so a blank Calc Value means a blank charge. A total of zero skips Stripe altogether, and the form just submits with nothing charged.
Price times quantity? Choose Calculation
When the total depends on more than one answer, like a trek type times a number of trekkers, you build a calculation and hand it to the Stripe action. Sounds like the technical part? No worries, it’s one equation, and the builder writes most of it for you.
- Click the Advanced tab, click the blue (+) icon to open the Settings window, and choose Calculations.
- Click Add New. Give the calculation a Variable Name, ours is order_total, and an Equation. Use the merge-tag picker to drop in your fields with a multiplication sign between them:
{field:trek} * {field:trekkers}. - Back on Emails & Actions, open the Stripe action, choose Calculation in Get Total From, and pick order_total in Select Calculation.
That’s all there is to it. Want your customers to watch the total change as they fill in the form? Add an HTML field on the Form Fields tab with Order total: ${calc:order_total} in it, and on our form it reads $45.00 on load and jumps to $170.00 when someone picks the Full-Day Trek for two.
Want Apple Pay, bank debits, or buy now, pay later on the checkout page?
Expand the Stripe action’s Advanced accordion and look at Accepted Payment Methods. Card Only is the default. All Methods shows whatever payment methods you’ve switched on in your Stripe Dashboard, which can include Apple Pay and Google Pay, bank debits, Klarna, and Afterpay.
Which of those a buyer sees also depends on their device and country, so check the checkout page on a phone as well as a laptop. The Stripe add-on docs list every supported type.
Selling something you ship? Switch on Show Shipping Address in the same accordion, and Stripe collects the address at checkout.
Put the form on a page and test it with a fake card
Your Stripe payment form is built, so put it on a WordPress page and buy something from yourself before anyone else does. The Stripe action has a Test Mode switch in its Advanced accordion, and with it on and your test keys saved, the form runs the full checkout against Stripe’s test system without moving any money. The Stripe Payment template ships with Test Mode already on, and you should leave it on until you’ve made that purchase.
- Click Publish in the builder.
- Put the form on a page with the Ninja Forms block, or paste the shortcode from the Shortcode column under Ninja Forms > Dashboard.
- Open the page, fill in the form, and submit it. Stripe Checkout opens in the same tab.
- Pay with Stripe’s test card, 4242 4242 4242 4242, with any future expiry date and any three-digit code. Stripe’s testing page has more test cards if you want to try a declined one.
- After paying, you land back on your form page, and the rest of your actions run: the success message, your emails, and anything else on the Emails & Actions tab.
If you see “Error creating payment session” instead of the checkout page, the action can’t find your keys. Head back to Ninja Forms > Settings, check the Stripe section, and save again.
Happy with the test? Switch Test Mode off in the action. That’s the whole go-live: the action starts using your live keys, and the next submission is a real payment.
How do I know who paid?
Every submission is saved under Ninja Forms > Submissions before the Stripe action runs, so someone who bails at the checkout page still shows up as a row. The add-on records the payment status on each submission, and an abandoned checkout is marked Cancelled rather than left hanging.
A payment method that takes a while to clear, like a bank debit, can leave a submission at Pending until Stripe confirms it. The optional payment confirmation webhooks in the Stripe docs let Stripe update your site directly when that happens.
Selling a subscription? Point the action at a Stripe price instead
Recurring payments work a little differently: the price lives in Stripe, not in your form. You create the subscription there and tell the Stripe action which one to use.
- In your Stripe Dashboard, create a Product with a recurring price and copy the price’s API ID. It starts with
price_. - In the Stripe action’s Advanced accordion, paste it into Recurring Payment Plan ID.
Once a plan ID is set, Get Total From is ignored and Stripe charges the plan’s own price. Offering several plans? Add a Select field whose option Values are the price IDs, then put that field’s merge tag in Recurring Payment Plan ID instead.
Want a free trial? Use Subscription Trial Period in the action, in days, rather than a trial set up in Stripe, because a Dashboard trial returns errors with this add-on.
Want to offer PayPal alongside Stripe? Add a choice field for payment method and use Conditional Logic on each payment action, so only the one they picked runs.
Start taking Stripe payments today
Like we said at the top, you don’t need a store to get paid. If you’ve walked through the sections above, you have a WordPress Stripe payment form that sends people to Stripe’s checkout, brings them back to your site, and records who paid, without a line of code and without a card number ever touching WordPress.
Unless you’re building a full catalog with carts and inventory, a payment form is all the shop most of us need. Ready to see money land in your Stripe account? Pick up the Stripe add-on, add the action to your form, and take your first test payment this afternoon.
Try Ninja Forms Today
Always free, with premium features available through our memberships.