Headless Interface
Extra methods and events for the "Headless API" (using interface Tyro.Integ.ITerminalAdapterHeadless):
- AttemptCancel(): Attempts to cancel the current transaction. Passes a cancel transaction instruction to the terminal. The terminal will cancel the transaction if possible. Calling this method does not guarantee that the transaction can be cancelled. Check the transaction result in the TransactionCompleted event.
-
NewMessage: When a new status message is shown on the terminal's screen, an event will be raised containing the message. The POS should show this message to the user and optionally show the history of previous messages as well. The text should not be used for any other purpose other than showing on the POS screen. The text and order can vary between terminal software versions. The data object associated with the event offers a number of methods including:
- String GetText(): Returns the text of the message (e.g. Swipe / Insert Card. Purchase $100.00)
-
QuestionAsked: Similar to NewMessage however the message is in the form of a question. The question should be shown on the screen along with the set of possible answers for the user to select from. The text should not be used for any other purpose other than showing on the POS screen. The text and order can vary between terminal software versions. The data object associated with the event offers a number of methods including:
- String GetText(): Returns the text of the question (e.g. APPROVED W/ SIGNATURE. Signature OK?)
- String[] GetAnswers(): Returns the set of possible options that can be used to answer the question (e.g. YES, NO)
- String GetAnswersCommaDelimited(): Returns the set of possible options as a comma separated String.
Handling answers to questions for the "Headless API"
When using the Headless API, you will use the additional events (NewMessage and QuestionAsked) to create a User Interface similar in function to the UI provided by the TTA but with the look and feel of your POS. Typically, the POS will show the text of each NewMessage os the screen as it comes through. Also when each QuestionAsked event is received, the text for the question is shown on the screen and for each answer in the GetAnswers array, a button is shown with the answer as the button label. The POS needs to be able to handle one, two or three buttons to be able to pass certification. Once the user selects the answer to a question, the POS will send the answer through by calling the AnswerQuestion(answer) method.
Extra Data Details
Parameter name | Description | |
---|---|---|
approval-code | The approval code for the transaction. This is the same value as that printed on the receipt. | |
base-amount | The amount for the transaction in the base currency | |
base-currency | The base currency for the transaction | |
card-currency | The currency that the customer elect to "pay" for the transaction in, therefore accepting the exchange rate offered. | |
card-type | The card type, as a string. May be "EFTPOS", "Visa", "MasterCard", "American Express", "Diners Club", "JCB","UnionPay" or "Afterpay" (but changes as other card type are accepted). | |
exchange-rate | The exchange rate that the customer agreed to use, that is used to convert from. Only present if DCC was used. | |
issuer-action-code | The action code for the transaction, as given by the issuer. NOTE: this should not be used for determining if the transaction was successful or not. GetResult should be used instead | |
mid | The Merchant ID used in this transaction | |
tid | The Terminal ID used in this transaction | |
elided-pan | The elided PAN of the card used in the transaction, showing only the last four digits, with the rest of the digits as "X"s. | |
pan-length | The length of the PAN of the card used in the transaction | |
response-message | The human readable interpretation of the issuer action code. NOTE: this should not be used for determining if the transaction was successful or not. GetResult should be used instead. | |
rrn | The RRN (Retrieval Reference Number) for this transaction | |
erminal-transactionlocal-date-time | The date and time that the transaction was submitted by the Tyro Terminal for authorisation, as recorded by the Tyro Terminal. Format: YYYYMMDDHHMMSSZZZZZ. | |
transaction-amount | The transaction amount, in the currency selected for this transaction | |
transaction-currency | The transaction currency selected for this transaction | |
transactionreferenc | The transaction reference for this transaction | |
transaction-type | The transaction type of this transaction. Could be purchase or refund | |
transmission-datetime | The time that the transaction was transmitted to the issuer by the Tyro Systems, according to the time within Tyro. Format: YYYYMMDDHHMMSSZZZZZ |