How can I use coupons on custom payments?

  • Profile Image
    Asked on June 30, 2016 at 07:37 AM

    How can I use coupons on custom payments?

    This is a re-post of a comment on Mastering Payment Form Integrations with JotForm

  • Profile Image
    Answered on June 30, 2016 at 09:14 AM

    When using a custom amount payment option, coupons are no longer available. This is because in this option, you should calculate the total price to charge the users:

    Using actual coupons is limited to selling products or subscriptions, and they are not avaialble for custom amount option or for donations:

    So if you want to have a custom amount payment option, and you would like to have something like a coupon code, you will need to calculate it based on other form fields on your form. You could use a regular Text Box field to collect coupons from your users, and some conditional logic to calculate the total price based on whether they have entered a valid coupon.

    Let me build a demo form for you with such an approach, and I'll get back to you soon with more details. Thank you.

  • Profile Image
    Answered on June 30, 2016 at 09:29 AM

    Here is a demo form that you can take a look, whether this is what you were looking for:

    The example coupon is "boris", and it will reduce the total price by 20%.

    The way the form is set up is as follows:

    1. We have added a Number field, named "Coupon multiplier".

    This field should be hidden (gear-shaped icon > Hide Field), and its Default Value should be set to 1:

    2. We have added a Text Box field where your users will be entering their coupon:

    3. We should edit your existing calculation for the "Total Payment", and wrap the entire calculation inside brackets. Then, we will multiply the entire bracket with the "Coupon multiplier" field:

    Simply put, when a coupon is not valid, the price will remain as it was (it is multiplied with 1).

    4. Finally, we use conditional logic to create the coupons. We will use the insert/calculate conditions, and set them as follows:

    If we want to apply a 20% discount, we will be using a value of 0.80 as the multiplier. If we want to apply a 30% discount, we would use 0.70 as the multiplier.

    You can set up such conditions for each of the coupons you want to use. Please try it out, and let us know should you need any further assistance.

  • Profile Image
    Answered on June 14, 2017 at 11:52 AM

    Boris, Thanks for your answer! worked perfectly!