#daniel_best-practices

1 messages · Page 1 of 1 (latest)

twilit flameBOT
#

👋 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/1315741082046304367

📝 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.

midnight onyx
#

Hello! Regarding your first question, SDK versions and API versions are generally different things. Some SDK versions are pinned to a specific API version, but those versions are still independent of each other. Also, Stripe.js does't really have versions (you should always be loading the latest directly from Stripe every time) and uses the default API version set on your account.

#

Regarding your second question, it sounds like it might be better for you to keep track of the cart on your end and only create a Payment Intent when someone actually wants to pay.

fleet ginkgo
midnight onyx
#

No, there's not. Why do you want to change the API version, though? Are you experiencing a specific issue?

fleet ginkgo
#

Just trying to get everything on the latest latest and was bugging me seeing the version difference in the logs 🙂

midnight onyx
#

Gotcha. If you're not seeing any issues I recommend you leave it as-is. There's no need for you to upgrade just for the sake of upgrading.

fleet ginkgo
fleet ginkgo
midnight onyx
#

It's generally fine to have the default API version on your account be something different than the API version your SDK is using.

#

What pay now button are you referring to?

#

Oh, I see.

#

Yeah, wait to create the Payment Intent until the customer is actually trying to pay.

fleet ginkgo
#

Thats similar to most of the examples over on 4242.io

I did read…

We recommend creating a PaymentIntent as soon as you know the amount, such as when the customer begins the checkout process, to help track your purchase funnel. If the amount changes, you can update its amount.

midnight onyx
#

Candidly, I recommend you ignore that. 🙂

fleet ginkgo
#

Okay, brill… i love that 4242 website, just a shame they all have the “code isn’t production ready” as would love to just copy paste most of it over ideally 🙂

midnight onyx
#

The production ready code would have a lot of error handling and other stuff that would get in the way of understanding the core Stripe concepts. 🙂

fleet ginkgo
#

Okay… i’ll do some testing on all this later and probably be back on here if it doesn’t work 🙈