- Node.js 10.15.3
- Clover developer account
- ngrok account
- Test merchant with inventory items
- Create a new app in Clover's developer dashboard
- Clone the repository
- Create a
.env
file with the following fields populated:
PORT=
APP_ID=
APP_SECRET=
MERCHANT_ID=
NGROK_AUTH=
- Run the app:
npm start
- Visit
http://localhost:8000
in a web browser and complete the OAuth process - Copy the ngrok URL from your terminal and paste it into the Webhook URL field in Webhooks settings in Clover's developer dashboard
- Click Confirm. You should see a
verificationCode
in the terminal window - Copy and paste the
verificationCode
into the Verification Code field in Webhooks settings - Click Verify
- Select the Inventory check box and click Save
- In Postman, make a POST request
http://localhost:8000/increment_quantity
with the following request body:
{
"id": "",
"quantity": 100
}
Note: make sure you fill out the id
field with an actual item ID from your test merchant inventory