Back to Skills

payment-integration

verified

Integrate Stripe, PayPal, and payment processors. Handles checkout flows, subscriptions, webhooks, Stripe Connect, and PCI compliance. Activates for payments, Stripe, PayPal, checkout, billing, subscriptions, recurring payments, payment processing, credit card, debit card, payment gateway, webhook, payment intent, customer portal, invoice, refund, dispute, chargeback, PCI compliance, 3D Secure, SCA, payment methods, Apple Pay, Google Pay, ACH, SEPA, pricing tables, metered billing, usage-based billing, trial period, coupon codes, discounts, promo code, 100% off, free checkout, add payments, implement payments, accept payments, take payments, collect payments, charge users, charge customers, monetize, make money, SaaS billing, subscription model, monthly billing, annual billing, pay per use, freemium, premium plan, pro plan, enterprise plan, pricing page, pricing tiers, upgrade plan, downgrade plan, cancel subscription, pause subscription, resume subscription, failed payment, payment failed, card declined, retry payment, dunning, past due, payment reminder, receipt email, invoice email, tax calculation, sales tax, VAT, Stripe Tax, payment link, buy button, donate button, tip jar, one-time payment, recurring payment, installments, payment schedule, split payment, marketplace payments, Stripe Connect, Direct Charge, Destination Charge, connected account, platform fees, transfer, payout, balance, Stripe dashboard, test mode, live mode, test cards, Stripe CLI, stripe listen, webhook signature, idempotency key, idempotent, Stripe Elements, Payment Element, Card Element, Stripe.js, server-side confirmation, client-side confirmation, payment verification, verify payment, dual confirmation, inventory management, slot booking, WebBrowser payment, Expo payment, React Native payment, checkout session, checkout session completed, connect webhook.

View on GitHub

Marketplace

specweave

anton-abyzov/specweave

Plugin

sw-payments

development

Repository

anton-abyzov/specweave
27stars

plugins/specweave-payments/skills/payment-integration/SKILL.md

Last Verified

January 25, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/anton-abyzov/specweave/blob/main/plugins/specweave-payments/skills/payment-integration/SKILL.md -a claude-code --skill payment-integration

Installation paths:

Claude
.claude/skills/payment-integration/
Powered by add-skill CLI

Instructions

# Payment Integration Skill

You are a payment integration specialist focused on secure, reliable payment processing with expertise in Stripe Connect marketplace patterns.

## Focus Areas
- Stripe/PayPal/Square API integration
- Checkout flows and payment forms
- Subscription billing and recurring payments
- Webhook handling for payment events (including Connect webhooks!)
- PCI compliance and security best practices
- Payment error handling and retry logic
- **Stripe Connect**: Direct Charge, Destination Charge, platform fees
- **Idempotency**: Dual confirmation (webhook + frontend), atomic operations
- **Edge Cases**: 100% promo codes, browser close, network failures

## Approach
1. Security first - never log sensitive card data
2. **ALWAYS implement dual confirmation** (webhook + frontend verify)
3. **ALWAYS use idempotent operations** (conditional UPDATE pattern)
4. Handle all edge cases (failed payments, disputes, refunds, 100% promos)
5. Test mode first, with clear migration path to production
6. Comprehensive webhook handling for async events
7. **For Stripe Connect**: Verify Connect webhook endpoint handles `checkout.session.completed`!
8. **Inventory/slots**: Only modify AFTER payment confirmed, atomically

## Critical Patterns to ALWAYS Apply

### 1. Direct Charge Webhook Gap
When using Direct Charge pattern, checkout sessions are created ON the Connected Account. Webhooks go to Connect endpoint, NOT platform endpoint!
- Platform endpoint: `/webhooks/stripe` -> general events
- Connect endpoint: `/webhooks/stripe/connect` -> MUST have `checkout.session.completed`

### 2. 100% Promo Code Detection
```typescript
// CORRECT
const is100PercentOff = session.payment_status === 'paid' && session.amount_total === 0 && !session.payment_intent;
// WRONG - no_payment_required is for different scenarios
```

### 3. Dual Confirmation (Webhook + Frontend)
Never rely on frontend verification alone! Browser can close, network can fail.
- Webhook: Reliable, async, catches 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2804 chars

Issues Found:

  • description_too_long