Implement Stripe payment processing for robust

Stripe integration

by wshobson · MIT license · ★ 39,857 on GitHub · updated Sep 21

Stripe integration cover

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.

---
name: stripe-integration
description: 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.
---

# 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

Overview

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

Manual install (npx, ZIP)
Claude Codenpx skills add wshobson/agents --skill stripe-integration -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \ | tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/payment-processing/skills/stripe-integration
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/30a6fc7602d922334dd3/stripe-integration.zip" -OutFile "$env:TEMP\stripe-integration.zip"; Expand-Archive "$env:TEMP\stripe-integration.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md4.1 KB
  • references/1 file · 10.1 KB
Read the files here
wshobson/4236bb92 files
SKILL.md
Show the full text147 lines

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'
1---
2name: stripe-integration
3description: 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.
4---
5 
6# Stripe Integration
7 
8Master Stripe payment processing integration for robust, PCI-compliant payment flows including checkout, subscriptions, webhooks, and refunds.
9 
10## When to Use This Skill
11 
12- Implementing payment processing in web/mobile applications
13- Setting up subscription billing systems
14- Handling one-time payments and recurring charges
15- Processing refunds and disputes
16- Managing customer payment methods
17- Implementing SCA (Strong Customer Authentication) for European payments
18- Building marketplace payment flows with Stripe Connect
19 
20## Core Concepts
21 
22### 1. Payment Flows
23 
24**Checkout Sessions**
25 
26- Recommended for most integrations
27- Supports all UI paths:
28 - Stripe-hosted checkout page
29 - Embedded checkout form
30 - Custom UI with Elements (Payment Element, Express Checkout Element) using `ui_mode='custom'`
31- Provides built-in checkout capabilities (line items, discounts, tax, shipping, address collection, saved payment methods, and checkout lifecycle events)
32- Lower integration and maintenance burden than Payment Intents
33 
34**Payment Intents (Bespoke control)**
35 
36- You calculate the final amount with taxes, discounts, subscriptions, and currency conversion yourself.
37- More complex implementation and long-term maintenance burden
38- Requires Stripe.js for PCI compliance
39 
40**Setup Intents (Save Payment Methods)**
41 
42- Collect payment method without charging
43- Used for subscriptions and future payments
44- Requires customer confirmation
45 
46### 2. Webhooks
47 
48**Critical Events:**
49 
50- `payment_intent.succeeded`: Payment completed
51- `payment_intent.payment_failed`: Payment failed
52- `customer.subscription.updated`: Subscription changed
53- `customer.subscription.deleted`: Subscription canceled
54- `charge.refunded`: Refund processed
55- `invoice.payment_succeeded`: Subscription payment successful
56 
57### 3. Subscriptions
58 
59**Components:**
60 
61- **Product**: What you're selling
62- **Price**: How much and how often
63- **Subscription**: Customer's recurring payment
64- **Invoice**: Generated for each billing cycle
65 
66### 4. Customer Management
67 
68- Create and manage customer records
69- Store multiple payment methods
70- Track customer metadata
71- Manage billing details
72 
73## Quick Start
74 
75```python
76import stripe
77 
78stripe.api_key = "sk_test_..."
79 
80# Create a checkout session
81session = stripe.checkout.Session.create(
82 line_items=[{
83 'price_data': {
84 'currency': 'usd',
85 'product_data': {
86 'name': 'Premium Subscription',
87 },
88 'unit_amount': 2000, # $20.00
89 'recurring': {
90 'interval': 'month',
91 },
92 },
93 'quantity': 1,
94 }],
95 mode='subscription',
96 success_url='https://yourdomain.com/success?session_id={CHECKOUT_SESSION_ID}',
97 cancel_url='https://yourdomain.com/cancel'
98)
99 
100# Redirect user to session.url
101print(session.url)
102```
103 
104## Detailed patterns and worked examples
105 
106Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.
107 
108## Testing
109 
110```python
111# Use test mode keys
112stripe.api_key = "sk_test_..."
113 
114# Test card numbers
115TEST_CARDS = {
116 'success': '4242424242424242',
117 'declined': '4000000000000002',
118 '3d_secure': '4000002500003155',
119 'insufficient_funds': '4000000000009995'
120}
121 
122def test_payment_flow():
123 """Test complete payment flow."""
124 # Create test customer
125 customer = stripe.Customer.create(
126 email="[email protected]"
127 )
128 
129 # Create payment intent
130 intent = stripe.PaymentIntent.create(
131 amount=1000,
132 automatic_payment_methods={
133 'enabled': True
134 },
135 currency='usd',
136 customer=customer.id
137 )
138 
139 # Confirm with test card
140 confirmed = stripe.PaymentIntent.confirm(
141 intent.id,
142 payment_method='pm_card_visa' # Test payment method
143 )
144 
145 assert confirmed.status == 'succeeded'
146```
147 
View all files on GitHub →

Details

Updated
Sep 21, 2026
License
MIT
Stars on the repo
★ 39,857
Checked
Source
wshobson/agents ↗
Creator
wshobson · 179 listings
View creator

Similar skills

See all →
SkillAI-powered financial analysis suiteAI Finance Opsericosiu/ai-marketing-skills · by ericosiuAI-powered financial analysis suite. Generates executive CFO briefings from QuickBooks exports (P&L, Balance Sheet, General Ledger, Cash Flow, etc.) with anomaly detection, burn rate, runway analysis, and scenario modeling. Also estimates codebase development costs with organizational overhead and AI ROI analysis. Triggers on: 'CFO briefing', 'financial analysis', 'cost briefing', 'expense review', 'runway analysis', 'burn rate', 'cost estimate', 'how much would this cost to build', 'development cost', 'Claude ROI'.★ 3.6k GitHub starsPromptAct as a Stripe payment setup assistantStripe payment builderf/prompts.chat · by Hector VerdugoAct as a Stripe payment setup assistant. Configure payment options with variables for payment type and amount.New listingMCPExpert bookkeeper and controller specializing in day-to-day📒 Bookkeeper & Controller Agentmsitarzewski/agency-agents · by msitarzewskiExpert bookkeeper and controller specializing in day-to-day accounting operations, financial reconciliations, month-end close processes, and internal controls. Ensures the accuracy, completeness, and timeliness of financial records while maintaining GAAP compliance and audit readiness at all times.★ 154k GitHub starsMCPIntegrate Stripe, PayPal, and payment processorsPayment integrationwshobson/agents · by wshobsonIntegrate Stripe, PayPal, and payment processors. Handles checkout flows, subscriptions, webhooks, and PCI compliance. Use PROACTIVELY when implementing payments, billing, or subscription features.★ 39.9k GitHub starsSkillAutomatically organizes invoices and receipts for taxInvoice organizerdavila7/claude-code-templates · by davila7Automatically organizes invoices and receipts for tax preparation by reading messy files, extracting key information, renaming them consistently, and sorting them into logical folders. Turns hours of manual bookkeeping into minutes of automated organization.★ 32.3k GitHub starsMCPPayment systems integration specialistPayment integrationdavila7/claude-code-templates · by davila7Payment systems integration specialist. Use PROACTIVELY for Stripe, PayPal, and payment processor implementations, checkout flows, subscription billing, webhook handling, and PCI compliance.★ 32.3k GitHub stars

More from wshobson

SkillMaster C/.NET backend development patterns for buildingwshobson/agents · by wshobsonMaster C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.★ 39.9k GitHub starsSkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliancewshobson/agents · by wshobsonImplement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.★ 39.9k GitHub starsSkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Designwshobson/agents · by wshobsonMaster Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.★ 39.9k GitHub starsSkillMigrate from AngularJS to Angular using hybrid modeAngular migrationwshobson/agents · by wshobsonMigrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code.★ 39.9k GitHub starsSkillUnderstand anti-reversing, obfuscationAnti reversing techniqueswshobson/agents · by wshobsonUnderstand anti-reversing, obfuscation, and protection techniques encountered during software analysis. Use this skill when analyzing malware evasion techniques, when implementing anti-debugging protections for CTF challenges, when reverse engineering packed binaries, or when building security research tools that need to detect virtualized environments.★ 39.9k GitHub starsSkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patternswshobson/agents · by wshobsonBuild production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.★ 39.9k GitHub stars