stripekit — the create-next-app of Stripe

3 min read Original article ↗

// the create-next-app of Stripe

Your Stripe account,
in one file.

Declare your catalog in stripe.config.ts. stripekit sets up your Stripe account to match — and gives you billing code you own.

stripekit push

$ stripekit push
Plan: 3 to create, 1 to replace, 0 to destroy

  + product   Pro
  + price     pro_monthly     $20.00 / month
  ~ price     pro_yearly      $192$160 / year  (replace)
  + webhook   /api/stripe/webhook   12 events
  + portal    cancellations, plan switching

Apply these changes?  yes
 Applied in 1.4s — account matches config

// zero to paid

Three commands, start to finish.

01$ stripekit init

Scaffold stripe.config.ts and correct-by-construction billing code into your Next.js app.

02$ stripekit plan

Preview a terraform-style diff of every product, price, and webhook change — before anything moves.

03$ stripekit push

Create the products, prices, webhook endpoint, and portal. Idempotent — run it twice, nothing breaks.

// your catalog, as code

One file is the source of truth.

Change an amount and run push — stripekit mints the new price, moves the lookup key onto it, and archives the old one. Your checkout code never changes, because it references the stable lookup key, not a price ID.

  • Prices replaced, never mutated
  • Removals archived, never deleted
  • The same file targets test and live

stripe.config.ts

import { defineConfig } from 'stripekit'

export default defineConfig({
  products: {
    pro: {
      name: 'Pro',
      prices: {
        monthly: { amount: 2000,  interval: 'month' },
        yearly:  { amount: 19200, interval: 'year' },
      },
      features: { seats: 5, projects: 'unlimited' },
    },
  },
  portal:   { cancellations: true, planSwitching: true },
  webhooks: { path: '/api/stripe/webhook' },
})

// why teams pick it

Correct by construction.

Your Stripe, not ours

Not a merchant of record. Not a hosted control plane. State lives in your own database — there's nothing to depend on at runtime.

Webhooks that can't corrupt state

The generated handler verifies signatures, dedupes events, and funnels everything through one sync function — so out-of-order delivery can't wreck you.

Idempotent & immutable-safe

Prices are replaced, never mutated. Removals are archived, never deleted. Apply a plan, re-plan, and you get zero changes.

One config, test & live

The same file targets both modes. push --live promotes your catalog — which is what kills test/live drift for good.

// or hand it to your agent

Same tool. One click for your agent.

No wrapper, no glue code. stripekit runs as an MCP server, so your coding agent calls plan / push / pull / check directly — and can't hallucinate a webhook handler.

Published to the MCP registry as io.github.rafaelcg/stripekit. Full setup →

Add to Cursor

Claude Code

/plugin marketplace add rafaelcg/stripekit
/plugin install stripekit@stripekit-marketplace