WP Simple Pay Blog

Stripe Tutorials, Tips, and Resources for WordPress to Accept Payments

How to Add a Coupon Code Field to Your WordPress Payment Forms

Last updated on

Written By: author image Shahzad Saeed

Looking to create a payment form? Want to allow users to get a discount by entering a coupon code?

Coupon codes entice customers to make a purchase on your site. Plus, it’s incredibly effective in bringing in new customers.

In this article, we’ll show you how to accept coupon codes in WordPress Stripe payment forms.

Accepting Coupons in Payment Forms

The easiest way to accept coupon codes on your WordPress site is to use WP Simple Pay.

It is one of the best WordPress Stripe plugins that lets you accept discounted payments through valid coupon codes you create.

WP Simple Pay enables you to create any payment form, like donation form, subscription form, installment payment form, order form, and more.

Let’s take a look at how to accept coupons in payment forms, step by step.

Here’s the form we’re going to create with this tutorial.

coupon code payment form

Step 1: Install and Activate WP Simple Pay

To offer a discount via a coupon code field on your payment forms, you’ll need WP Simple Pay.

After purchasing WP Simple Pay, you can download it from your purchase email receipt or from your WP Simple Pay account.

To install it, go to your WordPress backend, navigate to Add New under Plugins, and then Upload Plugin. Click Choose File and find the WP Simple Pay .zip file on your computer. Click Install Now. When the upload is complete, press the Activate Plugin button.

If you want to install WP Simple Pay via FTP, follow this guide.

Remove the additional 3% fee! 

Most Stripe plugins charge an additional 3% fee for EVERY transaction
…not WP Simple Pay Pro!

After activating the plugin, you’ll be directed to the setup wizard, where you’ll be prompted to connect the plugin to your Stripe account. In the setup wizard, click Let’s Get Started.

wp simple pay setup wizard

Didn’t see the setup wizard? Just head over to WP Simple Pay » Settings and then click on the Stripe tab to connect the plugin to Stripe.

Step 2: Connect WordPress to Stripe  

To connect the plugin to Stripe, you’ll be asked to click on Connect with Stripe in the setup wizard.

connect to stripe

To connect, you can either use an existing Stripe account or create a new one. Let’s NOT use Skip this form as this will create a temporary Stripe account that cannot be recovered or moved to Live Mode.

create a stripe account

After connecting Stripe with the plugin, you’ll see a success page that says Setup Complete. The next thing you’ll need to do is to start creating a payment form that accepts coupons. Click on the button Create a Payment Form.

setup complete

Step 3: Create a Payment Form

After integrating the plugin with Stripe, it’s your turn to create a payment form with a coupon code field.

To make it easy to get started, WP Simple Pay offers you tons of pre-built templates to choose from.

While you can add a coupon field to any form template, let’s choose a template called Coupon Code Payment Form for this tutorial. This template preselects all the essential elements you’ll need to use a coupon code field on your form.

Simply search for coupon in the search bar to easily find this template.

When you hover over the template, you’ll find 2 buttons: Use Template and View Demo. To preview the form, click on View Demo, and you’ll be directed to the templates gallery, where you can preview the form and even make a test payment to see how it works.

Let’s click Use Template.

add coupon form template

Step 4: Add the Coupon Code Field

Now that you’ve created a payment form, let’s change the settings to match your needs. You’ll now be landed on the General configuration page.

general settings payment form

In General, go ahead and change the title, description, and form type based on your needs. With the Type field, you can host the form on your own site or the Stripe checkout page. To know more, check out this post on selecting the right payment form types.

As soon as you install and activate WP Simple Pay, it automatically creates and publish a default payment success page. If you don’t want to use another success page for this form, there is no need to make any changes to Payment Success Page. To show a different success page, choose Specific Page and then select the page you want to use. You can also choose Redirect URL instead if you want to redirect users to an external URL.

Next, click on the Payment option from the left, and you’ll be able to customize the currency, amount, and even choose between one time and subscription payment.

payment mode

In the Form Fields option, you can find that a few different form fields have been preselected, including Coupon Code by your template.

form fields coupon code payment form

If you haven’t chosen this template, go ahead and add the coupon code field to your form. This field asks users to enter the coupon code. You can change its label, placeholder, and even the display style of its Apply button.

After making the changes as you wish, you can save the form as a draft.

You’ve now successfully created a payment form that accepts coupon entries.

Step 5: Add Coupon Codes

Next up, let’s create coupon codes and specify the discounts you want to offer.

coupon page

Go to WP Simple Pay » Coupons and then click Add New to create coupon codes.

You’ll now see a few different fields.

coupon code wordpress payments

The Code field is where you enter the coupon code you want your users to use on your payment forms. In the Type field, specify whether you want to offer a percentage discount or a fixed amount discount.

The Duration field is for users who accept recurring payments on their site. If you don’t accept recurring payments, you can leave it as it is. Otherwise, you can specify whether you want to offer it only once, for every subscription fee they pay, or a specified number of times.

The Redemption Restrictions fields are made for scheduling the coupon ahead of time, which comes in handy if you want to offer a limited-time discount, especially during the sale season.

You can also limit the number of times the coupon can be redeemed and limit the payment forms where that coupon can be redeemed.

Once you’ve configured everything, click Add Coupon.

Step 5: Add the Payment Form to a Page

If your payment form works as intended, including the coupon code, then go ahead and publish the form.

You can switch your entire site or individual payment forms to live mode.

add-wp-simple-pay-block-to-page

To embed the form, go to the post or page where you want to embed it. Then click on the + icon to add the WP Simple Pay block. Then choose a form you just created. And then, click Publish or Update.  

There you have it!

We hope this article helped you learn how to accept coupon discounts in a payment form.

With WP Simple Pay and Stripe, you can enjoy premium Stripe benefits, so grab WP Simple Pay now.

To read more articles like this, follow us on Facebook and Twitter.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. We only recommend products that we believe will add value to our readers.

6 responses to “How to Add a Coupon Code Field to Your WordPress Payment Forms”

  1. Rhuphylla Avatar
    Rhuphylla

    Hi, can this plugin be used to integrate with existing forms? We are an airbnb website and would like to add discounts and already using Stripe as payment gateway.

    1. Spencer Finnell Avatar
      Spencer Finnell

      Hello there,

      No, unfortunately WP Simple Pay will not work for you situation. WP Simple Pay is a standalone product and does not integrate with existing form solutions.

  2. Captain K Avatar
    Captain K

    Is there a field – coupon start date? I can’t find where to set the coupon start date. I see only a coupon end date field.

    1. Spencer Finnell Avatar
      Spencer Finnell

      Hello Captain K,

      No, not at this time. The coupon will be redeemable once it is created.

  3. Lisa Hawkins Avatar
    Lisa Hawkins

    It states that even with the limit (#) per customer that the customer can still use it multiple times. How do you fix this issue?

    1. Spencer Finnell Avatar
      Spencer Finnell

      Hello Lisa,

      WP Simple Pay supports limiting the total number of times a coupon can be redeemed — it does not support limiting _who_ can redeem the coupon which does mean someone could make multiple purchases with the same coupon.

      At this time there is not support for limiting coupon redemptions based on the purchase email address, but that is definitely something we could look at adding in the future!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

WP Simple Pay
Save 50%!

SOCIAL

Let’s Connect

Please enable JavaScript in your browser to complete this form.
Get tips, tricks, and resources delivered directly to your mailbox.

Start Accepting Payments Today

Start accepting one-time and recurring payments or donations on your WordPress website.