upgrade-stripe
Guide for upgrading Stripe API versions, SDKs, and mobile libraries. Use when updating Stripe integrations to newer versions.
Works with
---
name: upgrade-stripe
description: Guide for upgrading Stripe API versions, SDKs, and mobile libraries. Use when updating Stripe integrations to newer versions.
license: MIT
---
# Upgrade Stripe
Guide for upgrading Stripe API versions, server-side SDKs, Stripe.js, and mobile SDKs.
## When to Use This Skill
- Upgrading Stripe API versions
- Updating Stripe SDKs (server-side, web, mobile)
- Migrating between Stripe.js versions
- Planning Stripe integration maintenance
- Understanding Stripe versioning strategy
- Testing API version changes
## Understanding Stripe API Versioning
Stripe uses **date-based API versions** (e.g., `2025-12-15.clover`, `2025-08-27.basil`, `2024-12-18.acacia`).
### Types of Changes
**Backward-Compatible** (no code changes needed):
- New API resources and endpoints
- New optional request parameters
- New properties in responses
- Changes to opaque string lengths
- New webhook event types
**Breaking Changes** (require code updates):
- Field renames or removals
- Behavioral modifications
- Removed endpoints or parameters
**Always review:** [API Changelog](https://docs.stripe.com/changelog.md)
## Server-Side SDK Versioning
### Dynamically-Typed Languages (Python, Node.js, Ruby, PHP)
**Global Configuration:**
```python
import stripe
stripe.api_version = '2025-12-15.clover'
```
```javascript
const stripe = require('stripe')('sk_test_xxx', {
apiVersion: '2025-12-15.clover'
});
```
**Per-Request Override:**
```python
stripe.Customer.create(
email="customer@example.com",
stripe_version='2025-12-15.clover'
)
```
### Strongly-Typed Languages (Java, Go, .NET)
- Use fixed API version matching SDK release date
- **Do not** set different API version - types won't match
- Update SDK version to target new API version
### Best Practice
**Always specify API version explicitly:**
```javascript
// ✅ 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
Uses **evergreen model** with major releases (Acacia, Basil, Clover) biannually.
### Loading Versioned Stripe.js
**Via Script Tag:**
```html
<script src="https://js.stripe.com/clover/stripe.js"></script>
```
**Via npm:**
```bash
npm install @stripe/stripe-js
```
### API Version Pairing
Each Stripe.js version automatically pairs with corresponding API version:
- **Clover** → `2025-12-15.clover`
- **Basil** → `2025-08-27.basil`
- **Acacia** → `2024-12-18.acacia`
**Cannot override this association.**
### Migrating from v3
1. Identify current API version
2. Review changelog for relevant changes
3. Consider gradual API version updates first
4. Stripe supports v3 indefinitely
## Mobile SDK Versioning
### iOS and Android SDKs
Follow **semantic versioning** (MAJOR.MINOR.PATCH):
- **MAJOR**: Breaking API changes
- **MINOR**: New features (backward-compatible)
- **PATCH**: Bug fixes (backward-compatible)
**Upgrade regularly** - new features release only on latest major version.
### React Native SDK
Uses **0.x.y schema**:
- **Minor version (x)**: Breaking changes + new features
- **Patch (y)**: Critical bug fixes only
### Backend Compatibility
All mobile SDKs work with any Stripe API version unless documented otherwise.
## Upgrade Checklist
1. **Review Changelog**: [API Changelog](https://docs.stripe.com/changelog.md)
2. **Check Migration Guide**: [Upgrades Guide](https://docs.stripe.com/upgrades.md)
3. **Update Server SDK**: `npm update stripe`, `pip install --upgrade stripe`
4. **Update API Version**: Set `apiVersion` parameter explicitly
5. **Test Integration**: Use `Stripe-Version` header for testing
6. **Update Webhooks**: Handle new event structures
7. **Update Stripe.js**: Update script tag or npm package
8. **Update Mobile SDKs**: Update via package manager
9. **Database Prep**: Ensure string fields accommodate 255 characters
## Testing API Changes
**Test without changing defaults using `Stripe-Version` header:**
```bash
curl https://api.stripe.com/v1/customers \
-u sk_test_xxx: \
-H "Stripe-Version: 2025-12-15.clover"
```
**Or in code:**
```javascript
const stripe = require('stripe')('sk_test_xxx', {
apiVersion: '2025-12-15.clover' // Test mode
});
```
## Important Considerations
- **Webhook Compatibility**: Handle unfamiliar event types gracefully
- **Testing**: Test webhooks with new version before upgrading
- **Staged Adoption**: Multiple API versions coexist simultaneously
- **Breaking Changes**: Tagged by product areas (Payments, Billing, Connect)
- **Database Schema**: Store Stripe IDs in 255-character fields with case-sensitive collation
## Version Upgrade Workflow
### 1. Planning Phase
- Identify target API version
- Review changelog for breaking changes
- Plan migration timeline
### 2. Development Phase
- Update SDK versions
- Modify code for breaking changes
- Update webhook handlers
- Update test suites
### 3. Testing Phase
- Use Stripe-Version header testing
- Test all payment flows
- Verify webhook handling
- Test error scenarios
### 4. Deployment Phase
- Gradual rollout if possible
- Monitor for issues
- Have rollback plan readyMore API Design skills
lark-event
larksuite/cli
Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Approval status changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` / `--timeout` bounded runs and a stderr ready-marker contract — designed for AI agents running as subprocesses.
lark-contact
larksuite/cli
飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名,以及按关键词搜索当前用户可见的机器人 / 智能体(agent)。当用户提到一个名字要下一步发消息 / 排日程,或拿到 open_id 想查具体信息时使用。不负责部门树遍历、按部门列员工、组织架构图,这类需求走原生 OpenAPI。
lark-openapi-explorer
larksuite/cli
飞书/Lark 原生 OpenAPI 探索:从官方文档库中挖掘未经 CLI 封装的原生 OpenAPI 接口。当用户的需求无法被现有 lark-* skill 或 lark-cli 已注册命令满足,需要查找并调用原生飞书 OpenAPI 时使用。

