stripe-payments

Stripe: How to get the configured API version through API


Is there any endpoint in Stripe that returns the current API version configured in the account?

I need it to check if an account uses the last API version or not.

Basically, I get the list of last Stripe API version scraping the page https://stripe.com/docs/upgrades

Then I'd like to connect to the Stripe account via API and heck if it uses the last scraped API version.

If not, I'd like to calculate how many new releases there are between the API version used in the acount and the last API version released by Stripe.

But I need a way to retrieve the API version configured in the account: any ideas?


Solution

  • There is unfortunately no endpoint to find the API version of the account being used.

    If you are using Stripe Connect however then it shouldn't matter what default version any connected account has, as long as you pin the API version in your requests and create webhook endpoints with pinned versions.


    EDIT

    If you use the Stripe "Workbench" (new ~ August 2024) then, as the API documentation says:

    View your API version and the latest available upgrade in Workbench

    See the API version used by recent requests on your account and the latest available upgrade from the Overview tab in Workbench.

    showing the user interface at the URL https://dashboard.stripe.com/workbench/overview which contains a section for "API keys" and API version upgrades

    If you haven't update to Workbench and you absolutely need the API version of an account, the only real way to find it is to look at the Stripe dashboard: https://dashboard.stripe.com/test/developers

    screenshot of dashboard.stripe.com/developers which is a stripe developer dashboard. the section 'API version' lists the Default/Current version, the Latest version, and option 'Upgrade available...' to open an upgrade dialog