In this repository I have tried to make a prototype project using Nodejs, Expressjs and ejs templates to explaining the usage of Quickbooks Online SDK packages for Nodejs.
You will be needing the following tools before running this script:
- Nodejs installed in you system. I am using v16.13.1 while writing this code.
- Some basic knowledge of git, Nodejs, Environment files and Quickbooks online.
- Clone this repository.
- Change your work directory to this project directory.
- Run command
npm install
to install the dependencies listed in the package.json file. - Add environment variables to .env file. I am using MongoDB for storing data so I have added MongoDB variables too.
- Run command
npm start
and open http://localhost:3000.
In these following steps I am trying to explain how this app is working along with Quickbooks Online:
- Click on the given link to log-in
- After logging in and selecting a company (if you have multiple companies) you will be redirected to callback uri specified in .env file where I have rendered a link to view customers from MongoDB.
- On the customers page you can add new customers by providing DisplayName. The customer will be created on QBO system and will the QBO Customer ID will be stored in MongoDB.
- In this example, I have also generated different types of invoices on customers page.
- On creating invoices I am creating invoices with a fixed amount and storing the invoice id in MongoDB Database.
You can perform other operations also by defining more functionality to the code.