#jason_promo-code-api-version
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/1375151894707830897
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
That request throws the following error: "This promotion code cannot be redeemed.".
How did you create this promotion code?
Thank you for your response. ๐
I created it by clicking on the Product Catalog menu item on the left and then Coupons tab at the top. Then I filled out the form. Here is the promotion code screen, if this provides valuable info for you
Aha. I"m getting more details. I think the problem is there is a mismatch between the parameters used to create the promo code and the checkout session.
Okay. Interesting.
Specifically the duration is set to " duration: "forever"
And the error message says: "error_code="coupon duration is not supported for the current API version" "
Okay. I would like that when the person uses this coupon code, that they always pay the discounted price. Therefore, I would assume that it should be "duration: forever" Is there something that I am not understanding here?
How did you create the Checkout Session?
The API version used here does not allow the "forever" duration. This was in our Changelog
I am reading about how to upgrade the api version
Unfortunately, the Dashboard uses it's own API version
Which causes additional headaches
Okay. So does that mean it is not at all possible for me to apply a discount to a subscription product in this way?
I guess the way to do it is to create an entirely new product that has the appropriate pricing?
I think that would be a good approach to achieve your outcome. This server is focused on helping developers code integrations with Stripe APIs so we aren't super familiar with all the ins and outs of the Dashboard.
You too ๐