stripe/products.ts

production-saas · src/lib/stripe/products.ts · typescript · MIT
payments

TypeScript module defining Stripe product interfaces and plan constants for SaaS pricing tiers.

// Source: https://github.com/cloudflare/production-saas | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
// NOTE: IDs are copied via Stripe Dashboard
// ---

import type { Stripe } from '.';

export interface Product {
	id: `prod_${string}`;
	object: 'product';
	created: Stripe.Timestamp;
	description: Nullable<string>;
	active: boolean;
	name: string;
	livemode: boolean;
	images: string[];
	package_dimensions: null;
	shippable: Nullable<boolean>;
	statement_descriptor: Nullable<string>;
	unit_label: Nullable<string>;
	updated: Nullable<Stripe.Timestamp>;
	url: Nullable<string>;
	metadata: Limits;
}

export interface Limits {
	users: number;
	spaces: number;
	schemas: number;
	documents: number;
}

export const FREE: Partial<Product> = {
	id: 'prod_JQkUZOkys

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key