#mike_error

1 messages ยท Page 1 of 1 (latest)

buoyant sparrowBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

lucid turret
#

Are you able to share an example Checkout Sessions ID where this is occuring?

thorny plinth
lucid turret
#

what is the promo-code that's currently not working?

thorny plinth
#

complementary

lucid turret
#

Appreciate the details, one last thing, do you have an example where it was working on the Payment Link so I can cross reference.

thorny plinth
lucid turret
#

Apologizes do you have any completed transactions that used the promo-code, for example a Payment Intent from a previous successful transaction?

thorny plinth
#

I can just create a successful transaction now. How would I find the Payment Intent?

lucid turret
#

if you're able to get the Checkout Session I can track down the Payment Intent for you ๐Ÿ™‚

thorny plinth
#

cs_live_b16Zi0dmtQqXaTeJgClmCIga5Awj7nSuB7hR34ojye0yIOMG2ayKotVUC8

This was a successful transaction using the Payment Link above

lucid turret
thorny plinth
#

yes i will try that!

lucid turret
#

That's default for Payment Links, but always is the default for Checkout Sessions, I believe since it's enabled, and payment details are being collected, the minimum transaction amounts come into play. Hence the This promotion code cannot be applied because it reduces the total below the minimum charge amount. errors i'm seeing in your logs

thorny plinth
#

that makes sense. I am building now. Where are you seeing those logs, by the way? I had a hard time finding anything like that

lucid turret
#

From internal logs unfortunately not something that would surface on your end.

thorny plinth
#

Ok, I just got: You can only set payment_method_collection if there are recurring prices.

lucid turret
#

hrmm. i'll keep digging

thorny plinth
#

thank you

lucid turret
#

I think this might be an API version issue. Are you able to set an API version higher than 2023-08-16 for Checkout Session creation testing?

buoyant sparrowBOT
lucid turret
#

So that's the issue here, the promo code reduces the cost to 0 which wasn't supported until that API version.

Looks like currently Checkout Sessions are being created with 2020-08-27

thorny plinth
#

I didn't intend to set that manually. Do you know why it would have defaulted to 2020?

I will try: Stripe-Version: 2024-06-20

lucid turret
#

If a version isn't set manually then it's coming from the dashboard default.

thorny plinth
#

ah gotcha. I will try now

#

Do I also need payment_method_collection: 'if_required' ?

#

ok without that, it worked! using 2024-06-20

#

Thank you so much!

lucid turret
#

You can leave that out now. It should be the default.

I'd set the API version for just that API call for now just to test,

https://dashboard.stripe.com/workbench/overview

You can adjust your default API version here, however since it's a 2020 version I'd recommend not updating the default API version just yet till you've thoroughly tested your existing intergation in test mode or a sandbox on the new API version, lots of breaking changes since then so the assumption would be some integration changes will be required.

thorny plinth
#

ok good tip, I will just set it for this call. Thanks again