Understanding the transmission mechanism
Concerning myPOS payment protocol, the terminal acts as a server. The communication should be treated as a single thread asynchronous one. Even if the terminal accepts more than one connection, it will respond BUSY if it is already in a transaction.
A transaction is defined as from the point when the terminal approves the request and responds with STAGE = 1, STATUS = 0 till the terminal responds with STAGE = 5.
All requests are following the pattern: connect to the terminal; send request; receive an answer with STAGE = 1; if it’s with STATUS =
0, wait to receive the next answer till gets STATUS = 5; then caller closes the connection.
The caller is recommended to wait 5 seconds for the answer with STAGE = 1. All other TIMEOUTs for the next stages will be specified in the previously received answer.
Possible communication modes and clarifications
Depending on the POS device modification the terminal could use a direct connection with the Acquirer HOST to process the transactions or to use the Caller connectivity to transport specific data and receives a response from the Acquirer HOST.
In the case where the device uses own communication connectivity with the Acquirer HOST, the mode is called “Cash register”. In case where the device uses the Caller communication connectivity the mode is called “Slave”.
The document describes the “Cash register” mode by default. All specifics for “Slave” mode are explicitly mentioned.