From payment-processing
Implements Stripe payment processing including checkout sessions, subscriptions, webhooks, and refunds. Use when integrating Stripe payments or building subscription systems.
How this skill is triggered — by the user, by Claude, or both
Slash command
/payment-processing:stripe-integrationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Master Stripe payment processing integration for robust, PCI-compliant payment flows including checkout, subscriptions, webhooks, and refunds.
Master Stripe payment processing integration for robust, PCI-compliant payment flows including checkout, subscriptions, webhooks, and refunds.
Checkout Sessions
ui_mode='custom'Payment Intents (Bespoke control)
Setup Intents (Save Payment Methods)
Critical Events:
payment_intent.succeeded: Payment completedpayment_intent.payment_failed: Payment failedcustomer.subscription.updated: Subscription changedcustomer.subscription.deleted: Subscription canceledcharge.refunded: Refund processedinvoice.payment_succeeded: Subscription payment successfulComponents:
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 pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
# 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'
npx claudepluginhub wshobson/agents --plugin payment-processingMaster Stripe payment processing integration for PCI-compliant payment flows including checkout, subscriptions, webhooks, and refunds.
Builds Stripe payment integrations with Checkout Sessions, Payment Intents, subscriptions, billing, refunds. Useful for payments, checkout, subscriptions, billing, invoices, Stripe.
Integrates Stripe payments into web apps using Checkout Sessions, Payment Intents, subscriptions, webhooks, customer portal, and pricing pages. Uses Stripe npm package.