Integrated Reports

You are ready to start developing your integrated reports feature now that you have successfully setup your POS to initiate and process requests through iClient in the test environment. Before you begin, please have a look at the certification criteria, which provide a checklist of the minimum requirements for the certification of integrated reports with Tyro.

Certification Criteria Document

Overview

The Tyro terminal provides the merchants with a reconciliation report feature, this feature allows Tyro terminals to print two versions of the reconciliation report, either the shorter, more concise summary report, or the more comprehensive detailed report, for either the current or the previous settlement period.

The integrated reports feature allows POS systems to obtain this report data from the terminal upon-request, through the reconciliationReport() function, this function allows the user to request the summary or detailed variant of the report in either a simple text format or an XML format for any date in the past 7 days.

The terminal then returns the report data to the POS through the response, and the POS can then use the report data in a variety of ways e.g. to display the report data on the screen for the user’s reference and to provide the user the option to print out the report through the POS printer, the main benefits of this are a more tightly integrated experience for the user, and access to the past 7 days of reconciliation data as opposed to just the current and previous day’s which can be accessed from the Tyro terminal.

Specification

Function Definition Purpose Parameters
reconciliationReport(requestParams , responseReceivedCallback ) Initiates a reconciliation report request on the terminal. 1. requestParams - An object containing the following parameters as shown in the below table. 2. responseReceivedCallback - Function (A callback function to provide report data or the relevant error message, please refer to the Response Received Callback for more details.)
Parameter Type Description Required
terminalBusinessDay String The reporting date in format yyyyMMdd. Required
type String The report type. Valid values are ‘summary’ and ‘detail’. Required
format String The report format. Valid values are ‘txt’ and ‘xml’. The text version is pre-formatted in a mono-spaced font. Required
mid Integer Override the configured mid for multi-merchant terminals, or if your browser does not support local storage, or if you have developed headless pairing as a feature. Optional - Required for headless pairing, multi-merchant, or if your browser does not support local storage.
tid Integer Override the configured tid for multi-merchant terminals or if your browser does not support local storage or if you have implemented headless pairing as a feature. Optional - Required for headless pairing, multi-merchant, or if your browser does not support local storage.
integrationKey String Supply the integration key if your browser does not support local storage or if you have developed headless pairing or multi-merchant as a feature. Optional - Required for headless pairing, multi-merchart, or if your browser does not support local storage.

Demo

Demo-JS Fiddle

JS Fiddle

Please don't click on the Save button if you make any changes in the JS Fiddle sample app. Instead, please press run if you have made any changes. If you click on save, it may break the functionality of the JS Fiddle.

Making the request

The steps to be followed to initiate a purchase are given as follows:

  • initiate the request by passing the following mandatory fields into the function:
    • terminalBusinessDay
    • type (optional)
    • format
  • The POS is required to use the MID, integrationKey, and TID parameters if multi-merchant or headless pairing is used or if your browser does not support local storage.

Request Example

Copy
Copied
function doReport(reportDate, reportType, reportFormat) {

  iclient.reconciliationReport({
    terminalBusinessDay: reportDate,
    type: reportType,
    format: reportFormat
  }, reportCallback);
}

var reportCallback = function(response) {
  console.log(JSON.stringify(response));
  $("#result").html(response.result);
  $("#data").html("<pre>" + escapeHtml(response.data) + "</pre>");
  $("#error").html(response.error);
};

For handling the response, please refer to Response Received Callback

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