stripe-integration-expert

Implements Stripe subscriptions, checkout sessions, webhooks, and usage-based billing for web applications.

Updated Aug 14, 2026
One-click install
npx skills add https://github.com/Rohithdgrr/REEK-uninstaller --skill stripe-integration-expert-rohithdgrr
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: stripe-integration-expert
Source: https://github.com/Rohithdgrr/REEK-uninstaller/tree/main/.opencode/skills/stripe-integration-expert
Command: npx skills add https://github.com/Rohithdgrr/REEK-uninstaller --skill stripe-integration-expert-rohithdgrr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires stripe.

What problem does it solve? Building Stripe billing from scratch involves many failure-prone details: proration math, webhook idempotency, trial abuse prevention, and subscription state synchronization. This Skill provides tested patterns for the full subscription lifecycle so you avoid double-processing webhooks, proration surprises, and broken upgrade/downgrade flows. ## Core Features & Use Cases - Subscription Lifecycle Management: Create, upgrade, downgrade, cancel, and pause subscriptions with correct proration behavior and a documented state machine (trialing, active, past_due, canceled, and more). - Idempotent Webhook Handlers: Signature-verified webhook processing with an event-deduplication table covering checkout.session.completed, subscription updates, and invoice payment success/failure. - Checkout, Portal, and Usage Billing: Ready-to-adapt Next.js route handlers for checkout sessions, customer portal sessions, metered usage reporting, and proration previews. - Use Case: You are adding paid plans to a Next.js SaaS app. Use this Skill to scaffold the checkout route, webhook handler, plan-change logic with proration preview, and feature-gating middleware, then test everything locally with the Stripe CLI. ## Quick Start Ask the assistant to implement a Stripe subscription checkout flow with an idempotent webhook handler for your Next.js app using this Skill.

Frequently Asked Questions about stripe-integration-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle Stripe webhooks idempotently in Next.js?▼

Verify the signature with stripe.webhooks.constructEvent, then check a database table of processed event IDs before handling. Return 500 on processing errors so Stripe retries, and only mark the event processed after successful handling.

How do I upgrade or downgrade a Stripe subscription with proration?▼

Call stripe.subscriptions.update with the new price ID. Use proration_behavior 'always_invoice' for immediate upgrades and 'none' for downgrades applied at period end. Preview the amount first with stripe.invoices.retrieveUpcoming.

How do I test Stripe webhooks locally?▼

Install the Stripe CLI, run stripe login, then stripe listen --forward-to localhost:3000/api/webhooks/stripe. Trigger events with commands like stripe trigger checkout.session.completed and use test card 4242 4242 4242 4242.

Why does my Stripe webhook handler process events twice?▼

Stripe retries webhooks when your endpoint returns a 500 or times out, and delivery order is not guaranteed. Without an idempotency table keyed by event ID, retries cause duplicate processing such as double email sends or repeated database updates.

How do I prevent Stripe free trial abuse?▼

Store a hasHadTrial flag on the user record and set it to true when the first checkout completes. Only pass trial_period_days when creating a checkout session if that flag is false, so returning users cannot claim another trial.

Does this Stripe integration support usage-based billing?▼

Yes, it includes metered billing via stripe.subscriptionItems.createUsageRecord with increment action. The example middleware finds the metered subscription item and reports usage per API call.