stripe-cli icon indicating copy to clipboard operation
stripe-cli copied to clipboard

Can't set arbitrary webhook version from CLI

Open wwahammy opened this issue 6 years ago • 3 comments

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.

wwahammy avatar Jan 08 '20 17:01 wwahammy

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!

ob-stripe avatar Jan 10 '20 23:01 ob-stripe

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:

  1. Connected accounts would default to the same API version as their parent account
  2. We could explicitly set the default API version when creating connected accounts
  3. We could explicitly choose an API version when running stripe listen (eg this enhancement!)

balvig avatar Dec 19 '23 06:12 balvig