Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.14 KB

README.md

File metadata and controls

40 lines (32 loc) · 1.14 KB

Example Clover app using Webhooks

Requirements

Instructions

  1. Create a new app in Clover's developer dashboard
  2. Clone the repository
  3. Create a .env file with the following fields populated:
PORT=
APP_ID=
APP_SECRET=
MERCHANT_ID=
NGROK_AUTH=
  1. Run the app: npm start
  2. Visit http://localhost:8000 in a web browser and complete the OAuth process
  3. Copy the ngrok URL from your terminal and paste it into the Webhook URL field in Webhooks settings in Clover's developer dashboard
  4. Click Confirm. You should see a verificationCode in the terminal window
  5. Copy and paste the verificationCode into the Verification Code field in Webhooks settings
  6. Click Verify
  7. Select the Inventory check box and click Save
  8. 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