This is a Sample
app built using Node.js and Express Framework to showcase how to make API calls using the Intuit-Payment API's
- Node.js >= 8.x.
- Intuit Developer Account
$ git clone https://github.com/IntuitDeveloper/SampleApp-Payments-Nodejs
$ cd SampleApp-Payments-Nodejs
$ npm install
- Create an Intuit Developer account and app:
You must have an Intuit Developer account and have created an app. To know more refer to Get Started - Create an App with Payment Scope:
Login to Developer Portal and click onMy Apps
on the top right corner and create an App as shown below
Select thePayments
scope while creating the app.
- Get AccessToken:
Use OAuth Playground to get the OAuth2.0 accessToken from the app you just created above.
Note: Please make sure to select Payment Scope
Copy the contents from .env.example
to .env
from the root directory:
$ cp .env.example .env
Edit the .env
file to add your:
- ACCESS_TOKEN: You can generate
accessToken
using the OAuth Playground - NGROK_ENABLED:(optional) By default it is set to
false
. If you want to serve the Sample App over HTTPS, set the variable totrue
- PORT:(optional) Optional port number for the app to be served
** Please note, that we are testing this Sample in Sandbox Environment. To test in Production please use the below .env
variables:
- TOKEN_URL=
https://sandbox.api.intuit.com/quickbooks/v4/payments/tokens
- CHARGE_URL=
https://sandbox.api.intuit.com/quickbooks/v4/payments/charges
If you want your enpoint to be exposed over the internet. The easiest way to do that while you are still developing your code locally is to use ngrok.
You dont have to worry about installing ngrok. The sample application does that for you.
- Just set
NGROK_ENABLED
=true
in.env
$ npm start
You will see an URL as below:
💻 Server listening on port 8000
💳 See the Sample App in your browser: http://localhost:8000
Your will see an URL as below :
💻 Server listening on port 8000
💳 See the Sample App in your browser: https://9b4ee833.ngrok.io
Click on the URL and follow through the instructions given in the sample app.
If you already have an Heroku account, you can use Heroku One-Button Deployment to deploy this sample and test it right away.
Unable to follow ? Please use the link below to follow the step by step procedure to get started with this sample:
Project Repo
Intuit Payment API Reference
Intuit Payments API Explorer
Any reports of problems, comments or suggestions are most welcome.
Please report these on Issue Tracker in Github.