本文へ移動
cccskills
無料GitHub で公開

software-payments

Designs production payment and billing systems. Use when implementing Stripe, Paddle, Adyen, subscriptions, tax, marketplaces, or mobile purchase flows.

インストール方法を見る

含まれるファイル(20)

  • SKILL.md16.9 KB
  • agents/openai.yaml306 B
  • assets/template-checkout-entrypoint-propagation-checklist.md1.2 KB
  • data/scheme-thresholds.json4.4 KB
  • data/sources.json30.7 KB
  • evals/evals.json9.4 KB
  • learnings.consolidated.md593 B
  • learnings.md593 B
  • references/agentic-commerce.md7.3 KB
  • references/feature-gating-patterns.md10.2 KB
  • references/in-app-browser-checkout-contract.md1.4 KB
  • references/ops-runbook-checkout-errors.md1.6 KB
  • references/platform-comparison.md17.0 KB
  • references/regional-pricing-guide.md21.3 KB
  • references/storekit2-native-patterns.md14.3 KB
  • references/stripe-patterns.md18.7 KB
  • references/subscription-lifecycle.md22.6 KB
  • references/testing-patterns.md4.1 KB
  • references/uk-eu-payments-guide.md11.6 KB
  • references/webhook-reliability-patterns.md24.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Payments & Billing Engineering

Use this skill to design, implement, and debug production payment integrations: checkout flows, subscription lifecycle handling, billing portals, entitlement gating, webhooks, regional pricing, and payment-testing strategy.

Quick Reference

NeedDefaultDeviationReference
Standard SaaS subscription checkoutStripe Checkout or Payment LinksUse Payment Element plus Express Checkout Element when branded custom UI is a hard requirementreferences/stripe-patterns.md
Merchant of record (managed tax/seller-of-record)Paddle or LemonSqueezyEvaluate Stripe Managed Payments after checking seller location, product tax codes, account eligibility and supported surfaces at its eligibility pagereferences/platform-comparison.md
High-volume or enterprise multi-method processingAdyen—references/platform-comparison.md
UK or EU bank debit and local methodsGoCardless, Mollie, or open-banking providersRepo-dependent: no bundle source differentiates the three by situation; keep whichever the existing integration already usesreferences/uk-eu-payments-guide.md
Usage-based metering or token billingStripe Billing Meters or Lago—references/subscription-lifecycle.md
Complex contract, seat, or revenue-recognition billingChargebee or Recurly on top of the processor—references/subscription-lifecycle.md
Webhook reliabilityverified signatures plus idempotent processing—references/webhook-reliability-patterns.md
Entitlement and feature gatingregistry plus API enforcement plus UI paywall—references/feature-gating-patterns.md
Native iOS in-app purchaseStoreKit 2 with backend JWS verificationAdd RevenueCat only when multi-platform entitlement sync materially justifies itreferences/storekit2-native-patterns.md
Checkout and webhook testingStripe CLI plus E2E automation—references/testing-patterns.md
AI agents initiating purchasesScoped, limited-use payment credential plus seller-side approvalHuman confirmation for high-risk actionsreferences/agentic-commerce.md

When to Use This Skill

Use this skill when the primary work is:

  • choosing a payment processor, merchant-of-record layer, or billing stack
  • implementing hosted or custom checkout
  • designing subscription lifecycle and webhook handling
  • building feature gating and billing-portal flows
  • handling regional pricing, tax-sensitive platform choice, or local methods
  • testing and operating checkout or billing workflows

Route elsewhere when the main task is:

NeedUse Instead
general backend implementation outside payments../software-backend/SKILL.md
API contract design without billing concerns../dev-api-design/SKILL.md
pricing strategy and package designstartup-business-models
checkout conversion optimizationmarketing-cro
application security review../software-security-appsec/SKILL.md
native app implementation around store billing../software-mobile/SKILL.md
wallets, crypto settlement or on-chain money movement../software-crypto-web3/SKILL.md
Stripe-specific product/API guidance or account toolingAvailable Stripe-maintained skills/plugins; discover them through Stripe’s agent guidance, then follow the runtime’s installation and permission policy

Defaults

  • Stripe is the default processor for most SaaS and product teams.
  • Hosted checkout is the default starting point unless branded custom UI is a hard requirement.
  • Verified webhooks trigger state sync; reconcile against the provider’s current objects because delivery can be duplicated or out of order.
  • Initialize provider clients lazily; do not fail builds on missing secrets at import time.
  • Omit payment_method_types unless you intentionally restrict available methods.
  • Make every webhook handler signature-verified and idempotent.
  • Keep feature gating enforced in three places: registry, API boundary, and UI paywall.
  • Treat platform availability, API versions, preview features, and tax behavior as volatile and verify before final advice.

Workflow

  1. Define the money movement, provider, customer and ledger boundary, then classify the business model:
    • one-time purchase
    • subscription
    • usage-based billing
    • marketplace or multi-party flow
    • mobile IAP or hybrid web-plus-app billing
  2. Choose the stack:
    • processor
    • merchant-of-record layer if needed
    • billing orchestrator if lifecycle complexity justifies it
  3. Choose the checkout surface:
    • Checkout or Payment Links for speed
    • Payment Element for custom UX
  4. Implement the operational core:
    • webhook verification
    • idempotent processing
    • billing portal or self-serve management
    • entitlement sync and feature gating
  5. Reconcile provider balances or settlement reports, ledger entries and entitlements; assign unmatched records to an owner.
  6. Test success, decline, duplicate, timeout, refund and retry paths; add observability and incident handling before calling the integration production-ready.

See the Quick Reference table above for platform defaults by situation, plus references/platform-comparison.md and references/uk-eu-payments-guide.md for the detailed trade-offs. Mobile subscription default: StoreKit 2 or Play Billing as the store-of-record; add RevenueCat only when cross-platform entitlement sync, experiments, or web-plus-store coordination materially justify it.

Known Traps

  • Hybrid mobile billing without one entitlement registry. If App Store, Play Billing, and web subscriptions can all grant access, define one canonical entitlement state and one conflict-resolution rule before launch.
  • Treating checkout success redirects as purchase truth. Redirects are UX only; provisioning must wait for the verified webhook or store-server notification path.
  • Mixing mobile digital-goods policy boundaries with web-SaaS billing assumptions. Apple and Google policy treatment for in-app digital goods is volatile and must be re-verified before final implementation advice.
  • Showing an iOS link or button to web checkout without branching on the App Store storefront. External-link allowances, entitlements and terms depend on storefront and app category. Branch on Storefront.current and re-read the applicable guideline and regional terms before shipping. See references/storekit2-native-patterns.md.
  • Assuming RevenueCat is automatically the default for every mobile subscription stack. It is a coordination layer, not a requirement, and adds its own operational surface.
  • Reusing one webhook consumer for unrelated billing side effects without idempotent boundaries. Entitlements, invoicing, CRM sync, and analytics fan-out need separate retry and replay behavior.
  • Deferring tax, merchant-of-record, and invoice-issuer decisions until after checkout buildout. Those choices affect product catalog, legal entity exposure, refunds, and support flows.

Common Anti-Patterns

  • Using a native digital-goods checkout that violates the applicable storefront’s purchase and external-link policies; verify those policies before choosing the surface.
  • Creating separate product or price catalogs in web, mobile, and billing systems with no synchronization contract.
  • Using provider object IDs as the only entitlement key instead of a stable internal subscription or account identity.
  • Shipping a billing portal without a tested downgrade, cancellation, refund, and grace-period policy.
  • Letting the pricing page, checkout copy, entitlement rules, and CRM lifecycle drift independently.
  • Treating revenue analytics events as operational truth for access control.

Stripe Integration Defaults

If Stripe is the chosen processor, apply the general Defaults above plus these Stripe-specific defaults:

  • store internal user and tier metadata carefully and validate it before DB use
  • use subscription schedules for preplanned billing changes
  • keep billing portal enabled for self-serve changes
  • use entitlements when packaging changes often, but still enforce authorization in your own API

Use references/stripe-patterns.md for API-version notes, webhook mappings, and migration detail.

Agentic Commerce

When an AI agent buys on a user's behalf, or a seller accepts agent-initiated orders, give the agent only a per-transaction credential bound to a seller, currency, maximum amount, and expiry. Enforce spend limits in code, have the seller approve or decline against the final total, make every step idempotent under agent retries, require human confirmation for high-risk actions such as recurring charges or new merchants, and keep the consent record as dispute evidence. See references/agentic-commerce.md, which includes Stripe shared-payment-token notes.

Production Readiness Checklist

Reconciliation gate.

Define a provider-independent money record for expected amount, currency, fee, tax, settlement, refund, dispute, and current entitlement. Reconcile webhooks and provider balance or settlement reports against that record on a schedule, with an exception queue and an owner. A successful checkout redirect or webhook is event evidence; neither is proof that cash, accounting state, and access rights agree.

  • Webhook signatures verified on every handler before processing
  • All webhook handlers are idempotent (safe to replay the same event)
  • Checkout creation and webhook failures are explicitly logged
  • Dead-letter or retry strategy defined for out-of-order or failing events
  • Stripe CLI (or equivalent) wired into local and CI test flows
  • Tests cover success, decline, and 3DS / step-up challenge flows
  • Incident playbook written for checkout 500s, auth failures, and policy denials
  • Tax and merchant-of-record decisions finalized before checkout buildout
  • Feature gating enforced in three places: registry, API boundary, UI paywall

Common mistakes:

MistakeConsequence
Trusting client redirect as proof of purchaseProvisioning before the verified webhook, creating access without payment
Hardcoding prices or plan logic in codeCatalog drift and deploy-gated pricing changes
Setting payment_method_types unnecessarilyUnintentionally restricts available methods
Silently failing webhooks instead of retryingInvisible entitlement loss or dangling subscriptions
Treating Apple/Google policy as stable across releasesStore rejection or forced redesign

See: references/testing-patterns.md, references/webhook-reliability-patterns.md, references/feature-gating-patterns.md, references/ops-runbook-checkout-errors.md

Navigation

Core

Regional and operational

Mobile and in-app purchase

Agentic commerce

Testing and migrations

Regulatory and Scheme Traps

Thresholds, dates, and legislative status in this area change often. Look them up at the source each time; this section keeps only the engineering controls.

  • 3DS test coverage: CI should exercise challenge, frictionless, off-session-requires-authentication, decline-after-authentication, and 3DS-not-supported paths. Take the card numbers from Stripe's testing docs (docs.stripe.com/testing) or stripe:test-cards at the time you write the test; do not copy them from memory.
  • SCA exemptions for MIT: merchant-initiated charges (renewals, saved-card charges) need off_session: true plus the required consent/mandate captured during on-session setup, with authentication where required. A missing flag can cause unexpected renewal declines. Check EMVCo and provider support for published versus draft specification features before using them.
  • EU PSD3 / PSR: check publication, effective dates and scope through qualified EU regulatory counsel before treating a provision as binding. Architecture risks to design for now: open-banking API performance standards, revised SCA exemptions, stronger APP-fraud liability, and one-leg-out scope.
  • EU Instant Payments Regulation: instant SEPA send/receive and Verification of Payee obligations phase in by eurozone and non-euro member state. Take the dates from the regulation text or qualified EU regulatory counsel before committing an implementation date to a customer.
  • Visa VAMP: the ratio counts fraud reports (TC40) and disputes (TC15) together, so one disputed-and-reported transaction can count twice. The main engineering lever is the exclusion path: disputes resolved pre-dispute (RDR/CDRN-type services) and Compelling Evidence 3.0 wins drop out of the ratio. Take merchant and acquirer thresholds from Visa's current VAMP fact sheet.
  • Mastercard ECP: tiered by chargeback count and ratio over a trailing window, with escalating fees and possible MATCH listing. Take tiers and fee schedules from the current Mastercard rulebook before quoting numbers to a merchant. Treat a merchant near either scheme's threshold as a specialist-review trigger, not a self-serve calculation.
  • PCI DSS v4.0.1: the future-dated v4.0 requirements are now baseline, including the payment-page script controls (6.4.3, 11.6.1). This skill covers checkout-surface scope reduction (SAQ A vs SAQ D; see references/stripe-patterns.md); route full scoping to a security/compliance specialist.
  • Stripe Managed Payments (merchant of record): eligibility-gated by business location, digital products, direct integrations only (no Connect), and Checkout Session or Payment Link surfaces. Check Stripe’s eligibility page for seller locations, account review, product tax codes and supported surfaces before committing to an MoR architecture.
  • UK rules: UK SCA (PSRs 2017 as amended), mandatory APP-fraud reimbursement, and the FCA deferred-payment-credit (BNPL) regime differ from EU rules. Route status and scope to qualified UK regulatory counsel; do not assume UK and EU consumer-liability rules match.
  • Surcharging: consumer-card surcharging is prohibited in the EU and UK. Check local rules before any fee pass-through feature that touches card instruments.

Learnings Loop

When prior decisions or pitfalls are relevant, consult learnings.consolidated.md if present; use learnings.md only for needed history or as the available fallback. Otherwise skip both.

After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.

日本語の概要は準備中です。原文の説明を表示しています。

vasilyu1983/AI-Agents-public932026年10月12日 更新

Configures and hardens Claude Code and Codex MCP servers. Use when connecting databases, APIs, SaaS, building servers, or serving a clearance-filtered knowledge base.

日本語の概要は準備中です。原文の説明を表示しています。

vasilyu1983/AI-Agents-public932026年10月12日 更新

Owns instruction files: AGENTS.md, CLAUDE.md, personal and repo rules. Use when writing, pruning, auditing them, sharing rules across Claude and Codex, or fixing ignored rules.

日本語の概要は準備中です。原文の説明を表示しています。

vasilyu1983/AI-Agents-public932026年10月12日 更新

Creates and audits agent skills: SKILL.md, references, scripts, runtime metadata. Use when writing, validating, or security-reviewing a skill, or fixing truncated skill listings.

日本語の概要は準備中です。原文の説明を表示しています。

vasilyu1983/AI-Agents-public932026年10月12日 更新

Adds per-skill learnings loops for dated patterns, mistakes, and domain facts. Use when wiring skill memory, consolidation, or drift audits.

日本語の概要は準備中です。原文の説明を表示しています。

vasilyu1983/AI-Agents-public932026年10月12日 更新

Chooses subagent, team, workflow, or debate and launches it on Claude Code or Codex. Use when delegating, running agent review boards, or installing shared agents.

日本語の概要は準備中です。原文の説明を表示しています。

vasilyu1983/AI-Agents-public932026年10月12日 更新

vasilyu1983 のスキルをすべて見る

このスキルの問題を報告する