upgrade-stripe: Stripe API and SDK Upgrade Guide Skill

Preface

Since 2024, Stripe has adopted a monthly release naming convention for API versions (e.g., 2026-09-30.endive). Server-side SDKs, Stripe.js, mobile SDKs, and Webhooks each have their own versioning rules, and behaviors regarding “whether API versions can be overridden” differ between strongly typed language SDKs and dynamic languages. When upgrading, if you only change the npm package version without verifying the pins on the account and Webhooks, or if you mistakenly upgrade both thin events and snapshot events together, it is easy to pass in the test environment but fail in production due to signature or field changes. The following introduces the Agent Skill upgrade-stripe found in Stripe’s official repository, which is used to complete version selection and breaking change investigation in the order specified by the documentation within coding assistant scenarios.

What is this

upgrade-stripe is an Agent Skill (in SKILL.md format) maintained by Stripe in the stripe/ai repository. The official description is: Guides for upgrading Stripe API versions, Webhook endpoints, server-side SDKs, Stripe.js, and mobile SDKs.

It solves the problem of “scattered documentation and multi-component linkage”: the same integration may simultaneously contain client-side apiVersion, per-request overrides, snapshot API versions for Webhooks / Event Destinations, and different version strategies for Java / Go / .NET versus Ruby / Python / Node. The Skill writes the sequence of selecting options, comparing changelogs, modifying configurations, and testing into a process executable by Agents, rather than replacing the original text of API versioning, API upgrades, and API changelog.

Core Functions

The following capabilities are derived from the official SKILL.md and the description at officialskills.sh.

Selecting the Target API Version

  1. If the user has already specified a target version, prioritize the user’s specification.
  2. Otherwise, query the current version via available documentation or tools, such as Stripe CLI’s stripe docs /api/versioning, or look for the sentence starting with “The current version is” on the API versioning page.
  3. The bundled fallback version within the Skill is 2026-09-30.endive (snapshot generation date: 2026-10-19); use this only when unable to access docs.stripe.com. It may be outdated if not updated for about a month, and you must not guess a newer version number.

Before making changes, compare the target version with all pins in the integration: client configuration, per-request overrides, and Webhook endpoints. Unless explicitly requested by the user, do not downgrade pins to older versions, nor change stable pins to preview. Pins already matching the target should be reported as unchanged. You must explain the selected target and its source; if unable to verify online, clearly state that the latest version is unverified, and do not claim the integration is on the latest version.

Webhooks and Event Destinations

During review, distinguish between snapshot events and thin events. Thin event payloads are not bound to API versions, so changing the account API version does not require upgrading corresponding destinations. However, fetching full events or related resources via the API is still subject to API version constraints.

For v2 snapshot type destinations (including Webhooks, Amazon EventBridge, Azure Event Grid), check snapshot_api_version; if it is inconsistent with the target, since it cannot be modified after creation, a new destination should be created and tested as a replacement. When replacing Webhooks, save the new signing secret, and during the switch, have the handler accept both new and old secrets; after the switch is complete, disable or delete the old destination to avoid duplicate deliveries. Thin event destinations remain unchanged.

Server-side SDKs

  • Dynamically typed languages (Ruby, Python, PHP, Node.js): Can set the API version globally or per request; use the Stripe-Version header for curl testing, and replace the bundled version in examples with the selected target.
  • Strongly typed languages (Java, Go, .NET): SDK releases are bound to fixed API versions; do not force an override in code to a version inconsistent with the SDK; instead, select the SDK release targeting the desired API version. Preview targets require the corresponding beta SDK for each language, see SDK versioning.

Best practice is to explicitly declare the integration’s API version in the code, rather than relying solely on the account default version.

Stripe.js and Mobile

  • Stripe.js adopts an evergreen model, with major versions (e.g., Acacia, Basil, Endive) released approximately every six months; the script loading example is https://js.stripe.com/endive/stripe.js, and the major version of the npm package @stripe/stripe-js corresponds to the Stripe.js major version. Each Stripe.js major version is paired with a fixed API version (e.g., Endive corresponds to 2026-09-30.endive), and this association cannot be overridden. When migrating from v3, the official recommendation is to first identify the current API version, consult the changelog, and then consider gradually raising the API version before switching the Stripe.js major version; v3 remains supported for the long term.
  • iOS / Android SDKs use semantic versioning (MAJOR.MINOR.PATCH); React Native SDK uses 0.x.y, where minor updates may contain breaking changes. Mobile SDKs can work with any backend API version unless otherwise specified in the documentation.

Upgrade Checklist (Summary)

The official checklist includes: consult the changelog and upgrades guide; upgrade server-side SDK packages; update client apiVersion; perform integration testing with the new version using the Stripe-Version header; handle snapshot type Webhooks / Event Destinations as described above; update Stripe.js and mobile SDKs as needed, etc. See the original Skill text for complete steps.

Installation and Activation

In environments supporting Agent Skills, you can install a single skill from the entire stripe/ai repository via the officially listed command:

npx skills add https://github.com/stripe/ai --skill upgrade-stripe

You can also provide the Skill directory link to the coding assistant for installation: https://github.com/stripe/ai/tree/main/skills/upgrade-stripe.

The materials do not distinguish installation differences between Cursor, Codex CLI, and Claude Code; adhere to each product’s support for npx skills add or SKILL.md paths.

Typical Usage

The following scenarios are derived from the “When to use it” description on officialskills.sh and are consistent with the Skill’s capabilities:

  • Pin a Node.js application to a specified Stripe API version (e.g., 2026-02-25.clover).
  • Perform tentative calls to a new API version using the Stripe-Version request header before the official switch.
  • Migrate Webhook handlers after breaking changes occur in the event structure (including creating new snapshot destinations and dual-secret transition).
  • Upgrade only the Stripe SDK package for a Python backend and verify if the api_version configuration needs synchronous modification.
  • When switching a checkout page from Stripe.js v3 to a new major version (e.g., Clover), compare against the changelog and API / Stripe.js pairing relationships.

Explicit version specification syntax for dynamic languages (replace the version number in the example with your target version):

import stripe
stripe.api_version = '2026-09-30.endive'
const stripe = require('stripe')('sk_test_xxx', {
  apiVersion: '2026-09-30.endive'
});

Use Cases and Precautions

Suitable for: Backend or full-stack developers maintaining Stripe integrations; teams needing to systematically organize API versions, SDKs, Stripe.js, Webhook snapshot versions, and testing sequences within a single conversation; when frequently tracking Stripe’s monthly API and semi-annual major version changes around 2026, use the Skill to constrain Agents from guessing version numbers or downgrading pins.

Precautions:

  • The Skill cannot replace reading the API changelog; business code impact from breaking changes still requires manual judgment.
  • The bundled fallback version 2026-09-30.endive is an offline snapshot only; production selection should be based on docs.stripe.com or CLI query results.
  • Strongly typed SDKs and preview / beta versions have additional constraints; packages should be selected according to official SDK versioning, and simply changing HTTP headers is not recommended.
  • The snapshot_api_version for Webhook snapshot destinations cannot be modified after creation; when planning upgrades, reserve a window for creating new endpoints and rotating signing keys.

Conclusion

upgrade-stripe encodes Stripe’s multi-component versioning model and official upgrade checklist into a process that Agents can follow. It is suitable for reducing the risk of missing Webhook pin updates or mistakenly upgrading thin events when upgrading SDKs or major API versions. Official Skill address: https://github.com/stripe/ai/tree/main/skills/upgrade-stripe.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye