Conditional Payment Form for One-Time and Recurring Payments

THIS POST MAY CONTAIN AFFILIATE LINKS. PLEASE READ OUR DISCLAIMER FOR MORE INFO.

In this tutorial I will be showing you how to create a form with Gravity Forms that will allow your users to select between making a one-time and recurring payment. This is a variation of a conditional payment form.

Use Case

I see these types of forms used most often for donation type payment forms. Allowing the user to make a one-time donation or to make their donation an automatic recurring donation.

For the purposes of this tutorial, we will be building a form to collect donations for a fictional charity.

Prerequisites

  • Gravity Forms Pro or Elite License
  • Your Payment Accounts Setup (i.e Stripe, Square, PayPal)
  • The Gateway Add-On(s) installed and connected

Note: I will not be showing you how to setup your Payment accounts or how to setup the individual gateway add-ons. If you are using Stripe I have a tutorial for that here!

The Gravity Forms doc site does have detailed tutorials on how to setup the gateway add-ons and I have linked to three of the most popular, however I will only be using Stripe for this demo:

Part 1: Creating your Form

You can have as many fields as you want or need for your form, however the fields below are required for this to work.

  • Product Field
  • Choice Field (i.e radio button or dropdown)

As previously mentioned, I am going to be using the Stripe Add-On in this demo, however the process is almost identical regardless of the payment add-on you choose to use.

Step 1: Setting Up The Form

  1. Go to Forms > Add New
  2. Give your form a name
  3. Add your desired fields (don’t forget the required fields)
  4. Click Update to save your form

Part 2: Creating Your Payment Feeds

Because you are giving the user the option select whether they want to make their donation a one-time or recurring donation, you will need two feeds.

Step 1: Setup a feed for the one-time donation:

  1. Go to Form Settings > Stripe
  2. Click Add New
  3. Name your feed
  4. Select “Product and Service”
  5. For “Payment Amount” select either the product or Form Total
  6. Map your Gravity Forms fields with the payment gateway fields
  7. Under “Other Settings” we’re going to Enable Conditional Logic
  8. Configure the logic to Process this feed when One-Time Donation is selected
  9. Click Save Settings

Step 2: Setup a feed for the recurring donation:

  1. Go to Form Settings > Stripe
  2. Click Add New
  3. Name your feed
  4. Select “Subscription”
  5. For “Payment Amount” select either the product or Form Total
  6. Map your Gravity Forms fields with the payment gateway fields
  7. Under “Other Settings” we’re going to Enable Conditional Logic
  8. Configure the logic to Process this feed when Monthly Donation is selected
  9. Click Save Settings

Part 3: Testing

You will want to test your form before publishing it for your users to start making donations.

The nice thing about most payment gateways, and the payment Add-Ons built by Gravity Forms is the ability to put your form into Test Mode so that you can run transactions without the need to actually charge your credit card.

The Wrap Up

You should now have the knowledge you need to setup your own conditional donation form to allow your users to make a one-time or recurring donation.

You can also add other conditional options to the form like the option to pay with credit card (using Stripe) or PayPal. You could also give the user the option to pay online or send a check.

You can learn more about that in this tutorial: Conditional Payment Options and Gateways with Gravity Forms

If you have any questions or need additional assistance, please use the comments or chat below!

Get the latest news, tips, and how-tos all delivered to you!

Your information is used only for email communications by GravityRanger. We do send the occasional product promotion email.

Name*
This field is for validation purposes and should be left unchanged.


>