Requirements
POS Event Stream API has the following requirements:
The client application must be able to accept concurrent, separate connections, and events from multiple points of sale POS terminals.
Each POS Event Stream data feed requires that a subscription be enabled for the site in the Portal. You must have a current integrator’s
key_idandsecret_key, which are obtained from us. The subscription for the site includes the configuration options for the client application’s IP address and port, plus the list of events that trigger an event message on the socket.It is your responsibility to ensure that the integrator’s
key_idandsecret_keyvalues are stored securely and are inaccessible to any other actor.The client application needs to account for the possibility that only a portion of a message is ready to be read from the socket, and it must also account for the possibility that multiple messages are available to be read.
With socket communication, there is no guarantee that the data available to be read on the socket currently will be a single, complete message. As messages are sent on the socket, the underlying network stack might split the message across multiple network packets. Also, two or more messages might be available on the socket when the client application is ready to read the data.
The transmission protocol for POS Event Stream provides a mechanism for both sides, POS API and the client application, to know how much data is in a single message. Each message must be prefixed with a four-byte value to specify the length of the message that follows When reading from the socket, use that first four bytes to know how many bytes to read for this single message. For more information, see Socket Communication.