Device connection and disposal

United States
Canada
Europe
Latin America

Connect to a Clover device

The Clover Remote Pay SDKs use USB or WebSockets to connect your POS to the Clover device. USB and WebSockets are designed to provide a persistent connection. Clover recommends that you connect and then maintain a connection to the Clover device.

Device ready for transactions: onDeviceReady handler

Use the onDeviceReady handler to notify your POS that a connection to the Clover device has been established and that it is ready to process a transaction. There is no guarantee that this handler will only be called once, so you should not start any transaction from within onDeviceReady.

📘

NOTE

onDeviceReady is called again if the device connection is lost and then re-established. This allows your POS to perform recovery actions if needed.

Additionally, to help maintain proper connection status, onDeviceConnected (connected but not ready) and onDeviceDisconnected should also be implemented.

Dispose of the connection

Your POS should properly dispose of the Clover Connector by calling dispose when your application has closed (before the browser unloads if using the Cloud SDK).