#jason_promo-code-api-version

1 messages ยท Page 1 of 1 (latest)

sly krakenBOT
#

๐Ÿ‘‹ 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.

gilded yacht
#

Hi ๐Ÿ‘‹

That request throws the following error: "This promotion code cannot be redeemed.".

How did you create this promotion code?

shadow vale
#

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

gilded yacht
#

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.

shadow vale
#

Okay. Interesting.

gilded yacht
#

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" "

shadow vale
#

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?

gilded yacht
#

How did you create the Checkout Session?

shadow vale
#

Just with a payment link.

#

(assuming that I understand your question correctly)

gilded yacht
#

The API version used here does not allow the "forever" duration. This was in our Changelog

shadow vale
#

I am reading about how to upgrade the api version

gilded yacht
#

Unfortunately, the Dashboard uses it's own API version

#

Which causes additional headaches

shadow vale
#

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?

gilded yacht
#

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.

shadow vale
#

I understand. thank you very much for your help

#

have a good day

gilded yacht
#

You too ๐Ÿ‘‹