Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

stripe-integration-expert

БесплатноЗапускает вложенные скриптыНе проверен

Implement Stripe integrations for SaaS billing: subscriptions, checkout, proration, usage- based billing, idempotent webhooks, customer portal, dunning, and…

borgheiот borghei★ 1 250 звёзд на GitHub

Об этом скилле

Stripe Integration Expert

The agent builds production-grade Stripe integrations for SaaS billing: subscription lifecycle management with trials and proration, idempotent webhook handlers, usage-based metered billing, Checkout sessions, Customer Portal, dunning recovery, and SCA/3D Secure compliance. Provides patterns for Next.js, Express, and Django with emphasis on real-world edge cases.

Core Capabilities

  • Checkout & client setup — pinned-version Stripe client, centralized plan config, Checkout sessions with trials, tax collection, and promo codes
  • Subscription lifecycle — a state machine covering trialing → active → past_due → canceled, plus upgrades/downgrades with proration previews and reactivation
  • Idempotent webhooks — signature verification, event dedup, re-fetch-from-API handlers, and retry-safe processing
  • Usage-based billing & gating — Billing Meters and meter events, feature gating by plan, and grace-period access logic
  • Dunning & SCA — payment-failure email sequences and PSD2 / 3D Secure authentication flows
  • Local testing — Stripe CLI webhook forwarding, event triggers, and test card matrix

When to Use

  • Building SaaS subscription billing from scratch on Next.js, Express, or Django
  • Adding plan upgrades/downgrades with correct proration behavior
  • Hardening or debugging a webhook endpoint for idempotency and retry safety
  • Implementing metered/usage-based billing or feature gating by plan
  • Adding dunning recovery or European SCA/3D Secure compliance

Clarify First

Before building the integration, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

  • Framework: Next.js / Express / Django (the handler and client patterns differ per stack).
  • Billing model: flat subscription / metered usage-based / trials + proration (shapes the subscription state machine and code).
  • Scope: which piece: Checkout, idempotent webhooks, dunning, or SCA/3D Secure (selects the reference and code generated).

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Tools Overview

Three stdlib CLIs. The two checkers are regex-based: they confirm the common safeguards are present, not that they are correct, so read the flagged handler before declaring it fixed.

Tool Purpose Example (runs as written)
scripts/webhook_validator.py Webhook handler check: signature verification, event dedup, required billing events, 200-on-error, hardcoded whsec_ secrets (--json, --strict fails on warnings) python scripts/webhook_validator.py assets/sample_project_flawed
scripts/integration_auditor.py Integration audit: hardcoded keys, unpinned apiVersion, missing idempotency keys, hardcoded price IDs, checkout without metadata, .env exposure (--json, --severity critical/warning/info) python scripts/integration_auditor.py assets/sample_project_sound
scripts/checkout_scaffolder.py Generate checkout, webhook, subscription, portal and usage (meter events) code for nextjs, express or django (--features, --all, --json, --list-features) python scripts/checkout_scaffolder.py --framework nextjs --features checkout,webhooks

Exit codes: 0 pass; 1 critical findings (validator: also warnings under --strict, or no webhook handler found); 2 bad input (path is not a directory, unknown feature). The auditor exits 0 with status NO_STRIPE_CODE when the target contains no Stripe code, so check the status rather than the exit code alone.

Samples: assets/sample_project_flawed/ (unverified payload, no dedup, 5 billing events missing, unpinned version, no checkout metadata) exits 1 on both checkers; assets/sample_project_sound/ exits 0 on both.

Before writing code that names an API version or a newer Stripe feature, check Stripe's API changelog: pinned versions and billing APIs change yearly, and the references here are a snapshot.

Workflow

  1. Settle the Clarify First inputs, then generate the pieces you need with checkout_scaffolder.py (or adapt the reference code).
  2. Run both checkers on the project and fix every critical finding:
    python scripts/webhook_validator.py path/to/project --strict
    python scripts/integration_auditor.py path/to/project --severity warning
    
  3. Test end to end with the Stripe CLI (stripe listen --forward-to localhost:3000/api/webhooks/stripe, then stripe trigger invoice.payment_failed) and verify that each handled event changes local state exactly once, including on a replay.
  4. Done when both checkers exit 0, replayed events are no-ops, a failed handler returns 5xx and Stripe retries it, and the pinned apiVersion is the version your SDK ships with (2026-10-28.endive for stripe-node 23.
Полный SKILL.md на GitHub

Установить stripe-integration-expert в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/sample_project_flawed/stripe_webhook.tsassets/sample_project_sound/stripe_webhook.tsreferences/payment-flows.mdreferences/subscriptions.mdreferences/testing-and-troubleshooting.mdreferences/webhooks.mdscripts/checkout_scaffolder.pyscripts/integration_auditor.pyscripts/webhook_validator.py

FAQ

Что делает скилл stripe-integration-expert?

Implement Stripe integrations for SaaS billing: subscriptions, checkout, proration, usage- based billing, idempotent webhooks, customer portal, dunning, and SCA. Use when building billing, handling webhooks, or testing with Stripe CLI.

Как установить скилл stripe-integration-expert?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл stripe-integration-expert запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить stripe-integration-expert с