Can't set arbitrary webhook version from CLI
Problem
I'm trying to test webhooks events with a consistent webhook event API version that is NOT my current account's API version or the latest API version.
As background, I need to test a major upgrade to my API version over a number of months. I can't upgrade my account API since that's what I'm doing this for. Also, for consistency, I do NOT want to upgrade the webhook event API version to latest since that's a moving target over time. I want to be able to use an arbitrary webhook event API version.
Feature
Adding a --api-version parameter to the stripe listen command that accepts the API version of the webhook events requested.
Examples
stripe listen --api-version "2019-09-09" for webhook events with the 2019-09-09 API version format.
Hi @wwahammy, thanks for reaching out.
Unfortunately at this time there are technical limitations on our end preventing us from supporting arbitrary API versions. It's definitely something we would like to be able to support in the future though. I've added this to our list of future improvements and we will figure out the best way to implement this.
I'll leave this issue open, and we'll post an update here when we have anything to share. Thanks for your patience!
I know it's not particularly helpful to just add another +1 here 😅 🙇 , but if it helps gauge demand, we've run into this problem as well.
Essentially we're using the Accounts API to create disposable accounts to run automated tests against:
stripe_test_account = Stripe::Account.create(type: "standard")
Process.spawn("stripe listen --api-key #{stripe_test_account.keys.secret}")
We use the Stripe CLI with those accounts to pipe events into a local test app, but the "platform account" and "connected accounts" end up with differing versions:
» stripe listen --api-key <MAIN_ACCOUNT_API_KEY>
> Ready! You are using Stripe API Version [2018-11-08].
» stripe listen --api-key <CONNECTED_ACCOUNT_API_KEY>
> Ready! You are using Stripe API Version [2023-10-16].
It would solve our problem if either:
- Connected accounts would default to the same API version as their parent account
- We could explicitly set the default API version when creating connected accounts
- We could explicitly choose an API version when running
stripe listen(eg this enhancement!)