#lachiu_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1499014560915656809
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- lachiu_unexpected, 1 hour ago, 10 messages
hi there!
are you using Checkout Session to accept payments, or something else?
and your goal is to lower the total price? Why not use discounts for this?
Yes
As far as we understood, you have to create a coupon code for this. Is that correct?
it depends. you can create a code that the user wil have to enter on the Checkout Session. or you can directly set the discount when you create the Checkout Session with the API.
Exactly, we've currently got the latter working.
So the AI bot is incorrect then, we can't just add a negative item to the list of products in the checkout session?
you would need to create a negative price for this, which is not possible no.
but I still don't understand what's the issue with using discounts.
We're worried for 2 things:
- The product catalog/coupons page gets cluttered. These 'discounts' on top of normal coupon codes from a flyer or website.
- Being able to re-use the coupon code made from this logic, in a different checkout session. We currently have the coupon field disabled, we might allow this in the future. This would not be a problem right as it seems that you can't use these manually?
I don't understand your last point
We've currently added the parameter 'max_redemptions' = 1. This would force a coupon code to only be used once. Correct?
We are worried that once we encounter an issue, the checkout session isn't opened/triggered thus resulting in the coupon code not being claimed and remaining to exist without ever being claimed.
From what we understand currently after reading the documentation, if we had the coupon field in the checkout session enabled, you wouldn't be able to fill in this code, right?
So is there any possibility that this code is used in such an event?
Yes
Correct, the field on the payment page only accepts customer facing promotion codes NOT the coupon itself
Alright, that is clear.