Integrated Reports
Terminal reports can be accessed through the TTA via the .Net interface. The name of the interface is "Tyro.Integ.ITerminalAdapterReports". At the conclusion of the execution of the methods, control will be returned to the caller and an object containing the result of the operation will be given.
Not all of Tyro's terminals have an integrated printer attached. Terminals with a printer attached are able to print out reports (summary and detailed transaction reports). For merchants who have terminals without printers, can consider the use of a PDF printer so that reports can be saved in PDF format.
Not all POS systems make their printers available as Windows printers, for example many POS systems use OPOS for printing. For these systems we have made additional API calls available through the TTA.
Methods
The TerminalAdapterReports interface exposes the following methods for integrated terminal reports:
- IReport TransactionSummaryReport(string date) : This method makes an HTTPS GET request to the Tyro Integration Server requesting a transaction summary report for the date specified (format yyyyMMdd). It uses the default MID and TID configured in the TTA configuration panel. An instance of IReport is returned that the caller can interrogate for the report information.
- IReport TransactionDetailedReport(string date) : This method make an HTTPS GET request to the Tyro Integration Server requesting a transaction detailed report for the date specified (format yyyyMMdd). It uses the default MID and TID configured in the TTA configuration panel. An instance of IReport is returned that the caller can interrogate for the report information.
- IReport TransactionSummaryReportMidTid(string mid, string tid, string date) : This method make an HTTPS GET request to the Tyro Integration Server requesting a transaction summary report for the mid, tid and date specified (format yyyyMMdd). An instance of IReport is returned that the caller can interrogate for the report information.
- IReport TransactionDetailedReportMidTid(string mid, string tid, string date) : This method make an HTTPS GET request to the Tyro Integration Server requesting a transaction detailed report for the mid, tid and date specified (format yyyyMMdd). An instance of IReport is returned that the caller can interrogate for the report information.
Return Value
The IReport interface contains the following methods:
- boolean ErrorOccurred() : This method returns true if a configuration or network error occurred. In this case the caller should call the GetError() method to determine what the cause of the error was so that corrective action can be take. A return value of false indicates that the call executed successfully.
- string GetText() : This method returns the text associated with the report. The text is plain text and the format of the text is detailed below
- Error GetError() : This method returns an Error object that allows the caller to determine things like the HttpStatusCode, the ErrorMessage and other useful pieces of information.
- string GetMid() : The mid associated with the report.
- string GetTid() : The tid associated with the report.
- string GetyyyyMMdd() : The date associated with the report.
Notes on integrated report functions:
- The reporting functions can be called at anytime of the day.
- The reporting functions can be called multiple times per day.
- The reporting functions can only be used to request reports no older than 7 days.
Response & Response Error Codes
The following HTTP error codes may be returned for an Integrated Reporting request. The value can be access via IReport.getError().
StatusCode
HTTP Code | HTTP Name | When |
---|---|---|
200 | OK | Request succeeds |
202 | Accepted | System not ready to receive requests |
400 | Bad Request | Request does not conform to requirements |
403 | Authentication Failed | Submitted key does not match Terminal's key |
404 | Not Found | Terminal is not connected to Tyro |
500 | Server Error | Error in Tyro system - Please report these to Tyro |
501 | Not Implemented | The operation is not available |
504 | Gateway Timeout | Request timed out before response could be generated |
Report format
The format of the report content (examples below) is one where the each line of the report is in the following format 'style: text'. The maximum length of any line is 27 characters and the style of each line can include various combinations of text alignment, font size and font weight.
Report styles
Name | Alignment | Font Size | Font Weight |
---|---|---|---|
LARGE | Left | Large | Normal |
LARGE_CENTRED | Centre | Large | Normal |
LARGE_RIGHT | Right | Large | Normal |
LARGE_BOLD | Left | Large | Bold |
MEDIUM | Left | Medium | Normal |
MEDIUM_CENTRED | Centre | Medium | Normal |
MEDIUM_RIGHT | Right | Medium | Normal |
MEDIUM_BOLD | Left | Medium | Bold |
SMALL | Left | Small | Normal |
SMALL_CENTRED | Centre | Small | Normal |
SMALL_RIGHT | Right | Small | Normal |
SMALL_BOLD | Left | Small | Bold |
TINY | Left | Tiny | Normal |
TINY_CENTRED | Centre | Tiny | Normal |
TINY_RIGHT | Right | Tiny | Normal |
TINY_BOLD | Left | Tiny | Bold |
NEW_LINE | Write out a blank line | ||
FORM_FEED | Feed enough paper through to allow a clean tear off |
Notes on styles:
- Many of the styles listed above are not currently in use but are reserved for future use.
- For centring, left pad the text with a number of spaces equal to (27 - length of text) / 2.
Summary report example response
MEDIUM_CENTRED: Merchant Name Here
MEDIUM_CENTRED: 125 York Street
MEDIUM_CENTRED: Sydney NSW 2000
NEW_LINE
LARGE_CENTRED: SUMMARY REPORT
NEW_LINE
MEDIUM_CENTRED: Tyro EFTPOS
NEW_LINE
MEDIUM: Merchant ID: 123
MEDIUM: Terminal ID: 3
NEW_LINE
MEDIUM: Printed: 23/07/12 10:26
NEW_LINE
MEDIUM: Card type: All cards
NEW_LINE
MEDIUM_BOLD: Date: 17/07/12
NEW_LINE
MEDIUM: Purchase 30 $1,139.88
MEDIUM: Cash out (0) $0.00
MEDIUM: Tip (0) $0.00
MEDIUM: Refund 1 -$39.95
MEDIUM: Void 0 $0.00
MEDIUM_RIGHT: ------------
MEDIUM: NET TOTAL 31 $1,099.93
NEW_LINE
MEDIUM: EFTPOS 16 $469.93
MEDIUM: Visa 5 $194.70
MEDIUM: MasterCard 4 $259.90
MEDIUM_RIGHT: ------------
MEDIUM: TYRO TOTAL 25 $924.53
NEW_LINE
MEDIUM: AMEX 6 $175.40
MEDIUM: JCB 0 $0.00
MEDIUM: Diners 0 $0.00
MEDIUM_RIGHT: ------------
MEDIUM: NET TOTAL 31 $1,099.93
NEW_LINE
FORM_FEED
Detailed report example response
MEDIUM_CENTRED: Merchant Name Here
MEDIUM_CENTRED: 127 York Street
MEDIUM_CENTRED: Sydney NSW 2000
NEW_LINE
LARGE_CENTRED: DETAIL REPORT
NEW_LINE
MEDIUM_CENTRED: Tyro EFTPOS
NEW_LINE
MEDIUM: Merchant ID: 123
MEDIUM: Terminal ID: 3
NEW_LINE
MEDIUM: Printed: 23/07/12 10:31
NEW_LINE
MEDIUM: Card type: All cards
NEW_LINE
MEDIUM_BOLD: Date: 17/07/12
NEW_LINE
MEDIUM: 08:39 Amex 6082 (s)
MEDIUM: Purchase $19.90
NEW_LINE
MEDIUM: 08:58 EFTPOS 9815 (s)
MEDIUM: Purchase $39.95
NEW_LINE
MEDIUM: 09:27 EFTPOS 0836 (c)
MEDIUM: Purchase $106.80
NEW_LINE
MEDIUM: 09:32 MasterCard 2785 (c)
MEDIUM: Purchase $24.95
NEW_LINE
MEDIUM: 09:48 EFTPOS 7926 (c)
MEDIUM: Purchase $9.90
NEW_LINE
MEDIUM: 11:36 MasterCard 6818 (c)
MEDIUM: Purchase $110.10
NEW_LINE
MEDIUM: 11:47 Amex 1003 (s)
MEDIUM: Refund -$39.95
NEW_LINE
MEDIUM: 12:04 EFTPOS 1759 (c)
MEDIUM: Purchase $44.00
NEW_LINE
MEDIUM: 12:18 EFTPOS 5161 (c)
MEDIUM: Purchase $43.40
NEW_LINE
MEDIUM: 12:21 MasterCard 7826 (c)
MEDIUM: Purchase $69.95
NEW_LINE
MEDIUM: 12:58 MasterCard 9977 (c)
MEDIUM: Purchase $54.90
NEW_LINE
MEDIUM: 13:06 EFTPOS 1090 (c)
MEDIUM: Purchase $6.95
NEW_LINE
MEDIUM: 13:12 Visa 3527 (c)
MEDIUM: Purchase $27.00
NEW_LINE
MEDIUM: 13:14 EFTPOS 4795 (s)
MEDIUM: Purchase $25.90
NEW_LINE
MEDIUM: 13:22 EFTPOS 4709 (s)
MEDIUM: Purchase $10.08
NEW_LINE
MEDIUM: 13:33 Amex 4264 (s)
MEDIUM: Purchase $69.95
NEW_LINE
MEDIUM: 13:45 Visa 0930 (s)
MEDIUM: Purchase $29.95
NEW_LINE
MEDIUM: 14:04 Amex 8661 (s)
MEDIUM: Purchase $11.95
NEW_LINE
MEDIUM: 14:15 Visa 2066 (c)
MEDIUM: Purchase $32.30
NEW_LINE
MEDIUM: 14:16 Amex 3005 (s)
MEDIUM: Purchase $53.60
NEW_LINE
MEDIUM: 14:49 EFTPOS 4739 (s)
MEDIUM: Purchase $21.95
NEW_LINE
MEDIUM: 15:06 EFTPOS 4709 (c)
MEDIUM: Purchase $8.95
NEW_LINE
MEDIUM: 15:08 Visa 2369 (c)
MEDIUM: Purchase $46.85
NEW_LINE
MEDIUM: 15:30 EFTPOS 9475 (s)
MEDIUM: Purchase $19.75
NEW_LINE
MEDIUM: 15:36 Amex 0043 (s)
MEDIUM: Purchase $59.95
NEW_LINE
MEDIUM: 16:02 EFTPOS 2923 (s)
MEDIUM: Purchase $24.95
NEW_LINE
MEDIUM: 16:40 EFTPOS 2410 (c)
MEDIUM: Purchase $21.95
NEW_LINE
MEDIUM: 16:44 Visa 3895 (c)
MEDIUM: Purchase $58.60
NEW_LINE
MEDIUM: 16:49 EFTPOS 3750 (s)
MEDIUM: Purchase $12.95
NEW_LINE
MEDIUM: 16:50 EFTPOS 3750 (s)
MEDIUM: Purchase $22.90
NEW_LINE
MEDIUM: 17:34 EFTPOS 8617 (c)
MEDIUM: Purchase $49.55
NEW_LINE
SMALL: s: swiped, c: chip, m: manual
SMALL: e: express payment
NEW_LINE
LARGE_CENTRED: SUMMARY REPORT
MEDIUM: Purchase 30 $1,139.88
MEDIUM: Cash out (0) $0.00
MEDIUM: Tip (0) $0.00
MEDIUM: Refund 1 -$39.95
MEDIUM: Void 0 $0.00
MEDIUM_RIGHT: ------------
MEDIUM: NET TOTAL 31 $1,099.93
NEW_LINE
MEDIUM: EFTPOS 16 $469.93
MEDIUM: Visa 5 $194.70
MEDIUM: MasterCard 4 $259.90
MEDIUM_RIGHT: ------------
MEDIUM: TYRO TOTAL 25 $924.53
NEW_LINE
MEDIUM: AMEX 6 $175.40
MEDIUM: JCB 0 $0.00
MEDIUM: Diners 0 $0.00
MEDIUM_RIGHT: ------------
MEDIUM: NET TOTAL 31 $1,099.93
NEW_LINE
FORM_FEED