Stripe

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

Stripe API Credentials

The first step to using Stripe with Ninja Forms is getting your API credentials. Please see the guides below for assistance.

Getting Your Stripe API Credentials

You can find your API credentials in your Stripe dashboard.

Place every key into the Stripe settings under Forms -> Settings -> Stripe

Collecting Payment With Stripe

Note: Credit card fields have been deprecated in the builder as of v3.0.13 (12 February 2018). These fields will now appear in the Stripe Checkout modal automatically and do not need to be added to the form.

There are many ways to collect Stripe payments with Ninja Forms Stripe.  You can have

  • A fixed payment on each form where every user pays the exact same amount
  • A dynamic payment (changes per user based on quantity or other factors)
  • Add a user to a recurring payment plan
  • Any combination of the above

For example, you can add a collect payment action for a static “starter” fee, and ALSO add the user to a recurring payment plan at the same time.

To get started, in the form builder, open your “Emails and Actions” menu and click “Add New Action.”

Choose the “Collect Payment” action

Choose "Collect Payment" Action

Choose “Stripe” as your payment gateway.

Everyone pays the same amount (Such as an event registration with a set fee)

To charge everyone who completes your form the same amount, simply type the amount into “Payment Total” in the “Collect Payment” action.  You may also send the user’s email address (from user meta OR form field) by using the merge tag icon to add form data.  For example, if you were registering users for a 5k race that had a $15 entry fee, your settings would look like this:

You’re done! When your user completes your form, their card will be charged $15.

Everyone pays a different amount (Such as a product or quantity sales)

If you are using our built in commerce fields, collecting a payment for products is easy.

Simply select your “Total” field using the “Merge Tags” icon:

That’s it!  The value in your “Total” field when the user completes your form will be charged to the form submitters card.

Custom Calculations

Stripe Recurring Payments
First, make sure to set up your recurring payment plan in Stripe.

You’ll need the product’s Payment Plan ID from Stripe. In Stripe:

  • Navigate to Billing > Products
  • Select your product
  • Under that product’s Settings, select a pricing plan
  • In that plan’s settings, copy the Payment Plan ID

Once you have your Payment Plan ID, simply add it to a new payment action.

You’re done!  When the user completes the form, they will be subscribed to your recurring payment plan.

You can change between Live and Test Mode keys under the Advanced Settings of the Stripe / Collect Payment Action.

Stripe also provides a list of test credit cards that you can use:
https://stripe.com/docs/testing

Test Card Example:
4242424242424242

How helpful was this documentation?

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