
Stripe Integration
Wire Stripe checkout, subscriptions, webhooks, and refunds into a solo SaaS or app with PCI-aware patterns.
Overview
Stripe Integration is an agent skill most often used in Build (also Validate, Ship) that guides PCI-aware Stripe checkout, subscriptions, webhooks, and refunds.
Install
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill stripe-integrationWhat is this skill?
- Covers hosted Checkout Session versus custom Payment Intents with Stripe.js
- Documents subscriptions, one-time charges, refunds, disputes, and saved payment methods
- Includes SCA guidance for European payments and Stripe Connect for marketplaces
- Points to resources/implementation-playbook.md for step-by-step implementation detail
- Explicit do-not-use guardrails when the task is outside payments
Adoption & trust: 711 installs on skills.sh; 40.1k GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need real money flows in your app but Stripe’s surface area—intents, webhooks, SCA, Connect—feels easy to get wrong under PCI pressure.
Who is it for?
Solo founders adding first paid tiers, subscriptions, or marketplace payouts with Stripe.
Skip if: Non-payment tasks, or teams that need a different processor with no Stripe scope.
When should I use this skill?
Implementing payment processing, subscription billing, refunds, payment methods, SCA, or Stripe Connect marketplaces.
What do I get? / Deliverables
You follow a structured Stripe integration playbook with the right flow choice, webhook handling, and compliance checks before going live.
- Chosen Stripe flow (Checkout vs Payment Intents)
- Webhook and refund handling checklist
- Verification steps aligned to implementation playbook
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Payment integration is canonical on the Build integrations shelf where backends connect to billing providers. Integrations captures third-party payment flows, webhooks, and Connect—not frontend polish alone.
Where it fits
Sketch subscription tiers and test a Stripe Checkout prototype before committing to a custom billing UI.
Implement Payment Intents plus Stripe.js while keeping card data off your server.
Verify webhook signatures, refund paths, and SCA behavior before launch traffic hits production.
How it compares
Use instead of guessing Payment Intent versus Checkout; this is procedural integration guidance, not a hosted billing MCP.
Common Questions / FAQ
Who is stripe-integration for?
Solo and indie builders implementing Stripe in web or mobile backends for checkout, billing, and payout flows.
When should I use stripe-integration?
Use it in Build (integrations) for payment code, Validate (pricing) when proving paid prototypes, and Ship (security, launch) when verifying webhooks and SCA before customers pay.
Is stripe-integration safe to install?
Review the Security Audits panel on this Prism page; never paste live secret keys into chat—use env vars and follow your agent’s secret-handling rules.
SKILL.md
READMESKILL.md - Stripe Integration
# Stripe Integration Master Stripe payment processing integration for robust, PCI-compliant payment flows including checkout, subscriptions, webhooks, and refunds. ## Do not use this skill when - The task is unrelated to stripe integration - You need a different domain or tool outside this scope ## Instructions - Clarify goals, constraints, and required inputs. - Apply relevant best practices and validate outcomes. - Provide actionable steps and verification. - If detailed examples are required, open `resources/implementation-playbook.md`. ## Use this skill when - Implementing payment processing in web/mobile applications - Setting up subscription billing systems - Handling one-time payments and recurring charges - Processing refunds and disputes - Managing customer payment methods - Implementing SCA (Strong Customer Authentication) for European payments - Building marketplace payment flows with Stripe Connect ## Core Concepts ### 1. Payment Flows **Checkout Session (Hosted)** - Stripe-hosted payment page - Minimal PCI compliance burden - Fastest implementation - Supports one-time and recurring payments **Payment Intents (Custom UI)** - Full control over payment UI - Requires Stripe.js for PCI compliance - More complex implementation - Better customization options **Setup Intents (Save Payment Methods)** - Collect payment method without charging - Used for subscriptions and future payments - Requires customer confirmation ### 2. Webhooks **Critical Events:** - `payment_intent.succeeded`: Payment completed - `payment_intent.payment_failed`: Payment failed - `customer.subscription.updated`: Subscription changed - `customer.subscription.deleted`: Subscription canceled - `charge.refunded`: Refund processed - `invoice.payment_succeeded`: Subscription payment successful ### 3. Subscriptions **Components:** - **Product**: What you're selling - **Price**: How much and how often - **Subscription**: Customer's recurring payment - **Invoice**: Generated for each billing cycle ### 4. Customer Management - Create and manage customer records - Store multiple payment methods - Track customer metadata - Manage billing details ## Quick Start ```python import stripe stripe.api_key = "sk_test_..." # Create a checkout session session = stripe.checkout.Session.create( payment_method_types=['card'], line_items=[{ 'price_data': { 'currency': 'usd', 'product_data': { 'name': 'Premium Subscription', }, 'unit_amount': 2000, # $20.00 'recurring': { 'interval': 'month', }, }, 'quantity': 1, }], mode='subscription', success_url='https://yourdomain.com/success?session_id={CHECKOUT_SESSION_ID}', cancel_url='https://yourdomain.com/cancel', ) # Redirect user to session.url print(session.url) ``` ## Payment Implementation Patterns ### Pattern 1: One-Time Payment (Hosted Checkout) ```python def create_checkout_session(amount, currency='usd'): """Create a one-time payment checkout session.""" try: session = stripe.checkout.Session.create( payment_method_types=['card'], line_items=[{ 'price_data': { 'currency': currency, 'product_data': { 'name': 'Purchase', 'images': ['https://example.com/product.jpg'], }, 'unit_amount': amount, # Amount in cents }, 'quantity': 1, }], mode='payment', success_url='https://yourdomain.com/success?session_id={CHECKOUT_SESSION_ID}', cancel_url='https://yourdo