API Reference

The PIN Pad is like a server running in the local network. It can be accessed either over TCP or over WebSocket (non-SSL).

When logged in, the user can double-tap in the upper left corner of the screen to access the Administration section. It will, among other things, show the IP address and port for incoming connections.

Your client application should connect using the selected method (TCP or WebSocket). Then send a request message and wait for a response. After response, the PIN Pad will (in most cases) disconnect you. You can then send another request, wait for a response, and so on.

Some responses, called "transient", will not lead to disconnection and just provide additional information during the connection session. Currently such responses will be sent during the payment process – the PIN Pad will send Payment State messages. In order to enable this, the payment request must have transientResponses set to true. Payment State can be helpful, for example, to prevent the user from canceling the payment being processed (canceling should be allowed by the client app only when the state is STATE_CARD_WAITING).

To cancel the payment from the client side, the client just has to close the connection to the PIN Pad.

The messages to and from the PIN Pad are JSON-formatted as described in the following sections.

Request testing can be performed using:
– For TCP: Sample PIN Pad client app (see above);
– For WebSocket: some WebSocket client running in Chrome (for non-SSL support), e.g. https://websocketking.com/