stripe-stack

Implement idempotent Stripe payment workflows in Next.js with Supabase.

28|3|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/ScientiaCapital/skills --skill stripe-stack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stripe-stack
Source: https://github.com/ScientiaCapital/skills/tree/main/active/stripe-stack-skill
Command: npx skills add https://github.com/ScientiaCapital/skills --skill stripe-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Stripe integration in modern web apps demands secure key management, reliable webhook processing, and correct environment separation to avoid live/test mixups.

Core Features & Use Cases

  • Database-backed idempotency for webhook events to prevent duplicates
  • Lazy server-side Stripe client with runtime validation
  • End-to-end workflow for setup, subscriptions, and webhooks in Next.js + Supabase

Quick Start

Set up environment variables, install Stripe dependencies, create the webhook route, and deploy to enable production-grade Stripe flows.

Frequently Asked Questions about stripe-stack

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

FAQPage Schema
How do I handle Stripe webhook idempotency in Next.js and Supabase?

Stripe webhooks in Next.js require verifying event signatures and using database-backed idempotency to prevent duplicate processing. This approach ensures reliable subscription lifecycle management and prevents data inconsistencies during event retries.

What is the best way to separate Stripe test and live environments in a web app?

Separating Stripe test and live environments requires runtime validation of API keys and distinct environment variable configurations. This prevents live/test mixups and ensures secure key management across your payment integration workflows.

How do I manage subscription lifecycle events with Supabase and Stripe?

Managing subscription lifecycle events with Supabase and Stripe involves processing webhook payloads to update database records for setup, invoicing, and billing states. This ensures your application tracks the exact subscription status securely.

Why do I need a lazy Stripe client initialization in Next.js?

Lazy Stripe client initialization in Next.js ensures the server-side Stripe instance is only created when needed with validated runtime environment variables. This prevents application crashes from missing configurations and enforces secure key management.

Does this Stripe integration pattern support robust error handling for webhooks?

Yes, the Stripe integration pattern supports robust error handling for webhooks by combining database-backed idempotency with strict event verification. This prevents data inconsistencies and avoids infinite retry loops for failed payment processing events.