Subscriptions

Configure your application's subscription plans and pricing

The subscriptions configuration defines your application's pricing plans, features, and Stripe integration.

Location

/config/subscriptions.ts

Key Components

Pricing Plans

export const pricingData: SubscriptionPlan[] = [
  {
    title: "Starter",
    plan: "Starter",
    service: "default",
    description: "For Beginners",
    benefits: ["Up to 100 monthly posts", ...],
    limitations: ["No priority access to new features", ...],
    prices: {
      monthly: 0,
      yearly: 0,
    },
    stripeIds: {
      monthly: null,
      yearly: null,
    },
  },
  // Pro and Business plans follow the same structure
]

Plan Comparison

export const plansColumns = [
  "starter",
  "pro",
  "business",
  "enterprise",
] as const
 
export const comparePlans: PlansRow[] = [
  {
    feature: "Access to Analytics",
    starter: true,
    pro: true,
    business: true,
    enterprise: "Custom",
    tooltip: "All plans include basic analytics for tracking performance.",
  },
  // Additional feature comparisons...
]

Usage

The pricing routes located at app/(marketing)/pricing

Environment Variables

The subscription configuration uses the following environment variables:

NEXT_PUBLIC_STRIPE_PRO_MONTHLY_PLAN_ID
NEXT_PUBLIC_STRIPE_PRO_YEARLY_PLAN_ID
NEXT_PUBLIC_STRIPE_BUSINESS_MONTHLY_PLAN_ID
NEXT_PUBLIC_STRIPE_BUSINESS_YEARLY_PLAN_ID

On this page