onTransferData
In the void onTransferData(byte[] data)
function the data follows the TLV (Tag-Length-Value) format, which consists of:
- Tag (1 byte): Identifies the type of data.
- Length (1 byte): Specifies the length of the value.
- Value (N bytes): Contains the actual data.
The transferred data can be one or more TLV structures, depending on the information being exchanged.
Example
If onTransferData(byte\[] data)
receives the following bytes:
5 6 345678
- 5 is the tag for Card BIN
- 6 is the Length, in this case 6 bytes
- 345678 is the value of the First 6 digits of the card number.
The system extracts the Card BIN as "345678".
Tag Descriptions
The table below describes different types of data that can be transferred using this function:
Tag | Tag Name | Data Size | Description |
---|---|---|---|
1 | Transaction ID | 8 bytes | Unique identifier for the transaction. |
2 | "Choose Product" Timeout | 2 bytes | Timeout for the "Choose Product" prompt. |
3 | Card Type | 1 byte | Identifies the type of card used. |
4 | Card Entry Mode | 1 byte | Identifies how the card was entered (swiped, tapped, inserted, etc.). |
5 | Card BIN | 6 bytes | First 6 digits of the card number (ASCII). |
6 | Card PAN Hash | 20 bytes | SHA1 hash of the full card PAN (to protect card data). |
7 | Proprietary Card UID | 4, 7, or 10 bytes (MiFare), up to 40 bytes (Mag) | Unique identifier for proprietary cards. |
8 | VMC Authorization Status | 1 byte | Authorization result (0 = Approved, 1 = Declined). |
9 | COM Status | 1 byte | Communication status between the server and the device. |
10 | FTL Data | Up to 500 bytes | Raw data transferred at a lower level (MDB Level 3). |
11 | Create Layout | 4 bytes | Layout creation request. |
12 | Update Layout | Up to 500 bytes | Updates an existing layout using the ExtraData field. |
13 | Credit Card Last Four Digits | 4 bytes (ASCII) | Last four digits of the credit card. |
14 | Product Code | 2 bytes | Code identifying the purchased product. |
15 | Product Price | 4 bytes | Price of the product. |
16 | Customized Data / General Purpose | Up to 500 bytes | JSON-formatted custom data (specific details TBD). |
17 | Consumer ID | Up to 500 bytes | Unique consumer identifier (e.g., Passport, ID Number). |
18 | Main Software Version | 14 bytes | Version of the main software running on the device. |
19 | POS Software Version | 10 bytes | A version of the POS (Point of Sale) software. |
20 | Default Credit | 2 bytes | Predefined credit amount. |
21 | Monyx ID | 9 bytes | ID related to Monyx payment system. |
22 | Final Price | 4 bytes | Final transaction price after discounts. |
23 | Card Sub-Type | 1 byte | More detailed classification of the card type. |
24 | Card Balance | 4 bytes | The remaining balance on the card. |
Updated 3 months ago