WP Payment Pal Documentation
← Back to site

Adding Coupon Fields to Your Form

Enable customers to enter coupon codes on your payment forms. This guide covers adding the coupon field and enabling coupon acceptance.

Reading time: 3 minutes | Difficulty: Beginner

Overview

Enable customers to enter coupon codes on your payment forms. This guide covers adding the coupon field and enabling coupon acceptance.

Prerequisites

  • At least one coupon created
  • A payment form to add the field to

Two-Step Process

Adding coupons requires:

  1. Enable coupons on the form (Payment tab)
  2. Add coupon field to collect the code (Form Fields tab)

Step 1: Enable Coupons on the Form

  1. Edit your payment form
  2. Click the Payment tab
  3. Find Enable Coupons setting
  4. Toggle it On
Enable coupons toggle highlighted

Without this step, the coupon field won’t validate codes.

Step 2: Add the Coupon Field

  1. Click the Form Fields tab
  2. Click Add Field
  3. Select Coupon from the dropdown
  4. Position the field where you want it
Coupon in field dropdown highlighted
Coupon field added to field list
Form fields tab

Recommended Position

Place the coupon field:

  • After price selection
  • Before or near order summary
  • Above the payment button

Step 3: Configure the Field

Expand the coupon field to configure:

Setting Description Example
Label Field label “Coupon Code”
Placeholder Hint text “Enter code”

Label Options

  • “Coupon Code”
  • “Discount Code”
  • “Promo Code”
  • “Gift Code”

Step 4: Add Order Summary (Recommended)

Show customers their discount:

  1. Add Order Summary field
  2. Enable Show Discounts
  3. Position after coupon field

Frontend Experience

Coupon Field Display

Coupon Field

Customers see:

  • Input field for code
  • Apply button
  • Validation feedback

Successful Application

Coupon Applied

After applying:

  • Success message appears
  • Discount reflected in total
  • Code can be removed

Order Summary with Discount

Order Summary Discount

Shows:

  • Original subtotal
  • Discount amount
  • Final total

Common Configurations

Standard Setup

1. Payment Tab: Enable Coupons = On
2. Form Fields: Add Coupon field
3. Form Fields: Add Order Summary field
4. Position: Coupon above Order Summary

Minimal Setup

1. Payment Tab: Enable Coupons = On
2. Form Fields: Add Coupon field
(Order summary optional but recommended)

Error Messages

Situation Message
Invalid code “Invalid coupon code”
Expired “This coupon has expired”
Wrong form “Coupon not valid for this form”
Limit reached “Coupon limit reached”
Already used “You’ve already used this coupon”

Testing Coupons

  1. Create a test coupon
  2. Enable coupons on a form
  3. Add the coupon field
  4. Save and view the form
  5. Enter the test code
  6. Verify discount applies

Without Coupon Field

If coupons are enabled but no field is added:

  • Customers can’t enter codes
  • Form works without discounts
  • Useful if applying coupons programmatically

Conditional Display

The coupon field always displays if added. To conditionally show it:

  • Use different forms (one with coupon, one without)
  • Or enable/disable coupons per form

Multiple Forms

Each form needs its own setup:

  • Enable coupons independently
  • Add coupon field to each form
  • Same coupon can work on multiple forms (if not restricted)

Removing Coupon Support

To stop accepting coupons on a form:

Option 1: Disable Coupons

  1. Edit form
  2. Payment tab
  3. Toggle Enable Coupons Off

The field remains but codes won’t validate.

Option 2: Remove Field

  1. Edit form
  2. Form Fields tab
  3. Delete the Coupon field

Customers can’t enter codes at all.

Best Practices

  1. Always add Order Summary – Show the discount clearly
  2. Test thoroughly – Verify coupons work before promoting
  3. Clear labeling – Use familiar terms like “Promo Code”
  4. Good placeholder – Hint like “Enter your code”
  5. Visible feedback – Ensure success/error messages are clear

Troubleshooting

Coupon field not showing

  • Verify field is added in Form Fields tab
  • Save form and refresh page
  • Check for JavaScript errors

Codes not validating

  • Verify coupons enabled in Payment tab
  • Check coupon exists and is active
  • Verify form is in coupon’s allowed forms
  • Check usage limits and expiration

Discount not showing

  • Add Order Summary field
  • Enable “Show Discounts” option
  • Refresh the page after applying code

What’s Next?