Build a cloud connection request

United States
Canada
Europe

Use the OAuth 2.0 token

With each request, your application must send a valid OAuth 2.0 API access token. See Use OAuth 2.0 for more information.

Components to build a cloud connection request

You can create a request using these components:

  • Environment- and region-specific base link (URL)
  • Required headers (X-Clover-Device-Id and X-POS-ID)
  • Resource (endpoint) in use
  • Request body

🚧

IMPORTANT

For Payment Card Industry (PCI) compliance, all requests must be made using a secure (HTTPS) connection.

Example request

Display a message on the device:

var request = require("request");

var options = {
  method: 'POST',
  url: 'https://sandbox.dev.clover.com/connect/v1/device/display',
  headers: {
    accept: 'application/json',
    'x-clover-device-id': 'deviceSerialNumber',
    'x-pos-id': 'MyPOS',
    'content-type': 'application/json',
    authorization: 'Bearer OauthToken'
  },
  body: '{"text":"A message to show on the device","beep":true}'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});