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:

TagTag NameData SizeDescription
1Transaction ID8 bytesUnique identifier for the transaction.
2"Choose Product" Timeout2 bytesTimeout for the "Choose Product" prompt.
3Card Type1 byteIdentifies the type of card used.
4Card Entry Mode1 byteIdentifies how the card was entered (swiped, tapped, inserted, etc.).
5Card BIN6 bytesFirst 6 digits of the card number (ASCII).
6Card PAN Hash20 bytesSHA1 hash of the full card PAN (to protect card data).
7Proprietary Card UID4, 7, or 10 bytes (MiFare), up to 40 bytes (Mag)Unique identifier for proprietary cards.
8VMC Authorization Status1 byteAuthorization result (0 = Approved, 1 = Declined).
9COM Status1 byteCommunication status between the server and the device.
10FTL DataUp to 500 bytesRaw data transferred at a lower level (MDB Level 3).
11Create Layout4 bytesLayout creation request.
12Update LayoutUp to 500 bytesUpdates an existing layout using the ExtraData field.
13Credit Card Last Four Digits4 bytes (ASCII)Last four digits of the credit card.
14Product Code2 bytesCode identifying the purchased product.
15Product Price4 bytesPrice of the product.
16Customized Data / General PurposeUp to 500 bytesJSON-formatted custom data (specific details TBD).
17Consumer IDUp to 500 bytesUnique consumer identifier (e.g., Passport, ID Number).
18Main Software Version14 bytesVersion of the main software running on the device.
19POS Software Version10 bytesA version of the POS (Point of Sale) software.
20Default Credit2 bytesPredefined credit amount.
21Monyx ID9 bytesID related to Monyx payment system.
22Final Price4 bytesFinal transaction price after discounts.
23Card Sub-Type1 byteMore detailed classification of the card type.
24Card Balance4 bytesThe remaining balance on the card.