@venturekit-pro/billing
Installation
Section titled “Installation”npm install @venturekit-pro/billing@devWhat It Provides
Section titled “What It Provides”Plan Definitions
Section titled “Plan Definitions”import { definePlans } from '@venturekit-pro/billing';
const plans = definePlans([ { id: 'free', name: 'Free', features: { projects: { limit: 3 }, support: false } }, { id: 'pro', name: 'Pro', features: { projects: { limit: 50 }, support: true } },]);Feature Checking
Section titled “Feature Checking”import { getFeatureLimit, hasFeature } from '@venturekit-pro/billing';
getFeatureLimit(plans, 'free', 'projects'); // → 3hasFeature(plans, 'free', 'support'); // → falseUsage-to-Invoice Mapping
Section titled “Usage-to-Invoice Mapping”import { mapUsageToLineItems } from '@venturekit-pro/billing';
const lineItems = mapUsageToLineItems(currentUsage, planFeatures);Auto-Migrations
Section titled “Auto-Migrations”import { getBillingMigrationsDir } from '@venturekit-pro/billing';
const dir = getBillingMigrationsDir(); // Path to billing SQL migrationsPlanDefinition,PlanFeature— plan configuration types
Dependencies
Section titled “Dependencies”@venturekit/core— required
Related
Section titled “Related”- Billing Guide — setup walkthrough
- Multi-Tenancy — per-tenant billing
- API Reference — full type documentation