upgrade-stripe
Install this skill
npx skills add stripe/aiWorks across Claude Code, Cursor, Codex, Copilot & Antigravity
The upgrade-stripe skill facilitates the systematic migration of Stripe integrations across API versions, server-side SDKs, and client-side implementations. It provides logic for managing date-based API versions, ensuring code remains compatible with the latest Stripe features while navigating potential breaking changes. The skill assists in configuring global or request-level API versions for dynamic languages, managing strongly-typed SDK updates, and coordinating Stripe.js updates. By automating the identification of necessary codebase modifications—such as field adjustments or webhook handler updates—this skill reduces the operational risk associated with migrating between API versions like Acacia or Clover. It supports maintaining consistent request behavior by verifying Stripe-Version headers and ensuring mobile SDKs align with current backend requirements, keeping your financial stack functional and secure.
When to Use This Skill
- •Updating a legacy Node.js backend to use a recent API version for new subscription features
- •Migrating from legacy Stripe.js v3 to the latest evergreen version
- •Testing specific API behavior changes via headers without updating the global account default
- •Standardizing SDK versions across a multi-service architecture
How to Invoke This Skill
Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:
- “Update my Stripe API version to the latest release
- “How do I migrate my backend SDK to the Clover API version?
- “Check my code for breaking changes regarding Stripe API version migration
- “Help me update my Stripe.js implementation to the newest major version
- “Set the API version for my Node.js Stripe client
Pro Tips
- 💡Always test Stripe upgrades in a staging or development environment first, never directly in production.
- 💡Before updating, thoroughly review the official Stripe API Changelog for your specific version range to anticipate and prepare for any breaking changes.
- 💡Utilize Stripe's API version setting in your account dashboard and dynamically in your SDKs to manage transitions granularly and minimize disruption.
What this skill does
- •Synchronizes Stripe API version headers with client library configurations
- •Maps Stripe.js evergreen versions to corresponding stable API releases
- •Generates migration paths for breaking changes found in the Stripe API changelog
- •Configures language-specific SDK overrides for dynamic and strongly-typed environments
- •Validates backend response structures against updated API schemas
When not to use it
- ✕When you need to debug raw HTTP network issues unrelated to API versioning
- ✕When managing infrastructure-level secrets or Stripe dashboard settings not controlled via code
Example workflow
- Consult the Stripe API changelog for breaking changes between current and target versions
- Update server-side SDK packages to the latest stable release
- Modify code initialization to explicitly set the apiVersion parameter
- Run integration tests using the Stripe-Version header to verify backward compatibility
- Update frontend Stripe.js script tags or npm dependencies
- Deploy changes and monitor webhook logs for schema errors
Prerequisites
- –Active Stripe developer account
- –Access to the existing project codebase
- –Review of current API version via dashboard or existing configuration
Pitfalls & limitations
- !Assuming strongly-typed SDKs work with arbitrary API versions; they require specific SDK updates
- !Forgetting to update webhook handlers when API changes alter event object structures
- !Over-relying on account-level API defaults instead of local code-level overrides
FAQ
How it compares
Unlike manual documentation searching, this skill automates the cross-referencing of your current SDK versions against the Stripe changelog to pinpoint specific files needing updates.
📄 Full skill instructions — original source: stripe/ai
This skill covers upgrading Stripe API versions, server-side SDKs, Stripe.js, and mobile SDKs.
## Understanding Stripe API Versioning
Stripe uses date-based API versions (e.g.,
2025-12-15.clover, 2025-08-27.basil, 2024-12-18.acacia). Your account's API version determines request/response behavior.### Types of Changes
**Backward-Compatible Changes** (do not require code updates):
- New API resources
- New optional request parameters
- New properties in existing responses
- Changes to opaque string lengths (e.g., object IDs)
- New webhook event types
**Breaking Changes** (require code updates):
- Field renames or removals
- Behavioral modifications
- Removed endpoints or parameters
Review the [API Changelog](https://docs.stripe.com/changelog.md) for all changes between versions.
## Server-Side SDK Versioning
See [SDK Version Management](https://docs.stripe.com/sdks/set-version.md) for details.
### Dynamically-Typed Languages (Ruby, Python, PHP, Node.js)
These SDKs offer flexible version control:
**Global Configuration:**
import stripe
stripe.api_version = '2025-12-15.clover'Stripe.api_version = '2025-12-15.clover'const stripe = require('stripe')('sk_test_xxx', {
apiVersion: '2025-12-15.clover'
});**Per-Request Override:**
stripe.Customer.create(
email="[email protected]",
stripe_version='2025-12-15.clover'
)### Strongly-Typed Languages (Java, Go, .NET)
These use a fixed API version matching the SDK release date. Do not set a different API version for strongly-typed languages because response objects might not match the strong types in the SDK. Instead, update the SDK to target a new API version.
### Best Practice
Always specify the API version you're integrating against in your code instead of relying on your account's default API version:
// Good: Explicit version
const stripe = require('stripe')('sk_test_xxx', {
apiVersion: '2025-12-15.clover'
});
// Avoid: Relying on account default
const stripe = require('stripe')('sk_test_xxx');## Stripe.js Versioning
See [Stripe.js Versioning](https://docs.stripe.com/sdks/stripejs-versioning.md) for details.
Stripe.js uses an evergreen model with major releases (Acacia, Basil, Clover) on a biannual basis.
### Loading Versioned Stripe.js
**Via Script Tag:**
<script src="https://js.stripe.com/clover/stripe.js"></script>**Via npm:**
npm install @stripe/stripe-jsMajor npm versions correspond to specific Stripe.js versions.
### API Version Pairing
Each Stripe.js version automatically pairs with its corresponding API version. For instance:
- Clover Stripe.js uses
2025-12-15.clover API- Acacia Stripe.js uses
2024-12-18.acacia APIYou cannot override this association.
### Migrating from v3
1. Identify your current API version in code
2. Review the changelog for relevant changes
3. Consider gradually updating your API version before switching Stripe.js versions
4. Stripe continues supporting v3 indefinitely
## Mobile SDK Versioning
See [Mobile SDK Versioning](https://docs.stripe.com/sdks/mobile-sdk-versioning.md) for details.
### iOS and Android SDKs
Both platforms follow **semantic versioning** (MAJOR.MINOR.PATCH):
- **MAJOR**: Breaking API changes
- **MINOR**: New functionality (backward-compatible)
- **PATCH**: Bug fixes (backward-compatible)
New features and fixes release only on the latest major version. Upgrade regularly to access improvements.
### React Native SDK
Uses a different model (0.x.y schema):
- **Minor version changes** (x): Breaking changes AND new features
- **Patch updates** (y): Critical bug fixes only
### Backend Compatibility
All mobile SDKs work with any Stripe API version you use on your backend unless documentation specifies otherwise.
## Upgrade Checklist
1. Review the [API Changelog](https://docs.stripe.com/changelog.md) for changes between your current and target versions
2. Check [Upgrades Guide](https://docs.stripe.com/upgrades.md) for migration guidance
3. Update server-side SDK package version (e.g.,
npm update stripe, pip install --upgrade stripe)4. Update the
apiVersion parameter in your Stripe client initialization5. Test your integration against the new API version using the
Stripe-Version header6. Update webhook handlers to handle new event structures
7. Update Stripe.js script tag or npm package version if needed
8. Update mobile SDK versions in your package manager if needed
9. Store Stripe object IDs in databases that accommodate up to 255 characters (case-sensitive collation)
## Testing API Version Changes
Use the
Stripe-Version header to test your code against a new version without changing your default:curl https://api.stripe.com/v1/customers \
-u sk_test_xxx: \
-H "Stripe-Version: 2025-12-15.clover"Or in code:
const stripe = require('stripe')('sk_test_xxx', {
apiVersion: '2025-12-15.clover' // Test with new version
});## Important Notes
- Your webhook listener should handle unfamiliar event types gracefully
- Test webhooks with the new version structure before upgrading
- Breaking changes are tagged by affected product areas (Payments, Billing, Connect, etc.)
- Multiple API versions coexist simultaneously, enabling staged adoption
How to Use This Skill Unit
Option A: Project-Specific (Recommended)
- Click "Download" above
- In your project, create the directory:
.agent/skills/upgrade-stripe/ - Save the file as
SKILL.md - The agent will automatically discover the skill based on its description.
Option B: Global Installation (All Agents)
Save the file to these locations to make it available across all projects:
- Claude Code:
~/.claude/skills/stripe/ai/upgrade-stripe/SKILL.md - Cursor:
~/.cursor/skills/stripe/ai/upgrade-stripe/SKILL.md - Antigravity:
~/.gemini/antigravity/skills/stripe/ai/upgrade-stripe/SKILL.md
🚀 Install with CLI:npx skills add stripe/ai