Skip to content

Pairing process

If you use a Synqpay device as a remote client (USB/ HTTP/ TCP / WebSocket), you'll need to perform pairing with the device.

The pairing process results in a short API key that must be attached to each request appropriately for each communication method.

The process includes two steps: the first is a call to the method pair, and the second is a call to authenticate.

A serial number is needed to call and pair the device. This can be achieved either on the original box, on the back of the device, or inside the operator menu by pressing on the POWERED BY CODEBLOCKS at the bottom of the screen:

Operator menu
Operator Menu

Tip

The barcode contains the Serial Number of the device

Process Example

The following example uses cURL to send requests over HTTP. You can use any client of your choice.

Info

pair and authenticate methods don't require an API key. The API key field must be filled with zeros for framed-based transport.

Start the pairing process by sending a pair request:

curl http://10.100.102.141:8000/synqpay \
-X POST
-H 'Content-Type: application/json; charset=utf-8' \
-d '{
    "jsonrpc": "2.0",
    "method": "pair",
    "id": "1234",
    "params": {
        "serialNumber": "244RKR528387"
    }
}'

After sending a pair request, a 6-digit OTP will show up on the screen:

Otp
Otp

Now send authenticate with the displayed OTP:

curl http://10.100.102.141:8000/synqpay \
-X POST
-H 'Content-Type: application/json; charset=utf-8' \
-d '{
    "jsonrpc": "2.0",
    "method": "authenticate",
    "id": "1234",
    "params": {
        "otp": "400091"
    }
}'

Now, the response contains an eight-digit key.

1
2
3
4
5
6
7
{
  "jsonrpc": "2.0",
  "id": "1234567890"
  "result": {
    "apiKey": "1234abcd"
  }
}

This key is used when sending all the requests to the device, for example:

curl http://10.100.102.141:8000/synqpay \
-X POST
-H 'Content-Type: application/json; charset=utf-8' \
-H 'api-key: 1234abcd' \
-d '{
    "jsonrpc": "2.0",
    "method": "getDeviceInfo",
    "id": "1234",
    "params": null
}'