Do you want to allow users to choose between two different payment methods on your form? With WPForms, you can allow your users to choose between making a PayPal payment, or a payment with a credit card.
In this article, we’ll show you how to allow your users to choose a payment method in your forms.
- Adding Different Payment Methods
- Configuring PayPal Settings
- Configuring Stripe Settings
- Configuring Authorize.Net Settings
Adding Different Payment Methods
Before we get started, make sure you have already installed and activated the PayPal addon. You’ll also need to install either the Stripe addon, or the Authorize.Net addon (depending on which payment processor you’d like to use in your forms).
Once these addons are installed and activated, you’ll need to either create a new form or edit an existing form.
If you haven’t already, go ahead and add a Multiple Choice field to your form, as well as either a Stripe Credit Card or Authorize.Net Credit Card field.
After you’ve added these fields to the form, you’ll need to add options to your Multiple Choice field for each available payment method on your form. To do this, you can click on the Multiple Choice field to display its Field Options panel.
In the Field Options panel, rename the label to Payment Method. Then, go ahead and add PayPal and Credit Card as the field’s options. You can delete any unnecessary options by clicking on the − (minus) button next to them.
To be sure that your users fill out this question, make sure to set the Payment Method field as Required.
At this point, here’s how the form would look on the front end:
Next, you’ll need to apply conditional logic to your Credit Card field so that this option will be hidden unless a user selects it as a payment method.
Adding Conditional Logic for the Credit Card Field
To enable conditional logic on the Credit Card field, first click on the field to open up its Field Options. Then, click on the Conditionals section to open up additional options. From here, go ahead and check the Enable conditional logic box to turn Conditional Logic on.
Once you’ve enabled Conditional Logic, you’ll need to set the logic to read: Show this field if Payment method is Credit Card. Here’s how the setting would look in the form builder:
Configuring PayPal Settings
In order to configure your PayPal settings, navigate to the Payments tab and click on the PayPal Standard option. Then, check the Enable PayPal Standard Payments box in the right panel to enable PayPal payments on your site.
Next, scroll down to the Enable conditional logic option and check the box to open up more options.
Then, you’ll need to set the logic to read Process this charge if Payment method is PayPal.
Note: For the complete steps to setup the PayPal addon, check out our full tutorial.
Configuring Stripe Settings
To configure your Stripe settings, first select the Stripe option under the Payments tab. Then, select the Enable Stripe Payments.
Next, scroll down and check the Conditional Logic box.
Then, set the logic to Process this payment if Payment method is Credit Card.
Note: For complete setup instructions for Stripe, be sure to check out this tutorial.
Configuring Authorize.Net Settings
To configure your Authorize.Net settings, first go to the Payments tab and select Authorize.Net. From there, check off the Enable Authorize.Net Payments option.
Once you’ve enabled Authorize.Net payments, you’ll need to configure your conditional logic. To do this, check off the Enable Conditional Logic box at the bottom of the settings.
Then, you can configure this logic to read Process this charge if Payment Method is Credit Card.
Note: For complete details on how to set up the Authorize.Net addon, please check out our tutorial.
That’s it! We hope this guide helped you to learn how to allow users to choose the payment method they prefer.
Next, would you like to ensure that your form and all payments are working as expected before launching? Check out our tutorial on how to properly test your forms before launching for more details.