Generated banner for Stripe Integration
Generated logo for Stripe Integration

Stripe Integration

Seth HobsonCommunityCreated by Seth Hobson

  • Skill
  • Tool integration
  • Business and productivity
  • MIT
  • No issues found

From the author

Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.
— the description by Seth Hobson

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a comprehensive guide to integrating Stripe payment processing into web and mobile applications. It covers the core architectural choices between Stripe-hosted Checkout Sessions and bespoke Payment Intents, along with essential patterns for managing subscriptions, customer records, and webhooks. The documentation emphasizes PCI compliance and provides practical implementation patterns for both backend logic and frontend UI integration.

What it does

  • Configures Stripe Checkout Sessions for hosted or embedded payment flows.
  • Implements subscription billing systems with products and recurring prices.
  • Manages customer records and stored payment methods.
  • Sets up webhook listeners to handle payment lifecycle events.
  • Provides patterns for bespoke UI integration using Stripe Elements.
  • Offers testing strategies using Stripe test mode and mock payment methods.

When to use it

  • Adding payment processing to a new or existing application.
  • Building recurring subscription or SaaS billing models.
  • Implementing secure, PCI-compliant checkout experiences.
  • Handling complex payment lifecycle events like refunds or disputes.
  • Developing marketplace applications requiring Stripe Connect.

Advantages

  • Reduces PCI compliance burden by leveraging Stripe-hosted components.
  • Supports diverse payment methods and Strong Customer Authentication (SCA).
  • Provides flexible integration options from simple redirects to custom UI.
  • Includes robust testing patterns for verifying payment flows.

Usage examples

“How do I create a basic subscription checkout session in Python?”
The agent provides a Python code snippet using stripe.checkout.Session.create, configuring line items, recurring intervals, and success/cancel URLs.
“Show me how to handle a successful payment via webhooks.”
The agent lists critical webhook events like payment_intent.succeeded and explains how to verify and process these events in your backend.
“What is the difference between Checkout Sessions and Payment Intents?”
The agent explains that Checkout Sessions are recommended for lower maintenance, while Payment Intents offer bespoke control for custom UI implementations.
“How can I test my payment flow without real money?”
The agent provides a list of Stripe test card numbers for various scenarios like success, decline, and 3D Secure, along with a testing pattern example.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/wshobson/stripe-integration/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip stripe-integration.zip -d .agents/skills

Documentation by Seth Hobson

Stripe Integration

Master Stripe payment processing integration for robust, PCI-compliant payment flows including checkout, subscriptions, webhooks, and refunds.

When to Use This Skill

  • 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 Sessions

  • Recommended for most integrations

  • Supports all UI paths:

    • Stripe-hosted checkout page

    • Embedded checkout form

    • Custom UI with Elements (Payment Element, Express Checkout Element) using ui_mode='custom'

  • Provides built-in checkout capabilities (line items, discounts, tax, shipping, address collection, saved payment methods, and checkout lifecycle events)

  • Lower integration and maintenance burden than Payment Intents

Payment Intents (Bespoke control)

  • You calculate the final amount with taxes, discounts, subscriptions, and currency conversion yourself.

  • More complex implementation and long-term maintenance burden

  • Requires Stripe.js for PCI compliance

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

import stripe

stripe.api_key = "sk_test_..."

# Create a checkout session
session = stripe.checkout.Session.create(
    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)

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Testing

# Use test mode keys
stripe.api_key = "sk_test_..."

# Test card numbers
TEST_CARDS = {
    'success': '4242424242424242',
    'declined': '4000000000000002',
    '3d_secure': '4000002500003155',
    'insufficient_funds': '4000000000009995'
}

def test_payment_flow():
    """Test complete payment flow."""
    # Create test customer
    customer = stripe.Customer.create(
        email="[email protected]"
    )

    # Create payment intent
    intent = stripe.PaymentIntent.create(
        amount=1000,
        automatic_payment_methods={
            'enabled': True
        },
        currency='usd',
        customer=customer.id
    )

    # Confirm with test card
    confirmed = stripe.PaymentIntent.confirm(
        intent.id,
        payment_method='pm_card_visa'  # Test payment method
    )

    assert confirmed.status == 'succeeded'

Files

SKILL.md

Stripe Integration

Master Stripe payment processing integration for robust, PCI-compliant payment flows including checkout, subscriptions, webhooks, and refunds.

When to Use This Skill

  • 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 Sessions

  • Recommended for most integrations

  • Supports all UI paths:

    • Stripe-hosted checkout page

    • Embedded checkout form

    • Custom UI with Elements (Payment Element, Express Checkout Element) using ui_mode='custom'

  • Provides built-in checkout capabilities (line items, discounts, tax, shipping, address collection, saved payment methods, and checkout lifecycle events)

  • Lower integration and maintenance burden than Payment Intents

Payment Intents (Bespoke control)

  • You calculate the final amount with taxes, discounts, subscriptions, and currency conversion yourself.

  • More complex implementation and long-term maintenance burden

  • Requires Stripe.js for PCI compliance

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

import stripe

stripe.api_key = "sk_test_..."

# Create a checkout session
session = stripe.checkout.Session.create(
    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)

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Testing

# Use test mode keys
stripe.api_key = "sk_test_..."

# Test card numbers
TEST_CARDS = {
    'success': '4242424242424242',
    'declined': '4000000000000002',
    '3d_secure': '4000002500003155',
    'insufficient_funds': '4000000000009995'
}

def test_payment_flow():
    """Test complete payment flow."""
    # Create test customer
    customer = stripe.Customer.create(
        email="[email protected]"
    )

    # Create payment intent
    intent = stripe.PaymentIntent.create(
        amount=1000,
        automatic_payment_methods={
            'enabled': True
        },
        currency='usd',
        customer=customer.id
    )

    # Confirm with test card
    confirmed = stripe.PaymentIntent.confirm(
        intent.id,
        payment_method='pm_card_visa'  # Test payment method
    )

    assert confirmed.status == 'succeeded'

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an API key, Needs Python

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Seth Hobson
Publisher
Seth Hobson (Community)
Source
wshobson/agents · plugins/payment-processing/skills/stripe-integration · commit 4bde316
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Seth Hobson or Seth Hobson.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download stripe-integration.zip