#junaid_abbasi999

1 messages · Page 1 of 1 (latest)

lost ospreyBOT
civic flint
#

waiting for a reply 😦

real creek
#

hey there

#

You cannot use coupons with payment intents directly, you need to calculate the discount and set the amount

civic flint
#

So I am charging my customer off-session. So from your answer I needed to store information regarding coupon code in my database and then use it while customer is charged. is this correct approach?

#

Or if I am calculating the discount my self. I can have any logic behind how to handle discounts and copons. Right?

real creek
#

Either one, yes, the implementation details are up to you

civic flint
#

and anothe thing, how will stripe figure out and update the redemptions number in the stripe? for now i am thinking about verifying the copouns code using stripe API while customer confirms his order and then save the discount_percentage saved in database. And then while charging I will minus that percentage from total. But I do need to know that the max redemtion number is not maxed out...

real creek
#

For APIs that support coupon usage, these are tracked when added

#

You probably want to track this using your own system them, perhaps separately

civic flint
#

Thanks for the help. you guys are heros.