Features
PreviousNext

Billing

Add subscription and payment capabilities to your application with multiple billing providers.

The @kit/billing package provides a unified interface for managing subscriptions, payments, and billing features in your application. It supports multiple billing providers while maintaining a consistent API.

Core Features

  • Subscription Management: Create and manage subscription plans
  • Payment Processing: Handle payments securely
  • Customer Management: Store and update customer billing information
  • Invoice Handling: Generate and manage invoices
  • Usage Tracking: Monitor subscription usage and limits
  • Multi-Provider Support: Switch between providers without changing your code

Available Providers

ProviderDescription
StripeIndustry-standard payment processing platform
LemonSqueezyModern e-commerce and subscription platform

Quick Setup with Dashboard App

The fastest way to get started is to use our pre-built dashboard application:

Install the package

pnpm add '@kit/billing@workspace:*'

Create a billing configuration file

config/billing.config.ts
import { parseBillingConfig } from '@kit/billing/config';
 
export const billingConfig = parseBillingConfig({
    provider: 'stripe', // or 'lemon-squeezy'
    mode: 'test', // or 'live'
    currency: 'USD',
    numberAfterComma: 2,
    urls: {
        success: '/dashboard/billing',
        cancel: '/dashboard/billing',
    },
});

Features

  • Pre-built billing pages
  • Subscription management UI
  • Customer portal
  • Invoice history
  • Usage tracking

What's Next

PageDescription
IntegrationStep-by-step guide to integrate billing
User SettingsAdd billing dashboard for users
PricingDisplay pricing plans

How is this guide?

Last updated on 10/17/2025