#mikedwpdg - API Vesioning

1 messages · Page 1 of 1 (latest)

nimble relic
#

Hi 👋

#

Would you want this to apply globally or specific to just Webhooks?

solemn sierra
#

Just webhooks.

nimble relic
#

In the Dashboard the dropdown will only display

  1. Your account's default API version
  2. The current API version
#

But you can specify the API version when creating a webhook endpoint via the API

solemn sierra
#

Using the update call, would it be possible to set the API version?

nimble relic
#

No, that isn't an option available once a webhook has been created.

solemn sierra
#

That is true whether it is via the API or the dashbaord?

nimble relic
#

Doesn't matter. Once the endpoint is created (however it is created) the API version is pinned

solemn sierra
#

OK. Thanks.

nimble relic
#

Are you using a strongly typed Stripe client library?

solemn sierra
#

The python library.

nimble relic
#

Okay but you just have code that is specific to the shape of Stripe objects from the '2016-07-06' API version?

solemn sierra
#

That is the investigation. We have not identified all potential conflicts between the two version at this point. We were hoping if we could downgrade, it could give us a little more time to prevent unexpected errors.

hybrid night
#

Just create a new endpoint with the right version you want

#

and disable the old one (or write code to check the version first)

solemn sierra
#

I tried that. 2016-07-06 was not an option in the dashboard. If it is available via an API call, I will bring it up to my team.

#

or write code to check the version first

I appreciate the coding hints. Our codebase it quite large and this was brainstormed.

hybrid night
#

Yeah really all you need to do is create the webhook endpoint via the API

#

would take a few minutes at most

solemn sierra
#

Ok. Thanks.

#

Worked as described via the API. Thanks.

hybrid night
#

awesome!

solemn sierra
#

One last question, is it possible to delete an existing webhook and recreate it with a different API version, or is there some persistence behind the scenes that is not immediately visible in the dashboard?

hybrid night
#

webhooks are completely independent, so yes, you can delete the other webhook whenever you want, Dashboard or API