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.
/plugin marketplace add vanman2024/ai-dev-marketplace/plugin install payments@ai-dev-marketplaceThis skill is limited to using the following tools:
examples/fastapi-checkout-example.pyexamples/nextjs-payment-form-example.tsxexamples/subscription-flow-example.pyscripts/setup-payment-intents.shscripts/setup-stripe-checkout.shscripts/setup-subscriptions.shscripts/validate-stripe-config.shtemplates/checkout_page.tsxtemplates/checkout_session.pytemplates/payment_intent.pytemplates/stripe_elements.tsxtemplates/subscription.pyComprehensive Stripe integration templates for FastAPI backends and Next.js frontends, including Checkout Sessions, Payment Intents, and Subscription billing.
CRITICAL: All templates follow strict security rules:
your_stripe_key_here.env.example templates provided with placeholders.gitignore protects secret filesNEVER hardcode actual Stripe API keys in any files!
Best for: Quick integration, hosted payment pages, minimal frontend code
Flow:
checkout.session.completed webhook for fulfillmentUse: scripts/setup-stripe-checkout.sh and templates/checkout_session.py
Best for: Custom payment forms, direct card collection, advanced UX control
Flow:
Use: scripts/setup-payment-intents.sh and templates/payment_intent.py
Best for: Recurring revenue, subscription services, membership access
Flow:
Use: scripts/setup-subscriptions.sh and templates/subscription.py
Creates complete Checkout Session implementation with FastAPI endpoint, webhook handler, and success/cancel pages.
bash scripts/setup-stripe-checkout.sh
Sets up Payment Intent workflow with client secret handling, Stripe Elements integration, and payment confirmation.
bash scripts/setup-payment-intents.sh
Implements subscription billing with customer management, subscription creation, and lifecycle webhook handlers.
bash scripts/setup-subscriptions.sh
Validates Stripe configuration including API keys, webhook secrets, environment setup, and .gitignore protection.
bash scripts/validate-stripe-config.sh
checkout_session.py - Complete Checkout Session endpoint
payment_intent.py - Payment Intent workflow
subscription.py - Subscription management
stripe_elements.tsx - Stripe Elements component
checkout_page.tsx - Complete checkout page
Complete working example with:
Full payment form implementation:
End-to-end subscription workflow:
Test Mode (for development):
4242 4242 4242 4242Live Mode (for production):
Create .env file (use .env.example as template):
# .env (NEVER commit this file)
STRIPE_SECRET_KEY=your_stripe_secret_key_here
STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key_here
STRIPE_WEBHOOK_SECRET=your_webhook_secret_here
Add to .gitignore:
.env
.env.local
.env.development
.env.production
!.env.example
Backend (Python):
pip install stripe fastapi uvicorn python-dotenv
Frontend (Next.js):
npm install @stripe/stripe-js @stripe/react-stripe-js
Local Development:
stripe loginstripe listen --forward-to localhost:8000/webhook.envProduction:
default_incomplete payment behaviorUse Checkout Sessions for simplicity or Payment Intents for custom UI.
Use Subscriptions with automatic invoice generation.
Create subscription with trial_period_days parameter.
Use Subscriptions with metered billing and usage reports.
Store payment methods on Customer object and set default.
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.