mcpField
S
stripe-subscriptions

stripe-subscriptions

github.com/andrelandgrafDevelopment23269 installsUpdated 20w ago
Repository

About stripe-subscriptions

A recipe-based guide to implementing Stripe subscription billing for developers building Next.js apps. It covers plan gating, subscription-state sync, webhooks, usage tracking, and a billing portal, with required environment, database, and logging setup.

Key features

  1. 01Integrate Stripe subscription billing
  2. 02Gate plan access with feature flags
  3. 03Sync subscription state through webhooks
  4. 04Track usage and add a billing portal
  5. 05Organize prerequisites and implementation steps

Use cases

  1. 01Build subscription billing for a Next.js app
  2. 02Restrict features by subscription plan
  3. 03Sync Stripe subscription state to Postgres
  4. 04Provide a billing portal and track usage

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/andrelandgraf/fullstackrecipes --skill stripe-subscriptions

After installing, type/stripe-subscriptionsin Claude Code to confirm it loaded.

Details

From the project README

Stripe Subscriptions

Complete subscription billing system with Stripe integration, feature flags for plan gating, webhook handling, and billing portal.

Prerequisites

Complete these recipes first (in order):

Type-Safe Environment Configuration with better-env

Use better-env config modules for type-safe server/public env access, feature flags, and either-or credential constraints.

curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setup
Neon + Drizzle Setup

Connect a Next.js app to Neon Postgres using Drizzle ORM with optimized connection pooling for Vercel serverless functions.

curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setup
Pino Logging Setup

Configure structured logging with Pino. Outputs human-readable colorized logs in development and structured JSON in production for log aggregation services.

curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/pino-logging-setup

Cookbook - Complete These Recipes in Order

Feature Flags with Flags SDK

Implement feature flags using the Vercel Flags SDK with server-side evaluation, environment-based toggles, and Vercel Toolbar integration.

curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/feature-flags-setup
Stripe Subscriptions DB Sync

Complete subscription system with Stripe, Vercel Flags for plan configuration, webhook handling for syncing subscription state to Postgres, usage tracking, and billing portal integration.

curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/stripe-sync

Comments

Markdown supported