Stripe integration templates with reusable code for Checkout, Payment Intents, and Subscriptions. Use when implementing Stripe payments, building checkout flows, handling subscriptions, or integrating payment processing.
View on GitHubFebruary 1, 2026
Select agents to install to:
npx add-skill https://github.com/vanman2024/ai-dev-marketplace/blob/main/plugins/payments/skills/stripe-patterns/SKILL.md -a claude-code --skill stripe-patternsInstallation paths:
.claude/skills/stripe-patterns/# Stripe Integration Patterns Comprehensive Stripe integration templates for FastAPI backends and Next.js frontends, including Checkout Sessions, Payment Intents, and Subscription billing. ## Use When - Implementing Stripe payment processing in applications - Building checkout flows for one-time or recurring payments - Integrating subscription billing systems - Setting up webhook handlers for payment events - Creating secure payment forms with Stripe Elements - Validating Stripe API configuration ## Security Requirements **CRITICAL: All templates follow strict security rules:** - All API keys use placeholders: `your_stripe_key_here` - Code reads from environment variables only - `.env.example` templates provided with placeholders - `.gitignore` protects secret files - Documentation explains how to obtain Stripe keys **NEVER hardcode actual Stripe API keys in any files!** ## Integration Patterns ### 1. Checkout Sessions (Redirect Flow) **Best for:** Quick integration, hosted payment pages, minimal frontend code **Flow:** 1. Create Checkout Session on backend with line items and success URL 2. Redirect customer to Stripe-hosted checkout page 3. Handle `checkout.session.completed` webhook for fulfillment **Use:** `scripts/setup-stripe-checkout.sh` and `templates/checkout_session.py` ### 2. Payment Intents (Custom UI) **Best for:** Custom payment forms, direct card collection, advanced UX control **Flow:** 1. Create PaymentIntent on backend when checkout begins 2. Pass client secret to frontend 3. Collect payment details with Stripe Elements 4. Confirm payment on client side 5. Monitor webhooks for payment success/failure **Use:** `scripts/setup-payment-intents.sh` and `templates/payment_intent.py` ### 3. Subscriptions (Recurring Billing) **Best for:** Recurring revenue, subscription services, membership access **Flow:** 1. Create or retrieve Customer object 2. Attach payment method to customer 3. Create Subscription with pricing and billing cycle 4.