#mike_error
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/1495903117060079718
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Are you able to share an example Checkout Sessions ID where this is occuring?
if you would like to see the working project you can at https://order.fulframe.tv/grace-spring-2026
Otherwise, here is an example session: cs_live_b1CClantpuzWoeJHZ3DSr5mKu6WsISePqmBxMxUQK8M9j7lkHfdLfICb2V
what is the promo-code that's currently not working?
complementary
Appreciate the details, one last thing, do you have an example where it was working on the Payment Link so I can cross reference.
sure! This is using the 7pm Price ID
Apologizes do you have any completed transactions that used the promo-code, for example a Payment Intent from a previous successful transaction?
I can just create a successful transaction now. How would I find the Payment Intent?
if you're able to get the Checkout Session I can track down the Payment Intent for you ๐
cs_live_b16Zi0dmtQqXaTeJgClmCIga5Awj7nSuB7hR34ojye0yIOMG2ayKotVUC8
This was a successful transaction using the Payment Link above
Can you try making a Checkout Sessions with payment_method_collection: 'if_required' https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-payment_method_collection
yes i will try that!
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
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
From internal logs unfortunately not something that would surface on your end.
Ok, I just got: You can only set payment_method_collection if there are recurring prices.
hrmm. i'll keep digging
thank you
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?
"You must be on API version 2023-08-16 or later to process no-cost orders using the Checkout Sessions API."
https://docs.stripe.com/payments/checkout/no-cost-orders?payment-ui=embedded-form
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
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
If a version isn't set manually then it's coming from the dashboard default.
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!
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.
ok good tip, I will just set it for this call. Thanks again