# MTSCRA Class Methods - 51 - 61

#### getTLVVersion

Retrieves TLV version.

public string getTLVVersion()

Parameters: None&#x20;

Return Value:

String representing TLV version as a two-byte hex string.

#### getTrackDecodeStatus <a href="#id-4.52_gettrackdecodestatus" id="id-4.52_gettrackdecodestatus"></a>

Retrieves track decode status. This is a one-byte value, which indicates the status of decoding track 1. Bit position zero indicates if there was an error decoding track 1 if the bit is set to one. If it is zero, then no error occurred. If a track has data on it that is not noise, and it is not decodable, then a decode error is indicated. If a decode error is indicated, the corresponding track data length value for the track that has the error will be set to zero and no valid track data will be supplied.

public string getTrackDecodeStatus()

Parameters: None Return Value:

Track Decode Status. Consists of three 2-byte hex values representing the decode status for tracks 1, 2, and 3 (respectively from left to right). Values are:

* 00 = Track OK
* 01 = Track read Error
* 02 = Track is Blank

#### getSDKVersion <a href="#id-4.53_getsdkversion" id="id-4.53_getsdkversion"></a>

Retrieves SDK version.

public string getSDKVersion()

Parameters: None Return Value:

The version information of the SDK.

#### sendCommandToDevice <a href="#id-4.54_sendcommandtodevice" id="id-4.54_sendcommandtodevice"></a>

Send command to device.

public int sendCommandToDevice(string command)

Parameters:

<table data-header-hidden><thead><tr><th width="158" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">command</td><td valign="top">Command string to send to the device.</td></tr></tbody></table>

Return Value:

* 0 = Success
* 9 = Error
* 15 = Busy

#### 1.5         startTransaction (EMV Device Only) <a href="#id-4.55_starttransaction_-emv_device_only" id="id-4.55_starttransaction_-emv_device_only"></a>

This function starts an EMV L2 transaction for smart card.

* public int startTransaction(&#x20;
* byte timeLimit,
* byte cardType,&#x20;
* byte option,&#x20;
* byte\[] amount,
* byte transactionType,&#x20;
* byte\[] cashBack,&#x20;
* byte\[] currentCode,&#x20;
* byte reportingOption)

&#x20;Parameters:

<table data-header-hidden><thead><tr><th width="144.6666717529297" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top"></td><td valign="top"></td></tr><tr><td valign="top"></td><td valign="top"><p>Card Type to Read:</p><p>0x01 = Magnetic Stripe (as alternative to EMV L2, card swipe causes abort of EMV L2)</p><p>0x02 = Contact chip card</p><p>0x03 = Magnetic Stripe and Contact chip Card. 0x04 = Contactless chip card</p><p>0x05 = Magnetic Stripe and Contactless chip card. 0x06 = Contact chip card and Contactless chip card.</p><p>0x07 = Magnetic Stripe, Contact chip card, Contactless chip card.</p><p>Refer to Supported Device Features for supported devices.</p></td></tr></tbody></table>

<br>

&#x20;

<table data-header-hidden><thead><tr><th width="129.33334350585938" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">timeLimit</td><td valign="top">Specifies the maximum time, in seconds, allowed to complete the total transaction. This includes time for the user to insert the card, choose a language, choose an application, and online processing. If this time is exceeded, the transaction will be aborted, and an appropriate Transaction Status will be available. Value 0 is not allowed.</td></tr><tr><td valign="top">cardType</td><td valign="top"><p>Card Type to Read:</p><p>0x01 = Magnetic Stripe (as alternative to EMV L2, card swipe causes abort of EMV L2)</p><p>0x02 = Contact chip card</p><p>0x03 = Magnetic Stripe and Contact chip Card. 0x04 = Contactless chip card</p><p>0x05 = Magnetic Stripe and Contactless chip card. 0x06 = Contact chip card and Contactless chip card.</p><p>0x07 = Magnetic Stripe, Contact chip card, Contactless chip card.</p><p>Refer to Supported Device Features for supported devices.</p></td></tr><tr><td valign="top">option</td><td valign="top"><p>0x00 = Normal 0x01 = Bypass PIN 0x02 = Force Online</p><p>0x04 = Acquirer not available (Note: prevents long timeout on waiting for host approval) (causes “decline” to be generated internally if ARQC is generated)</p><p> </p><p>To use Quick Chip mode, set the most significant bit to ‘1’.</p><p>0x80 = Quick Chip, Normal 0x81 = Quick Chip, Bypass PIN 0x82 = Quick Chip, Force Online</p><p> </p><p>Refer to Supported Device Features for supported devices.</p></td></tr><tr><td valign="top">amount</td><td valign="top"><p>Amount Authorized (EMV Tag 9F02, format n12, 6 bytes) in hex string.</p><p>For example: “000000000999”, means 9.99 dollars.</p></td></tr><tr><td valign="top">transactionType</td><td valign="top"><p>Valid values:</p><p>0x00 = Purchase (listed as “Payment” on ICS)</p><p>0x01 = Cash Advance (not supported for this reader)</p><p>0x02 or 0x09 = Cash back (0x09 only supported when using contactless) 0x04 = Goods (Purchase)</p><p>0x08 = Services (Purchase)</p><p>0x10 = International Goods (Purchase) 0x20 = Refund</p><p>0x40 = International Cash Advance or Cash Back 0x80 = Domestic Cash Advance or Cash Back</p></td></tr><tr><td valign="top">cashBack</td><td valign="top"><p>Cash back Amount (if non-zero, EMV Tag 9F03, format n12, 6 bytes) in hex string.</p><p>For example: “000000001000”, means 10.00 dollars.</p></td></tr><tr><td valign="top">currencyCode</td><td valign="top"><p>Transaction Currency Code (EMV Tag 5F2A, format n4, 2 bytes) Sample Valid values:</p><p>0x0840 – US Dollar 0x0978 – Euro 0x0826 – UK Pound</p></td></tr><tr><td valign="top">reportingOption</td><td valign="top"><p>This single byte field indicates the level of Transaction Status notifications the host desires to receive during the course of this transaction.</p><p>0x00 = Termination Status only</p><p>(normal termination, card error, timeout, host cancel)</p><p> </p><p>0x01 = Major Status changes</p><p>(terminations plus card insertions and waiting on user)</p><p>0x02 = All Status changes</p><p>(documents the entire transaction flow)</p></td></tr></tbody></table>

Return Value:

* 0 = Success
* 9 = Error1
* 15 = Busy

#### setUserSelectionResult (EMV Device Only) <a href="#id-4.56_setuserselectionresult_-emv_device" id="id-4.56_setuserselectionresult_-emv_device"></a>

This function sets the user selection result. It should be called after receiving the OnUserSelectRequest event which is triggered after the user makes a selection.

public int setUserSelectionResult(byte status, byte selection)

Parameters:

<table data-header-hidden><thead><tr><th width="152.66665649414062" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top"><p> </p><p>Status</p></td><td valign="top"><p>Indicates the status of User Selection:</p><p>0x00 – User Selection Request completed, see Selection Result 0x01 – User Selection Request aborted, cancelled by user</p><p>0x02 – User Selection Request aborted, timeout</p></td></tr><tr><td valign="top">selection</td><td valign="top">Indicates the menu item selected by the user. This is a single byte zero based binary value.</td></tr></tbody></table>

Return Value:

* 0 = Success
* 9 = Error
* 15 = Busy

#### setAcquirerResponse (EMV Device Only) <a href="#id-4.57_setacquirerresponse_-emv_device_onl" id="id-4.57_setacquirerresponse_-emv_device_onl"></a>

This function sends to the device the transaction decision from acquirer.

public int setAcquirerResponse(byte\[] response)

Parameters:

<table data-header-hidden><thead><tr><th width="119.33332824707031" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top"><p> </p><p>response</p></td><td valign="top">The first two bytes (most significant byte first) indicate the total length of the following byte array. The byte array contains the ARQC Response message. See Appendix C for ARQC Response Message Format.</td></tr></tbody></table>

Return Value:

* 0 = Success
* 9 = Error
* 15 = Busy

#### cancelTransaction (EMV Device Only) <a href="#id-4.58_canceltransaction_-emv_device_only" id="id-4.58_canceltransaction_-emv_device_only"></a>

This function cancels a transaction while waiting for the user to insert a card.

public int cancelTransaction ()

Parameters: None Return Value:

* 0 = Success
* 9 = Error
* 15 = Busy

#### sendExtendedCommand (EMV Device Only)

Send extended command to device.

public int sendExtendedCommand(string command)

Parameters:

<table data-header-hidden><thead><tr><th width="142.66665649414062" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top"><p> </p><p> </p><p>command</p></td><td valign="top"><p>Hexadecimal string of the byte array for the extended command.</p><p> </p><p>The first two bytes represent the value of the extended command.</p><p>The next two bytes (most significant byte first) indicate the total length of the following data in bytes.</p></td></tr></tbody></table>

Return Value:

* 0 = Success
* 9 = Error
* 15 = Busy

#### getDeviceFeatures() <a href="#id-4.60_getdevicefeatures" id="id-4.60_getdevicefeatures"></a>

Retrieves features for the device.

public MTDeviceFeatures getDeviceFeatures()

Parameters: None&#x20;

Return Value:

```
public class MTDeviceFeatures 
    { 
        bool MSR; 
        bool Contact; 
        bool Contactless; 
        bool PINPad; 
        bool MSRPowerSaver; 
        bool BatteryBackedClock; 
        bool SRED; 
        bool SignatureCapture; 
        bool ManualEntry; }
```

#### getPowerManagementValue() <a href="#id-4.61_getpowermanagementvalue" id="id-4.61_getpowermanagementvalue"></a>

Retrieves power management value for the device.

public String getPowerManagementValue()

Parameters: None

Return Value: Returns the PM value associated with the device.

<table data-header-hidden><thead><tr><th width="195.33334350585938" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top"><p> </p><p>Power Management</p></td></tr><tr><td valign="top">BulleT KB BulleT SPP</td><td valign="top">PM1</td></tr><tr><td valign="top">cDynamo</td><td valign="top"> </td></tr><tr><td valign="top">Dynamag, Dynamag Duo, USB Enc IntelliHead V5</td><td valign="top"> </td></tr><tr><td valign="top">Dynasty</td><td valign="top">PM3</td></tr><tr><td valign="top">DynaMAX</td><td valign="top">PM2</td></tr><tr><td valign="top">DynaPAD</td><td valign="top"> </td></tr><tr><td valign="top">DynaWave</td><td valign="top"> </td></tr><tr><td valign="top">eDynamo</td><td valign="top">PM3</td></tr><tr><td valign="top">Flash</td><td valign="top">PM1</td></tr><tr><td valign="top">iDynamo</td><td valign="top"> </td></tr><tr><td valign="top">iDynamo 5</td><td valign="top"> </td></tr><tr><td valign="top">IDynamo 5 Gen III</td><td valign="top"> </td></tr><tr><td valign="top">Home Banking (Dynamo LCD)</td><td valign="top"> </td></tr><tr><td valign="top">kDynamo</td><td valign="top">PM5</td></tr><tr><td valign="top">mDynamo</td><td valign="top"> </td></tr><tr><td valign="top">P-series and I-65 w/V5</td><td valign="top"> </td></tr><tr><td valign="top">pDynamo</td><td valign="top">PM6</td></tr><tr><td valign="top">sDynamo</td><td valign="top"> </td></tr><tr><td valign="top">SPI Encrypting IntelliHead V5</td><td valign="top"> </td></tr><tr><td valign="top">tDynamo</td><td valign="top">PM5</td></tr><tr><td valign="top">UART Enc IntelliHead V5</td><td valign="top"> </td></tr><tr><td valign="top">uDynamo</td><td valign="top">PM4</td></tr><tr><td valign="top">U-Finity</td><td valign="top">PM1</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.magtek.com/hardware/card-readers/magnetic-stripe-readers/idynamo-5-gen-iii/documentation/developers-manuals/programmers-manual-.net-pcl/mtscra-class-methods/mtscra-class-methods-51-61.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
