#johan_webhooks
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/1386642332379774996
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
we want to press this beautiful "upgrade" button so bad after all the hard work but we just want to make sure we won't break anything on production ๐
we have 3 webhook endpoints they're on versions:
2020-08-27,
2018-08-23,
2019-12-03
Hi ๐
there are A LOT of breaking changes between the current API version and the versions your webhook events are on. The approach I recommend is to spin up a new Sandbox account https://docs.stripe.com/sandboxes using the latest API version and use it to test/validate your webhook handling code.
I understand but we have the latest version running on production so why is it not broken there?
But your webhook endpoints are tied to specific API versions.
So they are receiving API objects that correspond to those versions.
It is likely that fields names and the locations of some data that your code looks for may have changed. This could break your webhook handling code
If I have mistaken the description of your situation, please let me know.
Yeah I think I didn't explain well. I will try one more time I apologies.
So we updated our stripe version from v9 to v18 in our project. it's been running for about a week on production and it seems all good. nothing has happened to the webhooks or any errors reported since we updated to the latest version. but I wonder if this will change if we update the stripe default version in the workbench since we still have
2018-08-23 as default there. does that make sense?
all our api calls have been migrated to v18. we got a bunch of breaking changes and errors every time we bumped to a new version (Typescript was a huge help) . We bumped version by version to reduce breaking changes until we got to v18
you can see above that all our api calls are running on the last version. will this affect webhooks if we migrate to the latest in the workbench?
Okay so you are looking at updating the default version but NOT the API versions for your webhooks?
yes exactly!!
the next step will be updating the webhooks api versions but that's down the line, not yet since we want to do this first
Okay, I thought you were focused on the webhooks
no I'm sorry I didn't explain well
we're just focused on the api version of the dashboard not webhooks
In that case you should be fine. All our SDKs now pin SDK versions to specific API versions so updating SDKs will kind of nudge you along with updating the API
we also have some calls still going to 2018-08-23 but we can't see where they're coming from. could that be from our react native app or front end calls?
You can filter your API logs by API version in the Dashboard. That should help you identify where these request are coming from
Are you using Stripe Workbench?
Here is what I see when I click on the "More Filers" button in my Stripe Logs. The API version filter is what you want
is it here?
yeah exactly so if you look at the event on the right we're unable to identify where that came from
same goes for this one
Well it's coming from a browser. You can see that in the Source header info
And it's not a mobile browser either
we couldn't find anywhere in our server a call using the default api version. all our stripe calls are using the latest version now. but we don't understand why some calls are still going to the default version
do you have idea why some of them might be still hitting that default version? is there another place that's not the server?
Can you share that request ID?
sure req_Pmd2dCqFecoOcz
that's POST /v1/payment_methods
then I have req_SRnnYqk0JgcSug for:
GET /v1/payment_intents/pi_3Rd6gQPVKRKcuayB35sCpuis
and req_xgHZesQ27dH8mc for:
POST /v1/tokens
This is using a deferred intent integration and the request is coming from the platform LegitFit
Since these requests are being made using Stripe.js in the browser, it's likely you aren't specifying your API version when you intialize Stripe.js. You can specify it in the options parameter when you initialize Stripe.js https://docs.stripe.com/js/initializing#init_stripe_js-options-apiVersion
we initialise it in a shared file in the server and that shared file gets imported across all project. the shared file has the following api version:
2025-05-28.basil
Well somewhere this isn't happening.
It would likely change if you updated your default version though
I looked everywhere for these parameters in the screenshot and we don't have that anywhere
Those params look like what is created automatically by Stripe.js
So you wouldn't find that in your own code base
it looks like they're coming from the client side rather than server?
That is client-only and fundamentally different from stripe-node (even though they're both JavaScript)
hi! I'm taking over this thread. let me know if you have other questions.
hello soma I'm a bit confused I would like to find where exactly these calls are coming from
these calls are still hitting the default version 2018 and I want to make sure nothing will break if I update to the latest version in the workbench
could it be from this in the front end?
Looking at https://dashboard.stripe.com/logs/req_SRnnYqk0JgcSug, this is a request made by the platform (account ID ending with 5ETA) with a publishable key from your frontend.
https://dashboard.stripe.com/logs/req_xgHZesQ27dH8mc is similar to the above, but more specifically it's using the Token API, so the code you shared seem tomatch.
okay!
then will this be okay if I update to the latest version in the stripe dashboard?
I assume this calls are going to be redirected to the latest version (2025) and not 2018 anymore
then will this be okay if I update to the latest version in the stripe dashboard?
as mentioned in the popup, there are some breaking changes. so you need to be careful when upgrading because some of your API call could start failing.
I assume this calls are going to be redirected to the latest version (2025) and not 2018 anymore
If you didn't set a specific API version when making the API calls, then Stripe will automatically use your default API version (which would be the latest version if you upgrade).
yeah those breaking changes have already been resolved because we're running the latest version on production already but the last step is to set the default version in the stripe dashboard to the latest. you can see here our traffic is on the latest version now:
how do you set a specific version in the front end? I thought that was only possible in the server
so for instance if I want this to run in the latest version how do I do that?
yeah those breaking changes have already been resolved
great!
how do you set a specific version in the front end?
like this: https://docs.stripe.com/js/initializing#init_stripe_js-options-apiVersion
ah perfect thank you so much ๐