Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
eyadsibai avatar

Stripe Payments

  • 146 installs
  • 7 repo stars
  • Updated January 15, 2026
  • eyadsibai/ltk

Wire Stripe Checkout, subscriptions, webhooks, and customer portal flows into SaaS or storefront backends with safe test-mode rollout.

About

stripe-payments is an ltk skill for implementing production-grade Stripe integrations in web apps and APIs. It walks agents through products, prices, Checkout Sessions, subscription lifecycle events, signed webhooks, refunds, and customer portal setup while stressing test-mode validation, PCI-safe patterns, and clear error handling before go-live.

  • Checkout and subscription patterns
  • Webhook verification and idempotency
  • Test vs live key handling
  • Customer portal and invoice flows
  • ltk Stripe-focused implementation guardrails

Stripe Payments by the numbers

  • 146 all-time installs (skills.sh)
  • Ranked #2,574 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Jul 30, 2026 (Skillselion catalog sync)
npx skills add https://github.com/eyadsibai/ltk --skill stripe-payments

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs146
repo stars7
Last updatedJanuary 15, 2026
Repositoryeyadsibai/ltk

What it does

Wire Stripe Checkout, subscriptions, webhooks, and customer portal flows into SaaS or storefront backends with safe test-mode rollout.

Files

SKILL.mdMarkdownGitHub ↗

Stripe Payment Integration

Production-ready Stripe integration for payments, subscriptions, and webhooks.

Payment Flows

FlowUse CasePCI Burden
Checkout SessionHosted page, fastest setupMinimal
Payment IntentsCustom UI, full controlRequires Stripe.js
Setup IntentsSave card for laterMinimal

Quick Start - Checkout Session

import stripe
stripe.api_key = "sk_test_..."

session = stripe.checkout.Session.create(
    payment_method_types=['card'],
    line_items=[{
        'price_data': {
            'currency': 'usd',
            'product_data': {'name': 'Premium Plan'},
            'unit_amount': 2000,  # $20.00 in cents
            'recurring': {'interval': 'month'},
        },
        'quantity': 1,
    }],
    mode='subscription',
    success_url='https://example.com/success?session_id={CHECKOUT_SESSION_ID}',
    cancel_url='https://example.com/cancel',
)
# Redirect to session.url

Custom Payment Intent Flow

# Backend: Create payment intent
def create_payment_intent(amount, customer_id=None):
    intent = stripe.PaymentIntent.create(
        amount=amount,  # In cents
        currency='usd',
        customer=customer_id,
        automatic_payment_methods={'enabled': True},
    )
    return intent.client_secret
// Frontend: Confirm payment
const stripe = Stripe('pk_test_...');
const {error, paymentIntent} = await stripe.confirmCardPayment(
    clientSecret,
    {payment_method: {card: cardElement}}
);

Webhook Handling

@app.route('/webhook', methods=['POST'])
def webhook():
    payload = request.data
    sig = request.headers.get('Stripe-Signature')

    try:
        event = stripe.Webhook.construct_event(
            payload, sig, 'whsec_...'
        )
    except stripe.error.SignatureVerificationError:
        return 'Invalid signature', 400

    if event['type'] == 'payment_intent.succeeded':
        handle_payment_success(event['data']['object'])
    elif event['type'] == 'customer.subscription.deleted':
        handle_subscription_canceled(event['data']['object'])

    return 'OK', 200

Critical Webhook Events

EventWhen to Handle
payment_intent.succeededPayment completed
payment_intent.payment_failedPayment failed
customer.subscription.updatedSubscription changed
customer.subscription.deletedSubscription canceled
invoice.payment_succeededSubscription payment OK

Subscription Management

# Create subscription
subscription = stripe.Subscription.create(
    customer=customer_id,
    items=[{'price': 'price_xxx'}],
    payment_behavior='default_incomplete',
    expand=['latest_invoice.payment_intent'],
)

# Customer portal for self-service
session = stripe.billing_portal.Session.create(
    customer=customer_id,
    return_url='https://example.com/account',
)
# Redirect to session.url

Refunds

# Full refund
stripe.Refund.create(payment_intent='pi_xxx')

# Partial refund
stripe.Refund.create(
    payment_intent='pi_xxx',
    amount=500,  # $5.00
    reason='requested_by_customer'
)

Test Cards

Card NumberResult
4242424242424242Success
4000000000000002Declined
40000025000031553D Secure required
4000000000009995Insufficient funds

Best Practices

1. Always use webhooks - Don't rely on client-side confirmation 2. Idempotency - Handle webhook events exactly once 3. Metadata - Link Stripe objects to your database 4. Test mode - Test all flows before production 5. PCI compliance - Never handle raw card data server-side 6. SCA - Implement 3D Secure for European payments

Common Pitfalls

  • Not verifying webhook signatures
  • Hardcoding amounts (use cents!)
  • Missing webhook event handlers
  • No retry logic for API calls
  • Skipping test card scenarios

Related skills

Backend & APIspaymentsecommerce

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.