Nzoni docs
  • Getting Started
  • Angular
    • Project Structure
    • Authentication, Magic Link and Google Auth
    • Landing page
    • Payments and Plans
    • Blog and articles
    • User Dashboard
    • Admin Dashboard
    • SEO & SSR
    • Deploy Angular Project
  • Nest.js
    • Project Structure
    • Authentication, Google auth and Magic link
    • Blogposts
    • Plans
    • Stripe Payment
    • Email and Templates
    • Database and Migration
    • Image File upload
    • Users
    • Deploy Nest.js project
  • Node.js/MongoDB
    • Project structure
    • API endpoints
  • Angular / Firebase / Node.js
  • Create first and default plan
  • Create an Admin User
  • Support
  • Licenses
Powered by GitBook
On this page
  • Create a stripe product
  • Insert plan from your DB manager
  • Set the default plan

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.

PreviousAngular / Firebase / Node.jsNextCreate an Admin User

Last updated 7 months ago

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 where you will retrieve the price_id

Insert plan from your DB manager

Use your DB manager to manually insert an item in the Plan table by adding stripe price_id to the stripePlanId field.

Your plan can have as type 'monthly' or 'annually' or 'onetime'.

Here's Plan data example:

{
       "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 signup.component.ts file.

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

Backend (it's optionnal)

Set the default plan Id in .env

...
DEFAULT_PLAN_ID=

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

stripe dashboard