### [Setting Up Conditional Logic for Stripe Payments](https://wpforms.com/docs/setting-up-conditional-logic-for-stripe-payments/)

**Published:** February 23, 2024
**Author:** Umair Majeed

**Excerpt:** Learn how to set up conditional logic for Stripe payments.

**Content:**

Stripe Pro Addon is a Pro Feature

 Unlock Stripe Pro Addon and other powerful features to grow your business.

 [ Get WPForms Pro ](https://wpforms.com/pricing/) 

Looking to add flexibility to your payment forms? Using conditional logic with the WPForms Stripe Pro addon allows users to choose payment methods, toggle between one-time or recurring payments, opt for payment flexibility, and more.

This tutorial will show you how to use conditional logic with the Stripe Pro addon for WPForms.

- [Conditional Logic for Payments](##payment-logic)
- [Conditional Notification Emails for Completed Payments](#notification-logic)

## Requirements:

- You will need a [Pro license level or higher](https://wpforms.com/pricing/) to access the Stripe Pro addon
- Ensure that you’ve installed the latest version of WPForms to meet the [minimum required version](https://wpforms.com/docs/why-you-should-always-use-the-latest-version-of-wpforms/#version-requirements) for the Stripe Pro addon
- [Set up a form with Stripe integration](https://wpforms.com/docs/how-to-install-and-use-the-stripe-addon-with-wpforms/)
- Stripe requires your site to have SSL (HTTPS) enabled on the page where you’re adding a live payment form, as this allows you to securely send credit card data to Stripe. For setup details, please see WPBeginner’s guide to [adding SSL and HTTPS in WordPress](http://www.wpbeginner.com/wp-tutorials/how-to-add-ssl-and-https-in-wordpress/)

---

Before you get started, be sure to [install WPForms](https://wpforms.com/docs/install-wpforms-plugin/) on your WordPress site and [verify your license](https://wpforms.com/docs/verify-wpforms-license/). Then [install and activate the Stripe Pro addon](https://wpforms.com/docs/install-activate-wpforms-addons/).

**Note:** Stripe applies a 3% transaction fee to each payment processed through their platform if your WPForms license is inactive.

## Setting Up Conditional Logic for Payments

The Stripe Pro addon supports conditional logic, which lets you create “smart forms” that automatically change based on a user’s selections or input.

There are many ways you can use conditional logic with Stripe payments, such as:

- [Letting your users choose whether to pay with Stripe or PayPal](https://wpforms.com/docs/how-to-allow-users-to-choose-a-payment-method-on-your-form/)
- [Making payment optional](https://wpforms.com/how-to-add-optional-payment-to-your-wordpress-forms/)
- Letting your users choose whether to submit a one-time payment or start recurring payments
- Sending email notifications only for completed payments

For more general information on using smart logic in your forms, be sure to check out our [introduction to conditional logic](https://wpforms.com/docs/how-to-use-conditional-logic-with-wpforms/).

Below, we’ve walked through how to set up conditional recurring payments, and how to create conditional payment notification emails.

### Conditional Logic for Payments

As an example, we’ll create a form to let users choose to submit either a one-time or recurring donation.

To get started, we’ll create a simple donation form. This will need to include either a Dropdown or Multiple Choice field to let users choose whether they’d like to submit a one-time donation or set up a recurring donation.

![Creating a conditional Dropdown Items field](https://wpforms.com/wp-content/uploads/2021/03/stripe-conditional-payment-field-example.png "Creating a Conditional Dropdown Items Field")Next, access the Stripe settings in the form builder under **Payments » Stripe**. This is where we’ll set up the conditional logic for our payment options.

![stripe-settings](https://wpforms.com/wp-content/uploads/2024/02/stripe-settings.png)Scroll to the bottom of the settings (under the **Recurring Payments** section) and toggle on the option labeled **Enable Conditional Logic**.

If needed, review our tutorial on [enabling recurring payments](https://wpforms.com/docs/how-to-install-and-use-the-stripe-addon-with-wpforms/#enable-recurring-payment) before proceeding.

![Enabling conditional logic for Stripe subscription payments](https://wpforms.com/wp-content/uploads/2021/03/stripe-enable-conditional-logic-1.png "Enabling Conditional Logic For Stripe Payments")This will display additional fields for you to create your conditional rule. For our example, we’ll set the dropdowns to make a rule that states, **Process** payment as recurring if **How often would you like to donate? is Monthly**.

![Creating a conditional logic rule for Stripe recurring payments](https://wpforms.com/wp-content/uploads/2021/03/stripe-conditional-logic-example.png "Creating a Conditional Logic Rule For Recurring Payments")If you have multiple recurring payment plans, you’ll need to repeat this process for all the plans you’ve created.

Don’t forget to save your form after setting up your conditional logic rule.

### Conditional Notification Emails for Completed Payments

By default, WPForms sends out all notification emails as soon as a user submits your form. However, in some cases, you may want to wait to send a notification email until the user’s payment has been successfully processed in Stripe.

To delay notification emails until payment has been successfully completed, go to **Settings » Notifications** in the form builder. For the notification email that you want to delay, check the box at the bottom of the settings labeled **Enable for Stripe completed payments**.

![Enabling a conditional notification for completed Stripe payments](https://wpforms.com/wp-content/uploads/2023/09/enable-notifications-for-stripe-payments.png "Enabling Conditional Notification For Completed Stripe Payments")Need help setting up your notification emails? See our guides to [notifications settings](https://wpforms.com/docs/setup-form-notification-wpforms/) and [conditional notifications](https://wpforms.com/docs/how-to-create-conditional-form-notifications-in-wpforms/) for more information.

That’s it! Now you know how to set up conditional payments with WPForms Stripe Pro addon.

Next, would you like to allow users to choose how they complete a payment in your form? Be sure to check out our tutorial on [allowing visitors to choose a payment method](https://wpforms.com/docs/how-to-allow-users-to-choose-a-payment-method-on-your-form/) for more details.

**Categories:** Payments, Payment Forms

---

