stripe-integration
Implement Stripe payments, webhooks, and subscriptions correctly first time
When & Why to Use This Skill
This Claude skill streamlines the integration of Stripe's payment infrastructure into your applications, ensuring a secure and efficient setup of payment flows, webhooks, and subscription models. By following industry best practices, it helps developers implement complex features like checkout sessions, SCA/3DS handling, and automated billing cycles correctly the first time, significantly reducing development overhead and potential security risks.
Use Cases
- SaaS Subscription Setup: Quickly configure monthly or annual subscription plans with automated lifecycle management, including trials and upgrades.
- Secure E-commerce Checkout: Implement Stripe Checkout sessions that handle secure payment intents and international authentication standards like 3DS.
- Real-time Webhook Automation: Set up reliable listeners for critical events such as 'invoice.paid' or 'customer.subscription.deleted' to keep your backend database in sync.
- Financial Security Compliance: Ensure best practices for API key management, server-side validation, and signature verification to protect sensitive transaction data.
| name | stripe-integration |
|---|---|
| description | Implement Stripe payments, webhooks, and subscriptions correctly first time |
Stripe Integration
Consistent Stripe implementation following best practices.
Key Components
Payment Flows
- Checkout sessions
- Payment intents
- SCA/3DS handling
Webhooks (Critical)
- checkout.session.completed
- customer.subscription.created/updated/deleted
- invoice.paid/payment_failed
Subscriptions
- Products and prices
- Lifecycle management
- Trial periods
Security Checklist
- API keys as environment variables
- Webhook signatures validated
- Server-side amount calculations
- HTTPS for all requests
Usage
"Use Stripe integration skill to add monthly/annual subscriptions"
Webhook Testing
stripe listen --forward-to localhost:3000/api/webhooks/stripe