#zepatrik
1 messages · Page 1 of 1 (latest)
Hi there!
You can't change the API version of an existing webhook event. But you can create a new one with any API version you want when using the API and setting the api_version parameter https://stripe.com/docs/api/webhook_endpoints/create#create_webhook_endpoint-api_version
so I have to recreate all webhooks and rotate all secrets??
that sucks...
why are the docs then mentioning to change the version?
so I have to recreate all webhooks and rotate all secrets??
Actually it depends. When looking at a webhook endpoint in my dashboard I see this:
hm yeah but I want to first test if it works, as described in the upgrade guide
In that case you can just create a new webhook endpoint to run some tests.
yeah but that does not work as that will have other secrets so they will not match up
True, if you create a new webhook endpoint it will have a different sercet.
so I can either rotate the secrets -> the old webhook fails
or not rotate them -> the new one fails
so how should I test it then? 😅
create a new webhook endpoint with the specific API version you need and with a different URL. And on that URL process the events with the new webhook secret.
This way all your existing webhook will continue to work, and you can do some tests on the new webook endpoint.
and I cant even just swich the test mode to the new version,
this sucks so much... I will have to add ingress rules, wait for them to be deployed, adjust the server code, and then undo all of that again
can you maybe bring to the team that this is not useful at all? I guess we will just not upgrade in that case
and please also adjust the misleading docs
Another option is to run your tests locally. Instead of creating a new webhook endpoint, just use the Stripe CLI https://stripe.com/docs/cli/listen
yeah we do that for our local instances... but that is not a real test, as the environments are so vastly different
also I can see that checkout and invoice pages use old API versions... it is not really easy to figure out whether the upgrade works if they screw with those stats....
filtering requests by origin would help there
filtering requests by origin would help there
I'm not sure I follow. Can you clarify what you mean?