> For the complete documentation index, see [llms.txt](https://docs.nzoni.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nzoni.app/create-first-and-default-plan.md).

# Create first and default plan

You'll find all the steps you need to create a default plan. Note that you will be able to create other plans directly from your admin dashboard.

By default, a plan is created, but you can modify it and/or create your own plans.

## Create a stripe product

To create the first plan, you must first create a product (one-time payment or subscription) from [stripe dashboard](https://dashboard.stripe.com/) where you will retrieve the <mark style="background-color:yellow;">**price\_id**</mark>

<figure><img src="https://2710776705-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRVLgi3PHtDYnjvZgAgjp%2Fuploads%2FsqmS1FCbTCmHJKI3vJMM%2FCapture%20d%E2%80%99e%CC%81cran%202024-05-18%20a%CC%80%2022.36.14.png?alt=media&amp;token=800ad0f6-cb92-44dd-89eb-8421bc6b0c25" alt=""><figcaption></figcaption></figure>

## Insert plan from your DB manager

Use your DB manager to manually insert an item in the Plan table by adding stripe <mark style="background-color:yellow;">**price\_id**</mark> to the <mark style="background-color:yellow;">**stripePlanId**</mark> field.

Your plan can have as type '<mark style="background-color:yellow;">**monthly**</mark>' or '<mark style="background-color:yellow;">**annually**</mark>' or '<mark style="background-color:yellow;">**onetime**</mark>'.

Here's Plan data example:

```json
{
       "stripePlanId" : "price_1OnnunIaiqRv3A4CB5n2RoVA",
       "label" : "Starter",
       "devise" : "$",
       "price" : 18,
       "type" : "monthly",
       "createdAt" : ISODate("2024-02-25T18:45:09.764Z"),
       "updatedAt" : ISODate("2024-03-18T16:46:48.769Z"),
       "deletedAt" : null,
       "popular" : false,
       "description" : "Our Starter Website Package is perfect for individuals",
       "features" : [
              "Professionally designed website ",
              "Mobile-responsive layout",
              "Basic SEO setup to improve search",
              "Contact form integration ",
              "Social media integration"
         ],
        "active" : false,
        "position" : 1
}
```

## Set the default plan

#### Angular

Get your plan id et define it as the default plan in the *<mark style="background-color:yellow;">**signup.component.ts**</mark>* file.&#x20;

```typescript
...
export class SignupComponent implements OnInit, OnDestroy {
  ...
  planId = // Plan ID; 
  ...
}

```

#### Backend (it's optionnal)

Set the default plan Id in <mark style="background-color:yellow;">**.env**</mark>

```properties
...
DEFAULT_PLAN_ID=

```

If everything's ok, congratulations on creating your first plan.
