Posting cancelled transaction result for a table

Sample URL schematics:

The terminal will send an HTTP POST request to this URL if and only if the always-return-outcome flag is set to 'true' in the initial open sales request.

The message body contains the cancelled transaction result in JSON format (content-type text/plain) and contains the following data:

Parameter Description Mandatory
result Always 'CANCELLED' Yes
mid The Tyro Merchant ID Yes
tid The Tyro Terminal ID Yes
operator-id The Operator ID used to process the transaction Yes
table The table number Yes

Example:

Copy
Copied
{"mid":"123","table":"10","operator-id":"2175","result":"CANCELLED","tid":"111"}

Error codes:

  • To acknowledge the request from the terminal, the POS server will return a HTTP status code of 200 (OK).
  • A HTTP status code other than 200 sent by the POS server will be interpreted as a permanent error condition and the terminal will reset ready for the next transaction. If the terminal does not receive any response from the POS server, the terminal will continue to send the transaction result through until a response is received.

Please note that as the terminal will resend transaction results through until a response is received, POS servers should implement a facility to handle duplicate receipt of transaction results. To ensure that the POS server can determine the authenticity of the message, the terminal must include a Message Authentication Code (MAC) as an HTTP header (with name x-tyro-mac). Please refer to Appendix A for details regarding how to generate and verify the MAC for the message.

Testing and troubleshooting connectivity between terminal and POS server

Testing and troubleshooting connectivity between terminal and POS server

Sample URL schematics:

For the purposes of testing and troubleshooting, the terminal will make an HTTP GET request of this URL. This function can be used to test connectivity between the terminal and the POS server. This function is available on the Tyro terminal via Menu > Settings > Network > Test POS server.

To acknowledge the request from the terminal, the POS server will return a HTTP status code of 200 (OK). The terminal will display the HTTP status code on the screen to help enable troubleshooting.

This function can also be used to check that the passphrase is configured correctly. To do so return some text content along with the correct x-tyro-mac header, for example:

Message: Lorem ipsum dolor sit amet, consectetur adipiscing elit

Passphrase (secret): p@ssphr@se

Transmitted MAC: a236a563bb769f20883dd320389e72dd8b4f0571

Upon receiving the request, the Tyro terminal will compute the MAC using the received message and the passphrase, and then compare the received MAC with the calculated one, if the MACs match it means that the passphrase is configured correctly and additionally, the message text has not been altered in way between the POS Pay@table server and the terminal.

Typical Scenarios

Show below are diagrams detailing how the typical scenarios are handled.

Scenario 1: Restaurant mode - paying the full amount.

Scenario 1

Scenario 2: Restaurant mode - splitting the bill.

Scenario 2

Scenario 3: Retail mode

Scenario 3

To learn more, please refer to the Testing section.

Copyright © Tyro Payments 2019-2022. All right reserved.