Build a cloud connection request
United States
Canada
Europe
Use the OAuth API token
With each cloud connection request, your application must send a valid OAuth API access_token
. For more information, see OAuth flows in Clover.
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
andX-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);
});
Updated 3 months ago