Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/wshobson-stripe-integration/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 145% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -33% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 34% | 0% |
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:
pythonimport 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.
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="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'
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 7,446 | 6,301 | -15% | 1 | 1 | 0% | 1,730 | 2,313 | +34% | 0 | 0 | — |
case-02 | fail→pass | 63,291 | 3,397 | -95% | 1 | 1 | 0% | 675 | 1,652 | +145% | 0 | 0 | — |
case-03 | pass→pass | 13,597 | 3,189 | -77% | 1 | 1 | 0% | 1,640 | 1,581 | -4% | 0 | 0 | — |
case-04 | pass→pass | 7,344 | 5,063 | -31% | 1 | 1 | 0% | 1,780 | 2,133 | +20% | 0 | 0 | — |
case-05 | pass→pass | 7,395 | 3,774 | -49% | 1 | 1 | 0% | 1,400 | 1,652 | +18% | 0 | 0 | — |
case-06 | pass→pass | 6,218 | 1,436 | -77% | 1 | 1 | 0% | 1,109 | 1,176 | +6% | 0 | 0 | — |
case-07 | pass→pass | 2,749 | 2,247 | -18% | 1 | 1 | 0% | 485 | 1,400 | +189% | 0 | 0 | — |
case-08 | pass→pass | 3,061 | 2,892 | -6% | 1 | 1 | 0% | 373 | 1,443 | +287% | 0 | 0 | — |
case-09 | pass→pass | 2,159 | 1,643 | -24% | 1 | 1 | 0% | 344 | 1,245 | +262% | 0 | 0 | — |
case-10 | pass→pass | 5,571 | 2,162 | -61% | 1 | 1 | 0% | 1,263 | 1,356 | +7% | 0 | 0 | — |
case-11 | pass→pass | 6,853 | 2,207 | -68% | 1 | 1 | 0% | 1,530 | 1,388 | -9% | 0 | 0 | — |
case-12 | fail→pass | 8,270 | 3,064 | -63% | 1 | 1 | 0% | 1,758 | 1,590 | -10% | 0 | 0 | — |
case-13 | fail→pass | 9,877 | 1,872 | -81% | 1 | 1 | 0% | 2,058 | 1,369 | -33% | 0 | 0 | — |
case-14 | pass→pass | 5,281 | 4,347 | -18% | 1 | 1 | 0% | 1,093 | 1,802 | +65% | 0 | 0 | — |
case-15 | pass→pass | 5,189 | 2,011 | -61% | 1 | 1 | 0% | 1,013 | 1,264 | +25% | 0 | 0 | — |
case-16 | pass→pass | 4,271 | 2,328 | -45% | 1 | 1 | 0% | 905 | 1,290 | +43% | 0 | 0 | — |
case-17 | pass→pass | 13,426 | 12,782 | -5% | 1 | 1 | 0% | 2,712 | 3,226 | +19% | 0 | 0 | — |
case-18 | fail→pass | 10,994 | 8,500 | -23% | 1 | 1 | 0% | 2,118 | 2,591 | +22% | 0 | 0 | — |
case-19 | pass→pass | 6,205 | 6,353 | +2% | 1 | 1 | 0% | 1,330 | 2,154 | +62% | 0 | 0 | — |
case-20 | pass→pass | 7,038 | 7,127 | +1% | 1 | 1 | 0% | 1,650 | 2,637 | +60% | 0 | 0 | — |
case-21 | pass→pass | 9,649 | 7,743 | -20% | 1 | 1 | 0% | 1,975 | 2,726 | +38% | 0 | 0 | — |
case-22 | pass→pass | 10,524 | 71,389 | +578% | 1 | 1 | 0% | 2,314 | 3,412 | +47% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.