#johan_webhooks

1 messages ยท Page 1 of 1 (latest)

gleaming mesaBOT
#

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

minor sonnet
#

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

gleaming mesaBOT
proud granite
#

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.

minor sonnet
#

I understand but we have the latest version running on production so why is it not broken there?

proud granite
#

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.

minor sonnet
#

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?

proud granite
#

Okay so you are looking at updating the default version but NOT the API versions for your webhooks?

minor sonnet
#

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

proud granite
#

Okay, I thought you were focused on the webhooks

minor sonnet
#

no I'm sorry I didn't explain well

#

we're just focused on the api version of the dashboard not webhooks

proud granite
#

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

minor sonnet
#

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?

proud granite
#

You can filter your API logs by API version in the Dashboard. That should help you identify where these request are coming from

minor sonnet
#

would you mind point me to where I can do this/

#

?

#

is it on the developers tab?

proud granite
#

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

minor sonnet
#

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

proud granite
#

Well it's coming from a browser. You can see that in the Source header info

#

And it's not a mobile browser either

minor sonnet
#

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?

proud granite
#

Can you share that request ID?

minor sonnet
#

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

proud granite
#

This is using a deferred intent integration and the request is coming from the platform LegitFit

minor sonnet
#

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

proud granite
#

Well somewhere this isn't happening.

#

It would likely change if you updated your default version though

minor sonnet
#

I looked everywhere for these parameters in the screenshot and we don't have that anywhere

proud granite
#

Those params look like what is created automatically by Stripe.js

#

So you wouldn't find that in your own code base

minor sonnet
#

it looks like they're coming from the client side rather than server?

proud granite
#

Yes

#

That is what I meant when i said these were coming from Stripe.js

gleaming mesaBOT
proud granite
#

That is client-only and fundamentally different from stripe-node (even though they're both JavaScript)

arctic saffron
#

hi! I'm taking over this thread. let me know if you have other questions.

minor sonnet
#

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?

arctic saffron
minor sonnet
#

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

arctic saffron
#

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

minor sonnet
#

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?

arctic saffron
minor sonnet
#

ah perfect thank you so much ๐Ÿ™