> For the complete documentation index, see [llms.txt](https://developer.magtek.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.magtek.com/sdks-and-tools/universal-sdk-documentation/linux/data-classes.md).

# Data Classes

## BarCodeBuilder

This class assists in building a BarcodeData from OnEvent().

{% code overflow="wrap" %}

```
BarCodeData GetBarCodeData( 
        MTU_DEVICE_TYPE deviceType, 
        vector<unsigned char> dataBytes);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="138.3636474609375" valign="top"></th><th width="213.5455322265625"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">BarCodeData</td></tr><tr><td valign="top">Member</td><td>Type/ Format</td><td>Description</td></tr><tr><td valign="top">deviceType</td><td>MTU_DEVICE_TYPE</td><td>Device Type enum.</td></tr><tr><td valign="top">dataBytes</td><td>vector&#x3C;unsigned char></td><td><p>Data from OnEvent()</p><p>EVENT_TYPE_BarCodeData</p></td></tr></tbody></table>

## BarCodeData <a href="#id-10.2_barcodedata" id="id-10.2_barcodedata"></a>

These constructors initialize a BarCodeData object.

{% code overflow="wrap" %}

```
BarCodeData();
```

{% endcode %}

{% code overflow="wrap" %}

```
BarCodeData(
        vector<unsigned char> data, 
        bool encrypted,
        unsigned char encryptionType = 0,
        vector<unsigned char> ksn = vector<unsigned char>());
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="145.6363525390625" valign="top"></th><th width="211.4544677734375"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">BarCodeData</td></tr><tr><td valign="top">Member</td><td>Type/ Format</td><td>Description</td></tr><tr><td valign="top">Data</td><td>vector&#x3C;unsigned char></td><td>Data payload</td></tr><tr><td valign="top">Encrypted</td><td>bool</td><td>0x00 = data is not encrypted 0x01 = data is encrypted</td></tr><tr><td valign="top">EncryptionType</td><td>unsigned char</td><td>Encryption type</td></tr><tr><td valign="top">KSN</td><td>vector&#x3C;unsigned char></td><td>Key Serial Number</td></tr><tr><td valign="top">BarCodeData()</td><td> </td><td>Initializer.</td></tr></tbody></table>

## BarCodeRequest <a href="#id-10.3_barcoderequest" id="id-10.3_barcoderequest"></a>

These constructors initialize a BarCodeRequest object.

{% code overflow="wrap" %}

```
BarCodeRequest(
```

{% endcode %}

{% code overflow="wrap" %}

```
BarCodeType type, 
        BarCodeFormat format, 
        vector<unsigned char> data);
```

{% endcode %}

{% code overflow="wrap" %}

```
BarCodeRequest( 
        BarCodeType type, 
        BarCodeFormat format, 
        vector<unsigned char> data,
        vector<unsigned char> blockColor, 
        vector<unsigned char> backgroundColor, 
        unsigned char errorCorrection = 0x00, 
        unsigned char maskPattern = 0xFF, 
        unsigned char minVersion = 0x01, 
        unsigned char maxVersion = 0x28);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="162.90911865234375" valign="top"></th><th width="211.54541015625"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">BarCodeRequest</td></tr><tr><td valign="top">Member</td><td>Type/ Format</td><td>Description</td></tr><tr><td valign="top">Type</td><td>BarCodeType</td><td>Enum to specify the type of barcode</td></tr><tr><td valign="top">Format</td><td>BarCodeFormat</td><td>Enum to specify the barcode format</td></tr><tr><td valign="top">Data</td><td>vector&#x3C;unsigned char></td><td>Data to encode into a barcode</td></tr><tr><td valign="top">BlockColor</td><td>vector&#x3C;unsigned char></td><td>Block color. Use RRGGBB format. 0x00,0x00,0x00 = Black</td></tr><tr><td valign="top">BackgroundColor</td><td>vector&#x3C;unsigned char></td><td>Background color. Use RRGGBB format. 0xFF,0xFF,0xFF = White</td></tr><tr><td valign="top">ErrorCorrection</td><td>unsigned char</td><td><p>Error Correction </p><ul><li>0x00 = Low (default) </li><li>0x01 = Medium </li><li>0x02 = Quartile </li><li>0x03 = High</li></ul><p>See ISO/IEC 18004:2015</p></td></tr><tr><td valign="top">MaskPattern</td><td>unsigned char</td><td><p>Mask Pattern</p><ul><li>0x00 to 0x07 = Mask Pattern</li><li>0xFF = Device Select Optimal Mask Pattern (default) </li></ul><p>See ISO/IEC 18004:2015</p></td></tr><tr><td valign="top">MinVersion</td><td>unsigned char</td><td><p>Minimum Version. Must be less than or equal to Maximum Version.</p><p>0x01 to 0x28 = Version 1 to Version 40 (0x01 is default)</p><p>See ISO/IEC 18004:2015</p></td></tr><tr><td valign="top">MaxVersion</td><td>unsigned char</td><td><p>Maximum Version. Must be greater than or equal to Minimum Version.</p><p>0x01 to 0x28 = Version 1 to Version 40 (0x28 is default)</p><p>See ISO/IEC 18004:2015</p></td></tr><tr><td valign="top">BarCodeRequest()</td><td> </td><td>Initializer.</td></tr></tbody></table>

## CertificateInfo <a href="#id-10.4_certificateinfo" id="id-10.4_certificateinfo"></a>

CertificateInfo is used for the connection to a devices requiring client credentials. See the following for details on installing a certificate chain: <mark style="color:red;">**DYNAFLEX TLS CERTIFICATE INSTALLATION MANUAL**</mark>

<table data-header-hidden><thead><tr><th width="145.63641357421875" valign="top"></th><th width="206"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">CertificateInfo</td></tr><tr><td valign="top">Member</td><td>Type/ Format</td><td>Description</td></tr><tr><td valign="top">format</td><td>string</td><td>Certificate data format. “PKCS12” – for .p12 file. “PFX” – for .pfx file.</td></tr><tr><td valign="top">Data</td><td>vector&#x3C;unsigned char></td><td>Certificate data</td></tr><tr><td valign="top">Password</td><td>string</td><td>Password to access the certificate data.</td></tr></tbody></table>

## ConnectionStateBuilder <a href="#id-10.5_connectionstatebuilder" id="id-10.5_connectionstatebuilder"></a>

This class assist in parsing ConnectionState event data from OnEvent().

{% code overflow="wrap" %}

```
ConnectionState GetValue(string data); string GetString(ConnectionState value);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="270.1817626953125" valign="top"></th><th width="157.54541015625"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">Member</td><td>Return</td><td>Description</td></tr><tr><td valign="top">GetValue(string data)</td><td>ConnectionState</td><td>Returns the ConnectionState enumeration.</td></tr><tr><td valign="top">GetString(NFCEvent value)</td><td>string</td><td>Returns a string representation of ConnectionState enumeration.</td></tr><tr><td valign="top">MTUSDKCS_DISCONNECTED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKCS_CONNECTING</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKCS_ERROR</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKCS_CONNECTED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKCS_DISCONNECTING</td><td>string</td><td> </td></tr></tbody></table>

## DeviceEventBuilder <a href="#id-10.6_deviceeventbuilder" id="id-10.6_deviceeventbuilder"></a>

This class assist in parsing DeviceEvent data from OnEvent().

{% code overflow="wrap" %}

```
DeviceEvent GetValue(string valueString); 
string GetString(DeviceEvent UserEvent);
```

{% endcode %}

## FeatureStatusBuilder <a href="#id-10.7_featurestatusbuilder" id="id-10.7_featurestatusbuilder"></a>

This class assist in parsing device features.

{% code overflow="wrap" %}

```
DeviceFeature GetDeviceFeature(string data); 
FeatureStatus GetFeatureStatus(string data); 
string GetFeatureString(DeviceFeature value); 
string GetStatusString(FeatureStatus value)
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="312.90911865234375" valign="top"></th><th width="152.9090576171875"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">Member</td><td>Return</td><td>Description</td></tr><tr><td valign="top">GetDeviceFeature(string data)</td><td>DeviceFeature</td><td>Returns device feature.</td></tr><tr><td valign="top">GetFeatureStatus(string data)</td><td>FeatureStatus</td><td>Returns feature status.</td></tr><tr><td valign="top">GetFeatureString(DeviceFature data)</td><td>string</td><td>Returns the feature.</td></tr><tr><td valign="top">GetStatusString(FeatureStatus value)</td><td>string</td><td>Returns a status.</td></tr><tr><td valign="top">FEATURE_PIN_ENTRY</td><td>string</td><td> </td></tr><tr><td valign="top">FEATURE_PAN_ENTRY</td><td>string</td><td> </td></tr><tr><td valign="top">FEATURE_SIGNATURE_CAPTURE</td><td>string</td><td> </td></tr><tr><td valign="top">FEATURE_SHOW_BAR_CODE</td><td>string</td><td> </td></tr><tr><td valign="top">FEATURE_SCAN_BAR_CODE</td><td>string</td><td> </td></tr><tr><td valign="top">STATUS_SUCCESS</td><td>string</td><td> </td></tr></tbody></table>

<table data-header-hidden><thead><tr><th valign="top"></th><th></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">STATUS_FAILED</td><td>string</td><td> </td></tr><tr><td valign="top">STATUS_TIMED_OUT</td><td>string</td><td> </td></tr><tr><td valign="top">STATUS_CANCELLED</td><td>string</td><td> </td></tr><tr><td valign="top">STATUS_ERROR</td><td>string</td><td> </td></tr><tr><td valign="top">STATUS_HARDWARE_NA</td><td>string</td><td> </td></tr></tbody></table>

## IData <a href="#id-10.8_idata" id="id-10.8_idata"></a>

IData is used for the payload of events and passing data to functions. When assigning the member StringValue, the member ByteArray is automatically assigned. Same is true vice versa. In this way either a string or an array can be accessed without need of data conversion.

{% code overflow="wrap" %}

```
IData(); 
IData(string Value);
IData(vector<unsigned char> Value);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="118.36358642578125" valign="top"></th><th width="216.272705078125"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">IData</td></tr><tr><td valign="top">Member</td><td>Type/ Format</td><td>Description</td></tr><tr><td valign="top">StringValue</td><td>string</td><td>String value</td></tr><tr><td valign="top">ByteArray</td><td>vector&#x3C;unsigned char></td><td>Byte array</td></tr><tr><td valign="top">IData()</td><td> </td><td>Initializer</td></tr></tbody></table>

## ImageData <a href="#id-10.9_imagedata" id="id-10.9_imagedata"></a>

These constructors initialize a ImageData object.

{% code overflow="wrap" %}

```
ImageData( 
        ImageType type, 
        vector<unsigned char> data);
```

{% endcode %}

{% code overflow="wrap" %}

```
ImageData(
        ImageType type, 
        vector<unsigned char> data,
        vector<unsigned char> backgroundColor);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="105.63641357421875" valign="top"></th><th width="152.3636474609375"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">IData</td></tr><tr><td valign="top">Member</td><td>Type/ Format</td><td>Description</td></tr><tr><td valign="top">Type</td><td>ImageType</td><td><p>Enum for image type. Usage:</p><p>BITMAP = BMP file</p></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="176.54541015625" valign="top"></th><th width="229.0909423828125"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">IData</td></tr><tr><td valign="top">Data</td><td>vector&#x3C;unsigned char></td><td><p>Image encoded data.</p><p> </p><p>Images must be BMP format, 160KB or smaller with no compression, maximum 320px by 240px, with color depth 16 color, 256 color, 16-bit color, or 24-bit color. Images smaller than the maximum size are centered on the display. Note images at full screen size must be 16-bit color or lower to meet the size requirement.</p><p> </p><p>For details see <mark style="color:red;"><strong>DynaFlex Family Programmer’s Manual</strong></mark></p></td></tr><tr><td valign="top">BackgroundColor</td><td>vector&#x3C;unsigned char></td><td><p>Background color in RRGGBB format.</p><ul><li>0x00,0x00,0x00 = Black </li><li>0xFF,0xFF,0xFF = White</li></ul></td></tr><tr><td valign="top">ImageData()</td><td> </td><td>Initializer</td></tr></tbody></table>

## ITransaction <a href="#id-10.10_itransaction" id="id-10.10_itransaction"></a>

This is the interface used as the parameter for startTransaction(). For an example, see API Walk Through.

<table data-header-hidden><thead><tr><th width="162.90911865234375" valign="top"></th><th width="135.181884765625"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">ITransaction</td></tr><tr><td valign="top">Member</td><td>Type/ Format</td><td>Description</td></tr><tr><td valign="top">PaymentMethods</td><td>int</td><td><p>List of the PaymentMethod enumeration.</p><p> </p><p>Usage:</p><p>PAYMENT_METHOD_MSR - For magnetic stripe cards. PAYMENT_METHOD_Contact - For EMV chip cards. PAYMENT_METHOD_Contactless - For NFC contactless cards.</p><p>PAYMENT_METHOD_ManualEntry - For user to manually enter transaction data without any card access. When set to ManualEntry, the other payment methods do not apply.</p><p>PAYMENT_METHOD_BARCODE - For Barcode.</p><p>PAYMENT_METHOD_BARCODE_ENCRYPTED - For</p><p>encrypted Barcode. PAYMENT_METHOD_APPLE_VAS - For Apple VAS. PAYMENT_METHOD_NFC - For NFC tag.</p></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="130.18182373046875" valign="top"></th><th width="142.09088134765625"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">ITransaction</td></tr><tr><td valign="top">QuickChip</td><td>bool</td><td><p>In QuickChip mode, the device does not prompt for an amount. Device sends an ARQC request to the host. Device automatically populates the ARPC response data with EMV Tag 8A set to “Z3”. Card holder is prompted to remove the card. Transaction result is later determined by the processor and not by the card.</p><p> </p><p>Usage:</p><p>false - Do not enable QuickChip mode.</p><p>true - Enable QuickChip mode. Default.</p></td></tr><tr><td valign="top">Timeout</td><td>unsigned char</td><td><p>Transaction timeout in seconds. Default is 60 seconds.</p><p> </p><p>Usage:</p><p>0 to 255 - Depending on the device, 0 means no timeout.</p></td></tr><tr><td valign="top">Amount</td><td>string Max 13</td><td><p>EMV Tag 9F02 - Authorized amount of the transaction.</p><p> </p><p>Example:</p><p>“1.23” – $1.23</p><p>“10” – $10.00</p></td></tr><tr><td valign="top">CashBack</td><td>string Max 13</td><td><p>EMV Tag 9F03 - Secondary amount associated with the transaction.</p><p>Example:</p><p>“1.23” – $1.23</p><p>“10” – $10.00</p></td></tr><tr><td valign="top">CurrenyCode</td><td>vector&#x3C;unsigned char> 2</td><td><p>EMV Tag 5F2A - Currency code of the transaction according to ISO 4217. The byte array is null by default.</p><p> </p><p>Example:</p><p>0x0840 = US Dollar 0x0978 = Euro 0x0826 = UK Pound</p></td></tr><tr><td valign="top">CurrencyExponent</td><td>vector&#x3C;unsigned char> 1</td><td><p>EMV Tag 5F36 - The decimal point position from the right of the transaction amount. The byte array is null by default.</p><p>Example:</p><p>0x02 – decimal point at 2 position from the right.</p></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="129.27276611328125" valign="top"></th><th width="101.27276611328125"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">ITransaction</td></tr><tr><td valign="top">EMVOnly</td><td>bool</td><td><p>Flag that determines whether or not to start a transaction in EMV mode. This takes effect for devices which support both MSR and EMV mode (not limited to eDynamo, tDynamo, and DynaPro Family). This has no effect on non EMV devices.</p><p>Usage:</p><p>false - Do not start transaction in EMV mode.</p><p>true - Only start transaction in EMV mode. Default.</p></td></tr><tr><td valign="top">PreventMSRSignatureF orCardWithICC</td><td>bool</td><td><p>Flag that forces the device to skip signature capture during an MSR-only transaction if the card’s service code indicates it is a chip card.</p><p> </p><p>Usage:</p><p>false - Allow the prompt for a signature if requested.</p><p>true - Do not prompt for signature.</p></td></tr><tr><td valign="top">SuppressThankYouMes sage</td><td>bool</td><td><p>By default, devices with a display signal the end of a transaction by briefly showing “THANK YOU,” then “WELCOME.”</p><p> </p><p>Usage:</p><p>false - Do not suppress the thank you message.</p><p>true - Suppress the thank you message.</p></td></tr><tr><td valign="top">DisplayAmountForQuic kChip</td><td>bool</td><td><p>Display Amount for Quick Chip Transaction Flow.</p><p> </p><p>false = Do not display Amount when QuickChip mode is true. Default.</p><p>true = Display Amount when QuickChip mode is true.</p></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="196.54547119140625" valign="top"></th><th width="135.45458984375" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">OverrideFinalTransacti onMessage</td><td valign="top">unsigned char</td><td valign="top">By default, devices with a display signal the end of a transaction by returning to the idle page and showing “WELCOME.” This parameter directs the device to show a message based on the Message ID from the command displayMessage(). This option completely overrides the device’s idle page behavior until the next transaction, power cycle, or other similar state change.</td></tr><tr><td valign="top"> </td><td valign="top"> </td><td valign="top"><p>Usage:</p><ul><li>0x00 - reserved, do not use. </li><li>0x01 - “AMOUNT”</li><li>0x02 - “AMOUNT OK?”</li><li>0x03 - “APPROVED”</li><li>0x04 - “CALL YOUR BANK”</li><li>0x05 - “CANCEL OR ENTER”</li><li>0x06 - “CARD ERROR”</li><li>0x07 - “DECLINED”</li><li>0x08 - “ENTER AMOUNT”</li><li>0x09 - reserved, do not use. </li><li>0x0A - reserved, do not use. </li><li>0x0B - “INSERT CARD”</li><li>0x0C – “NOT ACCEPTED”</li><li>0x0D - reserved, do not use. </li><li>0x0E - “PLEASE WAIT”</li><li>0x0F - “PROCESSING ERROR”</li><li>0x10 - “REMOVE CARD”</li><li>0x11 - “USE CHIP READER”</li><li>0x12 - “USE MAGSTRIPE”</li><li>0x13 - “TRY AGAIN”</li><li>0x14 - “WELCOME”</li><li>0x15 - “PRESENT CARD”</li><li>0x16 - “PROCESSING”</li><li>0x17 - “CARD READ OK - REMOVE CARD”</li><li>0x18 - “INSERT OR SWIPE CARD”</li><li>0x19 - “PRESENT ONE CARD ONLY”</li><li>0x1A - “APPROVED PLEASE SIGN”</li><li>0x1B - “AUTHORIZING PLEASE WAIT”</li><li>0x1C - “INSERT, SWIPE OR TRY ANOTHER CARD”</li><li>0x1D - “PLEASE INSERT CARD”</li><li>0x1E - Null prompt (empty screen) 0x1F - reserved, do not use.</li><li>0x20 - “SEE PHONE”</li><li>0x21 - “PRESENT CARD AGAIN”</li><li>0x22 - “INSERT/SWIPE/TRY OTHER CARD”</li><li>0x23 - “TAP or SWIPE CARD”</li><li>0x24 - “TAP or INSERT CARD”</li><li>0x25 - “TAP, INSERT or SWIPE CARD”</li><li>0x26 - “TAP CARD”</li><li>0x27 - “TIMEOUT”</li><li>0x28 - “TRANSACTION TERMINATED”</li></ul></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="190.18182373046875" valign="top"></th><th width="243"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">ITransaction</td></tr><tr><td valign="top">EMVResponseFormat</td><td>unsigned char</td><td><p>The format of the EMV response.</p><p> </p><p>Usage:</p><p>0x00 – Legacy. Default. 0x01 – RFU</p></td></tr><tr><td valign="top">MerchantCategory</td><td>vector&#x3C;unsigned char> 2</td><td>EMV Tag 9F15 - The type of business being done by the merchant, represented according to ISO 18245. The byte array is null by default.</td></tr><tr><td valign="top">MerchantCustomData</td><td>vector&#x3C;unsigned char> 20</td><td>EMV Tag 9F7C – Proprietary merchant data that may be requested. The byte array is null by default.</td></tr><tr><td valign="top">MerchantID</td><td>vector&#x3C;unsigned char> 15</td><td>EMV Tag 9F16 - Used to uniquely identify a given merchant. The byte array is null by default.</td></tr><tr><td valign="top">TransactionCategory</td><td>vector&#x3C;unsigned char> 1</td><td>EMV Tag 9F53 - The type of contactless transaction being performed. The byte array is null by default.</td></tr><tr><td valign="top">TransactionType</td><td>byte 1</td><td><p>EMV Tag 9C - The type of financial transaction, represented by the first two digits of the ISO 8583:1987 Processing Code.</p><p> </p><p>Usage:</p><ul><li>0x00 – purchase. Default.</li><li>0x01 – cash advance</li><li>0x09 – purchase with cashback</li><li>0x20 – refund</li></ul><p>Supported transaction types can found in the commands programmers manual specific to the device.</p></td></tr><tr><td valign="top">ManualEntryType</td><td>unsigned char</td><td><p>User interface sequence.</p><p> </p><p>Usage:</p><ul><li>0x00 - Card Number, Expiration Date, Security Code </li><li>0x01 - Name on Card, Card Number, Expiration Date, Security Code (Reserved for Future Use)</li><li>0x02 – Qwick Code, Last 4 digits of Card Number, Security Code (Reserved for future use)</li></ul></td></tr><tr><td valign="top">ManualEntryFormat</td><td>unsigned char</td><td><p>Card number valid format.</p><p> </p><p>Usage:</p><p>0x00 - PAN min 8, max 21 digits</p></td></tr><tr><td valign="top">ManualEntrySound</td><td>unsigned char</td><td><p>Beeper feedback.</p><p> </p><p>Usage:</p><p>0x00 - On keypress sound disabled</p><p>0x01 - On keypress sound enabled</p></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="172.9090576171875" valign="top"></th><th width="159.272705078125"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">ITransaction</td></tr><tr><td valign="top">AppleVASMode</td><td>VASMode</td><td><p>enum VASMode : int</p><p>{</p><p>VASMode_Single = 1,</p><p>VASMode_Dual = 2,</p><p>VASMode_VASOnly = 3,</p><p>};</p></td></tr><tr><td valign="top">AppleVASProtocol</td><td>VASProtocol</td><td><p>enum VASProtocol : int</p><p>{</p><p>VASProtocol_URL = 1,</p><p>VASProtocol_Full = 2,</p><p>};</p></td></tr><tr><td valign="top">TipMode</td><td>byte</td><td><p>Tip mode.</p><p> </p><ul><li>0x00 = Disable Tip Mode</li><li>0x01 = Show Tip GUI immediately using %</li><li>0x02 = Show Tip GUI immediately using $</li><li>0x11 = Enable Read Channel(s), with +Tip Button using %</li><li>0x12 = Enable Read Channel(s), with +Tip Button, using $</li></ul></td></tr><tr><td valign="top">Tip1DisplayMode</td><td>byte</td><td><p>Display mode for Tip button 1.</p><ul><li>0x00 = % or $</li><li>0x01 = Display Custom </li><li>0x02 = Display NO TIP </li><li>0x03 = Disabled</li></ul></td></tr><tr><td valign="top">Tip2DisplayMode</td><td>byte</td><td><p>Display mode for Tip button 2.</p><ul><li>0x00 = % or $</li><li>0x01 = Display Custom </li><li>0x02 = Display NO TIP </li><li>0x03 = Disabled</li></ul></td></tr><tr><td valign="top">Tip3DisplayMode</td><td>byte</td><td><p>Display mode for Tip button 3.</p><ul><li>0x00 = % or $</li><li>0x01 = Display Custom </li><li>0x02 = Display NO TIP </li><li>0x03 = Disabled</li></ul></td></tr><tr><td valign="top">Tip4DisplayMode</td><td>byte</td><td><p>Display mode for Tip button 4.</p><ul><li>0x00 = % or $</li><li>0x01 = Display Custom </li><li>0x02 = Display NO TIP </li><li>0x03 = Disabled</li></ul></td></tr><tr><td valign="top">Tip5DisplayMode</td><td>byte</td><td><p>Display mode for Tip button 5.</p><ul><li>0x00 = % or $</li><li>0x01 = Display Custom </li><li>0x02 = Display NO TIP </li><li>0x03 = Disabled</li></ul></td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="163.81817626953125" valign="top"></th><th width="149.727294921875"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">ITransaction</td></tr><tr><td valign="top">Tip6DisplayMode</td><td>byte</td><td><p>Display mode for Tip button 6.</p><p>0x00 = % or $</p><p>0x01 = Display Custom 0x02 = Display NO TIP 0x03 = Disabled</p></td></tr><tr><td valign="top">Tip1Value</td><td>string Max 7</td><td><p>Display value for Tip button 1.</p><p>“1.00” = $1.00 (Display Mode is $)</p><p>“10.0001” = 10.0001% (Display Mode is %)</p></td></tr><tr><td valign="top">Tip2Value</td><td>string Max 7</td><td><p>Display value for Tip button 2.</p><p>“1.00” = $1.00 (Display Mode is $)</p><p>“10.0001” = 10.0001% (Display Mode is %)</p></td></tr><tr><td valign="top">Tip3Value</td><td>string Max 7</td><td><p>Display value for Tip button 3.</p><p>“1.00” = $1.00 (Display Mode is $)</p><p>“10.0001” = 10.0001% (Display Mode is %)</p></td></tr><tr><td valign="top">Tip4Value</td><td>string Max 7</td><td><p>Display value for Tip button 4.</p><p>“1.00” = $1.00 (Display Mode is $)</p><p>“10.0001” = 10.0001% (Display Mode is %)</p></td></tr><tr><td valign="top">Tip5Value</td><td>string Max 7</td><td><p>Display value for Tip button 5.</p><p>“1.00” = $1.00 (Display Mode is $)</p><p>“10.0001” = 10.0001% (Display Mode is %)</p></td></tr><tr><td valign="top">Tip6Value</td><td>string Max 7</td><td><p>Display value for Tip button 6.</p><p>“1.00” = $1.00 (Display Mode is $)</p><p>“10.0001” = 10.0001% (Display Mode is %)</p></td></tr><tr><td valign="top">TaxAmount</td><td>string Max 7</td><td><p>Tax amount.</p><p>“1.00” = $1.00</p></td></tr></tbody></table>

## NFCAPDUData <a href="#id-10.11_nfcapdudata" id="id-10.11_nfcapdudata"></a>

This class assist in parsing NFCAPDU data from OnEvent().

{% code overflow="wrap" %}

```
vector<unsigned char> Response;
```

{% endcode %}

{% code overflow="wrap" %}

```
NFCRAPDUData() : NFCData(vector<unsigned char>()) {}
```

{% endcode %}

{% code overflow="wrap" %}

```
NFCRAPDUData( 
        vector<unsigned char> response, 
        vector<unsigned char> data, 
        bool encrypted,
        unsigned char encryptionType, 
        vector<unsigned char> ksn)
                                : NFCData(data, encrypted, encryptionType, ksn)
                        {
                                Response = response;
                        }
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="120.18182373046875" valign="top"></th><th width="210.727294921875"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">Member</td><td>Return</td><td>Description</td></tr><tr><td valign="top">Response</td><td>vector&#x3C;unsigned char></td><td> </td></tr><tr><td valign="top"> </td><td> </td><td> </td></tr><tr><td valign="top">dataBytes</td><td>vector&#x3C;unsigned char></td><td><p>Data from the OnEvent()</p><p>EVENT_TYPE_NFCData.</p></td></tr></tbody></table>

## NFCData <a href="#id-10.12_nfcdata" id="id-10.12_nfcdata"></a>

This class assist in parsing NFCAPDU data from OnEvent().

{% code overflow="wrap" %}

```
NFCData(vector<unsigned char> data)
                                :Data(data), KSN(vector<unsigned char>()), 
                                Encrypted(false), EncryptionType(0)
                {
                }
```

{% endcode %}

{% code overflow="wrap" %}

```
NFCData(
        vector<unsigned char> data, 
        bool encrypted,
        unsigned char encryptionType, 
        vector<unsigned char> ksn)
                        :Data(data), KSN(ksn), Encrypted(encrypted), 
EncryptionType(encryptionType)
                {
                }
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="155.63641357421875" valign="top"></th><th width="200.0909423828125"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">Member</td><td>Return</td><td>Description</td></tr><tr><td valign="top">Data</td><td>vector&#x3C;unsigned char></td><td>Returns the data payload.</td></tr><tr><td valign="top">KSN</td><td>vector&#x3C;unsigned char></td><td>Returns the Key Serial Number.</td></tr><tr><td valign="top">Encrypted</td><td>bool</td><td>Returns the encryption type.</td></tr><tr><td valign="top">EncryptionType</td><td>unsigned char</td><td>Returns the encryption status. false = data is not encrypted true = data is encrypted</td></tr></tbody></table>

## NFCDataBuilder <a href="#id-10.13_nfcdatabuilder" id="id-10.13_nfcdatabuilder"></a>

This class assist in parsing NFC data from OnEvent().

{% code overflow="wrap" %}

```
NFCData GetNFCData( 
        MTU_DEVICE_TYPE deviceType,
        vector<unsigned char> dataBytes);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="118.3636474609375" valign="top"></th><th width="205.3636474609375"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">Member</td><td>Return</td><td>Description</td></tr><tr><td valign="top">deviceType</td><td>MTU_DEVICE_TYPE</td><td>Device type</td></tr><tr><td valign="top">dataBytes</td><td>vector&#x3C;unsigned char></td><td><p>Data from the OnEvent()</p><p>EVENT_TYPE_NFCData.</p></td></tr></tbody></table>

## NFCEventBuilder <a href="#id-10.14_nfceventbuilder" id="id-10.14_nfceventbuilder"></a>

This class assist in parsing NFCEvent data from OnEvent().

{% code overflow="wrap" %}

```
NFCEvent GetValue(string valueString); 
string GetString(NFCEvent nfcEvent);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="379.27276611328125" valign="top"></th><th width="130.818115234375"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">Member</td><td>Value</td><td>Description</td></tr><tr><td valign="top">MTUSDKTS_NFC_MIFARE_ULTRALIGHT</td><td>String</td><td>"nfc_mifare_ultralight"</td></tr><tr><td valign="top">MTUSDKTS_NFC_MIFARE_CLASSIC</td><td>String</td><td>"mifare_classic_1k"</td></tr><tr><td valign="top">MTUSDKTS_NFC_MIFARE_CLASSIC_4K</td><td>String</td><td>"mifare_classic_4k"</td></tr><tr><td valign="top">MTUSDKTS_NFC_MIFARE_DESFIRE</td><td>String</td><td>“mifare_desfire”</td></tr><tr><td valign="top">MTUSDKTS_NFC_TAG_REMOVED</td><td>String</td><td>"tag_removed"</td></tr><tr><td valign="top">MTUSDKTS_NFC_COMMAND_FAILED</td><td>String</td><td>"failed"</td></tr><tr><td valign="top">MTUSDKTS_NFC_IO_FAILED</td><td>String</td><td>"io_failed"</td></tr><tr><td valign="top">MTUSDKTS_NFC_AUTHENTICATION_FAILED</td><td>String</td><td>"authentication_failed"</td></tr><tr><td valign="top">GetValue(string data)</td><td>NFCEve nt</td><td>Returns the NFCEvent enumeration.</td></tr><tr><td valign="top">GetString(NFCEvent value)</td><td>string</td><td>Returns a string representation of NFCEvent enumeration.</td></tr></tbody></table>

## PANDataBuilder <a href="#id-10.15_pandatabuilder" id="id-10.15_pandatabuilder"></a>

This class assist in parsing PAN data from OnEvent().

{% code overflow="wrap" %}

```
PANData GetPANData( 
        MTU_DEVICE_TYPE deviceType,
        vector<unsigned char> dataBytes);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="125.6363525390625" valign="top"></th><th width="209.6363525390625"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">Member</td><td>Return</td><td>Description</td></tr><tr><td valign="top">deviceType</td><td>MTU_DEVICE_TYPE</td><td>Device type</td></tr><tr><td valign="top">dataBytes</td><td>vector&#x3C;unsigned char></td><td><p>Data from the OnEvent()</p><p>EVENT_TYPE_PANData.</p></td></tr></tbody></table>

## PINDataBuilder <a href="#id-10.16_pindatabuilder" id="id-10.16_pindatabuilder"></a>

This class assist in parsing PIN data from OnEvent().

{% code overflow="wrap" %}

```
PINData GetPINData( 
        MTU_DEVICE_TYPE deviceType,
        vector<unsigned char> dataBytes);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="120.18182373046875" valign="top"></th><th width="208.9091796875"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">Member</td><td>Return</td><td>Description</td></tr><tr><td valign="top">deviceType</td><td>MTU_DEVICE_TYPE</td><td>Device type</td></tr><tr><td valign="top">dataBytes</td><td>vector&#x3C;unsigned char></td><td><p>Data from the OnEvent()</p><p>EVENT_TYPE_PINData.</p></td></tr></tbody></table>

## TransactionStatusBuilder <a href="#id-10.17_transactionstatusbuilder" id="id-10.17_transactionstatusbuilder"></a>

This class assist in parsing transaction status event data from OnEvent().

{% code overflow="wrap" %}

```
TransactionStatus GetStatusCode(string data); 
string GetDetailData(string data);
string GetString(TransactionStatus value, string detailData = "");
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="397.8182373046875" valign="top"></th><th width="105.6363525390625"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">Member</td><td>Value</td><td>Description</td></tr><tr><td valign="top">MTUSDKTS_CARD_SWIPED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_CARD_INSERTED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_CARD_REMOVED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_CARD_DETECTED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_CARD_COLLISION</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_TIMED_OUT</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_HOST_CANCELLED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_TRANSACTION_CANCELLED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_TRANSACTION_IN_PROGRESS</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_TRANSACTION_ERROR</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_TRANSACTION_APPROVED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_TRANSACTION_DECLINED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_TRANSACTION_COMPLETED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_TRANSACTION_FAILED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_TRANSACTION_NOT_ACCEPTED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_SIGNATURE_CAPTURE_REQUESTED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_TECHNICAL_FALLBACK</td><td>String</td><td> </td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="345.6363525390625" valign="top"></th><th width="167.8182373046875"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">MTUSDKTS_QUICK_CHIP_DEFERRED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_DATA_ENTERED</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_TRY_ANOTHER_INTERFACE</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_BARCODE_READ</td><td>String</td><td> </td></tr><tr><td valign="top">MTUSDKTS_VAS_ERROR</td><td>String</td><td> </td></tr><tr><td valign="top">GetStatusCode(string data)</td><td>TransactionStatus</td><td>Returns the TransactionStatus enumeration.</td></tr><tr><td valign="top">GetDetailData(string data)</td><td>string</td><td>Returns the detail.</td></tr><tr><td valign="top">GetString(TransactionStatus value, string detailData = "")</td><td>string</td><td>Returns the detail.</td></tr></tbody></table>

## UserEventBuilder <a href="#id-10.18_usereventbuilder" id="id-10.18_usereventbuilder"></a>

This class assist in parsing UserEvent data from OnEvent().

{% code overflow="wrap" %}

```
UserEvent GetValue(string valueString); 
string GetString(UserEvent UserEvent);
```

{% endcode %}

<table data-header-hidden><thead><tr><th width="403.81817626953125" valign="top"></th><th width="109.727294921875"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">Member</td><td>Return</td><td>Description</td></tr><tr><td valign="top">MTUSDKUE_CONTACTLESS_CARD_PRESENTED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_CONTACTLESS_CARD_REMOVED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_CARD_SEATED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_CARD_UNSEATED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_CARD_SWIPED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_TOUCH_PRESENTED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_TOUCH_REMOVED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_BARCODE_READ</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_NFC_MIFARE_ULTRALIGHT_PRESENTED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_MIFARE_CLASSIC_1K_PRESENTED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_MIFARE_CLASSIC_4K_PRESENTED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_MIFARE_DESFIRE_PRESENTED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_NFC_MIFARE_ULTRALIGHT_REMOVED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_MIFARE_CLASSIC_1K_REMOVED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_MIFARE_CLASSIC_4K_REMOVED</td><td>string</td><td> </td></tr><tr><td valign="top">MTUSDKUE_MIFARE_DESFIRE_REMOVED</td><td>string</td><td> </td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="242.6363525390625" valign="top"></th><th width="119.272705078125"></th><th></th></tr></thead><tbody><tr><td colspan="3" valign="top">Static</td></tr><tr><td valign="top">GetValue(string data)</td><td>UserEvent</td><td>Returns the UserEvent enumeration.</td></tr><tr><td valign="top">GetString(NFCEvent value)</td><td>string</td><td>Returns a string representation of UserEvent enumeration.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.magtek.com/sdks-and-tools/universal-sdk-documentation/linux/data-classes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
