Device connection and disposal

Connecting to a Clover device

The Clover Remote Pay SDKs utilize USB or WebSockets to connect your POS to the Clover device. USB and WebSockets are designed to provide a persistent connection, so it is recommended that you connect and then maintain a connection to the Clover device.

The onDeviceReady handler should be used 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.

Disposing 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).


Did this page help you?