stripe-integration — Claude Code skill: payments and install
This skill covers Stripe Checkout, subscriptions, webhooks, refunds, and saved payment methods. Use it when a project needs one-time or recurring payments.
/plugin marketplace add wshobson/agents
/plugin install payment-processing@claude-code-workflowsWhat stripe-integration does
The skill lays out Stripe integration for one-time charges and recurring billing. It covers Checkout Sessions, Payment Intents, and Setup Intents, along with customer records, payment methods, refunds, disputes, and SCA. Checkout Sessions support Stripe-hosted checkout, embedded checkout, and custom interfaces built with Elements.
The webhook section maps payment success and failure, subscription changes and cancellations, refunds, and successful invoice payments. The examples use Python, test keys such as sk_test_..., and test cards for successful payments, declines, 3D Secure, and insufficient funds. Payment Intents require Stripe.js for the PCI-compliant flow, so that dependency matters before choosing the bespoke path.
Worked patterns live in references/details.md. The skill also covers products, prices, subscriptions, invoices, customer metadata, and Stripe Connect marketplace flows.
What it helps with
- add Stripe Checkout for a one-time payment
- build recurring subscription billing
- route webhook events for payments and refunds
- test declined and 3D Secure payment flows
Example prompts for the agent
- Set up a Stripe subscription checkout in `app.py`, use `mode='subscription'`, and return the created `session.url` to the customer.
- Add handlers for `payment_intent.succeeded`, `payment_intent.payment_failed`, and `charge.refunded` to the payment server.
- Run the payment flow in test mode with `sk_test_...` and the cards from `TEST_CARDS`.
How to install stripe-integration
1Plugin marketplace
/plugin marketplace add wshobson/agents/plugin install payment-processing@claude-code-workflowsThis installs the whole payment-processing plugin with all its skills
2Skills CLI (Vercel)
npx skills add wshobson/agents --skill stripe-integration -a claude-code3Manually: put the files in place
~/.claude/skills/stripe-integration/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/stripe-integration/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill stripe-integration -a codex2Manually: put the files in place
.agents/skills/stripe-integration/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshobson/agents --skill stripe-integration -a cursor2Manually: put the files in place
.cursor/skills/stripe-integration/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshobson/agents stripe-integration2Manually: put the files in place
.github/skills/stripe-integration/SKILL.mdPlatform CLI
gemini skills install https://github.com/wshobson/agents --path plugins/payment-processing/skills/stripe-integrationManually: put the files in place
.devin/skills/stripe-integration/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set213
The whole set →Similar
Questions about stripe-integration
How do I install stripe-integration in Claude Code?
Run /plugin marketplace add wshobson/agents, then run /plugin install payment-processing@claude-code-workflows.
What does stripe-integration do?
It guides Stripe payment integration for Checkout, subscriptions, webhooks, refunds, customer records, and saved payment methods. It also includes Python testing patterns and test card scenarios.
Which platforms support stripe-integration?
The skill is intended for Claude Code, Codex, and Cursor. Payment Intents require Stripe.js for the PCI-compliant flow.
Source text
SKILL.md · MIT
---
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
## 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
```python
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
```python
# 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'
```
© Seth Hobson · MIT · wshobson/agents