New to Claude Skills? Learn how to install them →

wshobson on GitHub

Stripe Integration

Free

Seamlessly implement Stripe payment processing.

by wshobson38.7k stars on wshobson/agents
1 views
Updated Jul 18, 2026
Get this skill

Free · Opens the source repo

What Stripe Integration does

The Stripe Integration skill provides a comprehensive solution for implementing payment processing in web and mobile applications. It supports various payment flows, including one-time payments, subscriptions, and refunds, ensuring compliance with PCI standards. This skill is ideal for developers looking to streamline the integration of Stripe's payment services into their applications, allowing for secure and efficient handling of customer transactions.

With features such as checkout sessions, payment intents, and setup intents, users can customize their payment processes according to their needs. The skill facilitates the creation of checkout sessions that can be embedded directly into applications or hosted on Stripe's platform, providing flexibility in user experience. Additionally, it supports webhooks for critical payment events, ensuring developers can respond to changes in payment status and manage subscriptions effectively.

For those managing recurring payments, the skill simplifies the creation and management of subscription billing systems, including handling customer records and payment methods. The built-in support for Strong Customer Authentication (SCA) ensures compliance with European regulations, making it a robust choice for developers targeting international markets. The included testing features allow developers to validate payment flows using test card numbers, ensuring reliability before going live.

Overall, this skill is a valuable asset for developers and designers who need to implement secure and efficient payment processing solutions in their applications. Its detailed documentation and examples make it accessible for users at various skill levels, from beginners to experienced developers.

When to use it

Use this skill when building applications that require payment processing, especially for subscriptions and secure checkouts.

When not to use it

This skill may not be suitable for applications that do not require payment processing or for those needing highly customized payment solutions beyond what Stripe offers.

What you can build with it

Integrating Payments in E-commerce

Developers can use this skill to implement secure payment processing in e-commerce applications, enabling customers to make purchases seamlessly.

Building Subscription Services

This skill is ideal for creating subscription-based services, allowing developers to manage recurring payments and customer subscriptions effectively.

Handling Refunds and Disputes

Utilize this skill to manage refunds and disputes efficiently, ensuring customer satisfaction and compliance with payment regulations.

How to install Stripe Integration

View source

1. Install with the skills CLI

npx skills add wshobson/agents/stripe-integration --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by wshobson

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="test@example.com"
    )

    # 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'

Frequently asked questions about Stripe Integration

Similar skills