Skip to content

stripekitThe create-next-app of Stripe

Declare your catalog. Reconcile your own Stripe account. Own the code — no hosted layer, no revenue share.

Adding subscriptions to your app

Stripe, by hand≈ a day · fingers crossed
  • Create every product and price by hand in the dashboard
  • Paste fragile price_1Qx… IDs into your code
  • Write the checkout, webhook, and billing-portal code yourself
  • Get the webhook logic exactly right — or silently break who has access
  • Redo it every time you change a price
  • Cross your fingers and ship
With stripekit≈ 2 minutes · done right
  • Write your plans in one small file
  • Your app never touches a price ID again
  • Checkout, webhooks, and the customer portal — generated for you
  • The webhook logic everyone gets wrong: written correctly
  • Change a price? Edit the file, run one command
  • Real Stripe code that lives in your repo — yours to own

Zero to paid in three commands

bash
# 1. Scaffold config + billing code into your Next.js app
npx stripekit init

# 2. Preview what will change on your Stripe account
npx stripekit plan

# 3. Create the products, prices, webhook, and portal
npx stripekit push

Your catalog, as code

ts
// stripe.config.ts
import { defineConfig } from 'stripekit'

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

Change an amount, run stripekit push, and stripekit creates 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.

Built on the ideas behind “How I Stay Sane Implementing Stripe” — turned into a tool.

Released under the MIT License.