Our EE Addons have Moved!
Our ExpressionEngine Add-ons have been acquired by EE Harbor. Head over there for documentation, info and support.
Our ExpressionEngine Add-ons have been acquired by EE Harbor. Head over there for documentation, info and support.
Charge support coupons for single use and recurring payments. They can be a fixed amount discount, or a percentage of the total. To make use of coupons, you'll first setup a Coupon in the Charge CP, then add the coupon field to your payment form, and finally add extra output to your thanks and receipt templates.. In the Charge CP, to to the 'Coupons' page. You'll see a form with the following options :
In the CP, you'll see a form like this :
Coupon details are broken into 3 main parts - Basic Details, Coupon Type and Payment Type. Depending on the specific options, different settings will be required and displayed on the coupon setup.
Name
Code
Coupon Type
Amount Off
used with fixed amount couponsCurrency
used with fixed amount couponsPercentage Off
used with percentage off couponsPayment Type
Max Usages
used with recurring payment couponsDuration
used with recurring payment couponsDuration in Months
recurring payment coupons, with a duration of 'repeating'With coupons created, in your payment form you now need to add an input for the coupons. This is as simple as adding an input called plan_coupon
and some variables to your form :
.. <label for="plan_coupon">Coupon</label> <input type="text" name="plan_coupon" id="plan_coupon" value="{plan_coupon}"/> {if error_plan_coupon} <span class="error">{error_plan_coupon_message}</span> {/if} ..
Note: Be sure to include the error_plan_coupon_message output in your form. If the coupon fails validation we'll return an error to the page.
Finally, you'll want to make sure the applied coupon is shown on your thanks and receipt pages. If there has been a coupon applied the plan_amount
will reflect the value paid, and the original payment amount will be available as plan_full_amount
. Also the discount amount is available as {plan_discount}.
For full reference, the coupon specific variables avaiable in the {exp:charge:info}
tag are :
{plan_amount}
{plan_discount}
{plan_full_amount}
{plan_coupon}
{plan_coupon_stripe_id}