#Meldin
1 messages · Page 1 of 1 (latest)
Can you say more, or explain in more details exactly what you're trying to do?
Lets say I have 3 products in stripe checkout page. Now I can add promotion code for subtotal price
What I would like to have is option to apply promotion code for each product that I have in checkout page
I know it sounds stupid but I have a reason why i want to do that
That's not supported, only one promo code can be applied
Ok
TO achieve what you describe you'd need a custom implementation to account for those discounts and manage the payment directly (ie, setting the amount on a payment intent)
Yes I am trying to do something like that. I have customized discount on the product and Now what I would like to do is if the product already have discount applied then to have allow_promotion_codes: false otherwise to set it to true
And this implementation is good if I have only one product in checkout page but if I have more products then it doesnt work
Do you mean managing whether the price is a discounted one or not on your own site before creating the session?
yes
You'd need to manage the pricing in your own logic
ie, if you have productA and productB, you could make priceAfull, priceAdiscounted, priceBfull, priceBdiscounted
then is customers use promo codes on your site for A or B, you'd create a checkout session for the full or discounted price for each
Yup I got it. Totally understand.
I asked bc I was thinking there is simpler way to achive this but I have to handle everything manualy before hitting checkout session
Thanks a lot