Manage plans and products
Learn how to manage plans and products in your application.

Define plans and products
You can manage the plans and products in the configuration file of your supastarter project.
There are different types of plans you can define:
Free plan
The free plan is the default plan for users who have not purchased any plans or can be used to access a limited version of your product.
As this is no paid plan, you don't need to define any prices or attach a product id to it.
Enterprise plan
The enterprise plan is not a real plan, but will show up in the pricing table with a link to a contact form, so customers can contact you to get access to your product.
As this is no paid plan, you don't need to define any prices or attach a product id to it.
Subscription plans and one-time purchase plans
A plan represents a product or service of your application and each is a column in your pricing table. It has the following properties:
recommended: if this plan should be highlighted as recommendedhidden: hide the plan from the pricing table, can be used if you want to grandfather old plans or prepare for a new planprices: define the prices for this plan
One plan can have multiple prices, for example a monthly and yearly price or/and for each currency you support.
A price has the following properties:
type: the type of the price, can berecurringorone_timeproductId: the id of the product from the payment providerinterval: the interval of the price, can bemonth,year,weekordayintervalCount: the number of intervals to bill, defaults to 1amount: the amount of the pricecurrency: the currency of the price, for exampleUSDtrialPeriodDays: the number of days of the trial period, leave out if you don't want to offer a trial periodseatBased: if price is per seat (this will only work for organizations and will multiply the price by the number of members), defaults tofalse
You can publish your site with a placeholder productId, if you need a landing page with pricing table to verify your store in Stripe or Lemonsqueezy. Just note that this will not work in production.
Support multiple currencies
To support multiple currencies, make sure to define the different currencies for each locale in the i18n section of the config file:
Then define the prices for each locale in the payments.plans section of the config file:
Plan information for pricing table
You can define the information for the pricing table for each plan in the usePlanData hook in /apps/web/modules/saas/payments/hooks/plan-data.ts.
You can define a title, a description and a features array for each plan.
We recommend you to use the t() function to get the translations for the plan information and then define the translations in the /packages/i18n/translations/ folder.
Note: When you remove one of the existing plans, make sure to remove the corresponding entry in the /apps/web/modules/saas/payments/hooks/plan-data.ts file, otherwise you will get a type error.