# Subscription types and plans

The configuration files of your application is located in lib/config folder.

&#x20;/auth.config.ts and /auth.ts files are responsible for authentication

## Code snippet of config file located at lib/Config/main.ts

```jsx
export const config: Data = {
  ...,
     plans: [
        {
            name: SubscriptionPlan.STARTER,
            label: "Starter",
            featured: false,
            type: "FREE",
            stripeProductId: null,
            price: {
                value: "$0",
                stripePriceId: null,
            },
            description: "Description of your Starter plan",
            button: {
                label: "Get started for free",
                href: "/auth/sign-up",
            },
            features: {
                available: ["Feature 1", "Feature 2"],
                unavailable: [
                    "Feature 3",
                    "Feature 4",
                    "Feature 5",
                    "Feature 6",
                ],
            },
        },

        {
            name: SubscriptionPlan.PREMIUM,
            label: "Premium",
            type: "RECURRING",
            featured: false,
            stripeProductId: "xxxxxxxxxxxxxxxxxx",
            price: {
                Monthly: {
                    value: "$9",
                    stripePriceId: "xxxxxxxxxxxxxxxxxx",
                },
                Annually: {
                    value: "$90",
                    stripePriceId: "xxxxxxxxxxxxxxxxxx",
                },
            },
            description: "Description of your Premium plan.",
            button: {
                label: "Checkout",
                href: "",
            },
            features: {
                available: ["Feature 1", "Feature 2", "Feature 3", "Feature 4"],
                unavailable: ["Feature 5", "Feature 6"],
            },
        },

        {
            name: SubscriptionPlan.PLUS,
            label: "Plus",
            type: "RECURRING",
            featured: true,
            stripeProductId: "xxxxxxxxxxxxxxxxxx",
            price: {
                Annually: {
                    value: "$190",
                    stripePriceId: "",
                },
                Monthly: {
                    value: "$19",
                    stripePriceId: "",
                },
            },
            button: {
                label: "Checkout",
                href: "",
            },
            description: "Description of your Entreprise plan.",

            features: {
                available: [
                    "Feature 1",
                    "Feature 2",
                    "Feature 3",
                    "Feature 4",
                    "Feature 5",
                    "Feature 6",
                ],
                unavailable: [],
            },
        },

        {
            name: SubscriptionPlan.ENTREPRISE,
            label: "Enterprise",
            type: "ONETIME",
            featured: false,
            stripeProductId: "xxxxxxxxxxxxxxxxxx",
            price: {
                value: "$900",
                stripePriceId: "xxxxxxxxxxxxxxxxxx",
            },

            description: "Description of your Entreprise plan.",
            button: {
                label: "Checkout",
                href: "",
            },
            features: {
                available: [
                    "Feature 1",
                    "Feature 2",
                    "Feature 3",
                    "Feature 4",
                    "Feature 5",
                    "Feature 6",
                ],
                unavailable: [],
            },
        },
    ],
    ...etc
};

```

## Subscription Types and Stripe Configuration

SaasCore offers three subscription types: Free, Recurring, and One-time. Each type has a specific Stripe configuration.

## 1. Free Plan

The Free plan does not require Stripe integration.

```jsx
{
  stripeProductId: null,
  price: {
    value: "$0",
    stripePriceId: null,
  }
}
```

### 2. Recurring Plan

The Recurring plan offers monthly and annual billing options.

```jsx
{
  stripeProductId: "prod_Q9IlnhsXwxNtfW",
  price: {
    Monthly: {
      value: "$9",
      stripePriceId: "price_1PJ09dD8PnrtK1gBjgxxxxxx",
    },
    Annually: {
      value: "$90",
      stripePriceId: "price_1PJ0ATD8PnrtK1gB0C6xxxxxx",
    },
  }
}
```

### 3. One-time Plan

The One-time plan is a single payment option.

```javascript
{
  stripeProductId: "prod_Q9IlnhsXwxNtfW",
  price: {
    value: "$900",
    stripePriceId: "price_1PJ0ATD8PnrtK1gBpmxxxxxx",
  }
}
```

PS: Plan names should be determined at both the config object level and the Prisma schema level.

```prisma
enum SubscriptionPlan {
  STARTER
  PREMIUM
  ENTREPRISE
  PLUS
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zakariaes-organization.gitbook.io/saascore-docs/configuration/subscription-types-and-plans.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
