Loading...
Loading...
Use when adding payments, billing, checkout, subscriptions, invoices, webhooks, customer portal, Stripe Connect, metered/usage billing, tax, fraud/Radar, pricing page, payment intents, refunds, coupons, promo codes, or any Stripe integration in Next.js. Triggers: stripe, payment, checkout, subscribe, billing, invoice, webhook, portal, connect, marketplace, payout, metered, usage-based, SaaS pricing, paywall, plan, tier.
npx skill4agent add clownnvd/claude-code-skills stripenpm install stripe @stripe/stripe-js @stripe/react-stripe-js| Env Variable | Value | Exposed to Client |
|---|---|---|
| | NO |
| | Yes |
| | NO |
| | Yes |
templates/stripe-server.tslib/stripe.tstemplates/stripe-client.tslib/stripe-client.tsreferences/setup.md| Task | Approach | Reference |
|---|---|---|
| One-time payment | Checkout Session → redirect to Stripe | |
| Custom payment UI | Payment Intents + Stripe Elements | |
| Recurring billing | Subscriptions + Invoices | |
| Receive events | Webhook Route Handler | |
| Self-service billing | Customer Portal session | |
| Products & pricing | Products + Prices API | |
| Marketplace splits | Stripe Connect | |
| Auto tax calc | Stripe Tax | |
| Fraud prevention | Radar rules + 3D Secure | |
| Usage-based billing | Billing Meter + usage records | |
| Pricing page | Server-fetched prices + checkout button | |
| Stripe ↔ DB sync | Webhook → database update patterns | |
| Paywall / auth guard | Middleware + Server Component guards | |
| Event | When | Action |
|---|---|---|
| Payment captured | Fulfill order |
| Subscription renewed | Extend access |
| Payment failed | Notify user, retry |
| Plan changed | Update entitlements |
| Cancelled | Revoke access |
| Custom flow completed | Confirm order |
| Dispute opened | Alert + evidence |
references/webhooks.md| Number | Result |
|---|---|
| Success |
| Generic decline |
| Insufficient funds |
| Expired card |
| 3D Secure required |
| 3D Secure 2 required |
references/testing.mdstripe login
stripe listen --forward-to localhost:3000/api/webhooks/stripe
stripe trigger checkout.session.completed
stripe trigger invoice.payment_failed
stripe logs tail --filter status:400| Template | Copy To | Description |
|---|---|---|
| | Server-side Stripe instance |
| | Client-side Stripe.js (lazy) |
| | Webhook Route Handler |
| | Server Action: Checkout Session |
| | Server Actions: subscription CRUD |
| | Server Action: portal session |
| | Environment variables |
references/error-handling.mdreferences/security.mdreferences/setup.mdreferences/checkout.mdreferences/payment-intents.mdreferences/subscriptions.mdreferences/webhooks.mdreferences/customer-portal.mdreferences/products-prices.mdreferences/connect.mdreferences/tax.mdreferences/radar-fraud.mdreferences/billing-meter.mdreferences/error-handling.mdreferences/testing.mdreferences/security.mdreferences/pricing-page.mdreferences/database-sync.mdreferences/middleware-guard.md