#neel.shah-coupons

1 messages ยท Page 1 of 1 (latest)

lean juniper
#

๐Ÿ‘‹ happy to help

#

are you using Checkout?

silver crane
#

Thanks @lean juniper.
No. Currently we are using Charge API

lean juniper
#

oh sorry I missed that

#

may I ask why are you still using the Charges API. It's being deprecated and we really advise you to migrate to PaymentIntents API

silver crane
#

It's legacy system so will consider this in our roadmap.

lean juniper
#

That's not the reason you're here so I will recenter the discussion on the main topic which is coupons but I just wanted to put it out there

#

you can't really use coupons directly with Stripe Products like Charges or Payment Intents

#

and use an input in your form

#

and get the percent_off or amount_off and use that to calculate the new amount of your charge

silver crane
#

Okay, that menas we need to write custom validation logic to validate coupon code..

lean juniper
#

custom validation logic to validate coupon code..
not really

#

if you use the retrieve promotion code API I sent earlier you either get a promocode or not

#

and you'll be able to apply it

silver crane
#

Okay. I will check it out.

lean juniper
silver crane
lean juniper
#

you can of course, that's why I asked whether you are using Checkout

#

you said you're using the Charges API