Coupon Shortcode (Pro 2.5)

To utilize Stripe Coupons in your checkout forms, simply add the [stripe_coupon] shortcode inside your existing Stripe Checkout shortcode. Examples of using coupons with our Subscriptions add-on found here.

Note: You will need to include the [stripe_coupon] shortcode inside of the [stripe][/stripe] shortcode block. This will attach the coupon entry to that specific form.

Coupons must match those setup in your Stripe account. Test and live coupons are separate.

Your Test Stripe coupons | Your Live Stripe coupons

Coupon Shortcode Options

Available options/shortcode attributes:

  • label – The label before the input box.
  • placeholder – Text appearing inside the field before a user enters anything.
  • apply_button_style – Set to “stripe” to use Stripe’s button styles. Set to “none” to ignore Stripe’s button styles. Base button CSS class: sc-coup-apply-btn. Default: “none”

Note: Charge amounts must meet a minimum requirement (such as 50 cents USD) to be allowed by Stripe. See the minimum charge for various currencies. If a coupon code is entered that brings the total below the minimum then the user will get a message about it and will not be able to process the payment.

Coupon Shortcode Examples

Basic coupon input:

[stripe name="My Store" description="My Product" amount="1999"]

Coupon code entry with custom label and Stripe styled button:

[stripe name="My Store" description="My Product" amount="1999"]
[stripe_coupon label="Have a coupon?" apply_button_style="stripe"]

Total Amount Shortcode Options

You can easily show the total for the current form by using the [stripe_total] shortcode.

Note: This shortcode is not required to make the checkout functional. If you do use it then you need to make sure you wrap it within the base shortcode. See example below.

Note: If you use this shortcode with a subscription shortcode that has a setup fee you must include this shortcode after the closing subscription shortcode.

Available options/shortcode attributes:

  • label – Text to show before the amount due. Default: “Total Amount:”

Total Amount Shortcode Examples

Show the total:

[stripe name="My Store" description="My Product" amount="1999"]

Show the total with an alternate label:

[stripe name="My Store" description="My Product" amount="1999"]
[stripe_total label="Amount Due:"]
Updated on November 19, 2018

Was this article helpful?

Related Articles