Skip to content

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 on 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 nameDescription
approval-codeThe approval code for the transaction. This is the same value as that printed on the receipt.
base-amountThe amount for the transaction in the base currency.
base-currencyThe base currency for the transaction.
card-currencyThe currency that the customer elects to "pay" for the transaction in, therefore accepting the exchange rate offered.
card-typeThe card type, as a string. May be "EFTPOS", "Visa", "MasterCard", "American Express", "Diners Club", "JCB", "UnionPay", or "Afterpay" (this may change as other card types are accepted).
exchange-rateThe exchange rate that the customer agreed to use, used to convert from. Only present if DCC was used.
issuer-action-codeThe action code for the transaction, as given by the issuer. NOTE: Do not use this to determine if the transaction was successful. Use GetResult instead.
midThe Merchant ID used in this transaction.
tidThe Terminal ID used in this transaction.
elided-panThe 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-lengthThe length of the PAN of the card used in the transaction.
response-messageThe human-readable interpretation of the issuer action code. NOTE: Do not use this to determine if the transaction was successful. Use GetResult instead.
rrnThe RRN (Retrieval Reference Number) for this transaction.
terminal-transaction-local-date-timeThe date and time that the transaction was submitted by the Tyro Terminal for authorisation, as recorded by the terminal. Format: YYYYMMDDHHMMSSZZZZZ.
transaction-amountThe transaction amount, in the currency selected for this transaction.
transaction-currencyThe transaction currency selected for this transaction.
transaction-referenceThe transaction reference for this transaction.
transaction-typeThe transaction type of this transaction. Could be purchase or refund.
transmission-date-timeThe time that the transaction was transmitted to the issuer by Tyro Systems. Format: YYYYMMDDHHMMSSZZZZZ.