#junaid_abbasi999
1 messages · Page 1 of 1 (latest)
waiting for a reply 😦
hey there
You cannot use coupons with payment intents directly, you need to calculate the discount and set the amount
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?
Either one, yes, the implementation details are up to you
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...
For APIs that support coupon usage, these are tracked when added
You probably want to track this using your own system them, perhaps separately
Thanks for the help. you guys are heros.