Skip to main content

Documentation Index

Fetch the complete documentation index at: https://devzone.nayax.com/llms.txt

Use this file to discover all available pages before exploring further.

Connection & Protocol

The VPOS acts as a TCP/IP server on Port 5050. Your system (POS/FCC) acts as the client and must initiate the connection. Communication is bidirectional over a persistent socket.
Single-Connection RuleThe terminal supports only one active connection; a new socket attempt will automatically close the previous one.The protocol uses a Command-Response Pattern. All client commands must include a requestId, which the terminal echoes back in its response to facilitate transaction tracking.

TCP Message Format

To ensure data integrity, every message sent over the TCP socket (both commands and responses) must use a two-byte length prefix. This tells the receiver exactly how many bytes of JSON data follow in the stream.
ByteFieldDescription
0-1Length PrefixThe length of the JSON message in bytes (excluding the prefix itself).
2-NJSON ContentThe actual message payload in UTF-8 format.

Encoding Example

For a JSON command like {"command":"pay","amount":5000} (30 bytes total): Binary Representation:
[0x00][0x1E]{"command":"pay","amount":5000}
Big Endian (Network Order)The length prefix is sent with the Most Significant Byte (MSB) first.
Calculation: $(MSB \times 256) + LSB = \text{Total Bytes}$

Example: A 300-byte message results in 0x01, 0x2C. 1*256+44 = 300.