Skip to main content
onTransferData is the function for the “Transfer Data” Marshall command, which allows for information regarding the transaction to be sent both ways- usually from the device’s (VPOS Touch / VPOS Media) end to the peripheral, but can also be sent from the peripheral to the device. 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. More on that below.
4Card Entry Mode1 byteIdentifies how the card was entered (swiped, tapped, inserted, etc.). More on that below.
5Card BIN6 bytesFirst 6 digits of the card number (ASCII).
6Card PAN Hash20 bytesSHA1 hash of the whole card PAN (to protect card data).
7Proprietary Card UIDMiFare- 4, 7, or 10 bytes Magstripe- up to 40 bytes QR- up to 255 bytesUnique identifier for proprietary cards. QR- numeric values only
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 (in ASCII).
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). ASCII string.
18Main Software Version14 bytesVersion of the device’s Main software running on the device.
19POS Software Version10 bytesVersion of the device’s POS software running on the device.
20Default Credit2 bytesPredefined credit amount as set in Nayax Core.
21Monyx ID9 bytesID related to Monyx payment system as defined in Nayax Core.
22Final Price4 bytesFinal transaction price after discounts.
23Card Sub-Type1 byteMore detailed classification of the card type. More on that below.
24Card Balance4 bytesThe remaining balance on the proprietary card.
25Transfer to BLEN bytesData to be transmitted over Bluetooth/BLE. Related to Nayax EV (internal Nayax request)
26Select Brand8 bytesRelevant only for the Japanese market! Peripheral->Device: Select the brand to pay, instead of having the brand selection screen before that. Device > Peripheral: After the pairing process, update the peripheral in the 64-bit bitfield of configured brands.
27Proprietary Card NameN (up to 500) bytesProprietary card Description, arrived from tag 239 from Nayax’s server
28Site ID1 ByteSite ID information from Nayax’s servers that arrives in the authorization response
Transfer Data format by card types:
Credit CardProprietary Card
Tag 3: Card Type (value in range “2”-“6”)
Tag 4: Entry Mode
Tag 5: Card BIN
Tag 6: Card PAN Hash
Tag 13: Credit card last four digits
Tag 1: Transaction ID
Tag 9: COM Status
Tag 3: Card Type (value of “1”)
Tag 4: Entry Mode (value of”1” if Magstripe, “4” if MiFare, “5” if HID, “10” if QR)
Tag 7: Proprietary Card UID
Tag 1: Transaction ID
Tag 9: COM Status
Card Type:
typedef enum E_MarshallApi_TDCardType_tag
{
    MARSHALLAPI_TRANSFER_DATA_UNKOWN_CARD_TYPE = 0,                 /* Unknown	            */
    MARSHALLAPI_TRANSFER_DATA_PROPRIETARY_CARD_TYPE,                /* Proprietary	        */
    MARSHALLAPI_TRANSFER_DATA_VISA_CARD_TYPE,                       /* Visa	                */
    MARSHALLAPI_TRANSFER_DATA_MASTER_CARD_CARD_TYPE,                /* Master Card          */
    MARSHALLAPI_TRANSFER_DATA_CHINA_UNION_PAY_CARD_TYPE,            /* China Union Pay	    */
    MARSHALLAPI_TRANSFER_DATA_MAESTRO_CARD_TYPE = 5,                /* Maestro  	        */
    MARSHALLAPI_TRANSFER_DATA_INTERAC_CARD_TYPE,                    /* Interac  	        */
    MARSHALLAPI_TRANSFER_DATA_MONYX_CARD_TYPE,                      /* Monyx  	            */
    MARSHALLAPI_TRANSFER_DATA_AMEX_CARD_TYPE,                   	/* American Express     */
    MARSHALLAPI_TRANSFER_DATA_DINERS_CARD_TYPE,                 	/* Diners               */
    MARSHALLAPI_TRANSFER_DATA_DISCOVER_CARD_TYPE = 10,              /* Discover             */
    MARSHALLAPI_TRANSFER_DATA_EFTPOS_CARD_TYPE,                 	/* EFTPOS               */
    MARSHALLAPI_TRANSFER_DATA_JCB_CARD_TYPE,                    	/* JCB                  */
    MARSHALLAPI_TRANSFER_DATA_MAGSTRIPE_CARD_TYPE,              	/* swiped payment       */
    MARSHALLAPI_TRANSFER_DATA_MONYX_APP_PREPAID_CARD_TYPE,			/* Monyx App Prepaid 	*/
    MARSHALLAPI_TRANSFER_DATA_MONYX_APP_BALANCE_CARD_TYPE = 15,     /* Monyx App Balance 	*/
    MARSHALLAPI_TRANSFER_DATA_EMONEY_CARD_TYPE,                     /* E-money              */
    MARSHALLAPI_TRANSFER_DATA_PURE_CARD_TYPE,                       /* Pure	                */
    MARSHALLAPI_TRANSFER_DATA_CARD_TYPE_MAX,

}E_MarshallApi_TDCardType;
Card Entry Mode:
typedef enum E_MarshallApi_TDCardEntryType_tag
{
    MARSHALLAPI_TRANSFER_DATA_MSR_SWIPE_CARD_ENTRY_TYPE = 1,         /* Mag stripes	        */
    MARSHALLAPI_TRANSFER_DATA_CONTACTLESS_CARD_ENTRY_TYPE,           /* Contactless	        */
    MARSHALLAPI_TRANSFER_DATA_CONTACT_CARD_ENTRY_TYPE,               /* Contact	            */
    MARSHALLAPI_TRANSFER_DATA_MIFARE_CARD_ENTRY_TYPE,                /* MiFare	            */
    MARSHALLAPI_TRANSFER_DATA_HID_CARD_ENTRY_TYPE,                   /* HID	                */
    MARSHALLAPI_TRANSFER_DATA_NFC_CARD_ENTRY_TYPE,                   /* NFC	                */
    MARSHALLAPI_TRANSFER_DATA_CNOUS_CARD_ENTRY_TYPE,                 /* CNOUS	            */
    MARSHALLAPI_TRANSFER_DATA_KEYPAD_ENTRY_TYPE,                     /* Keypad	            */
    MARSHALLAPI_TRANSFER_DATA_MOBILE_ENTRY_TYPE,                     /* Mobile	            */
    MARSHALLAPI_TRANSFER_DATA_QR_ENTRY_TYPE,                         /* QR	                */
    MARSHALLAPI_TRANSFER_DATA_BLE_ENTRY_TYPE,                        /* BLE	                */
    MARSHALLAPI_TRANSFER_DATA_LEGIC_CARD_ENTRY_TYPE,                 /* LEGIC               */
    MARSHALLAPI_TRANSFER_DATA_CARD_ENTRY_TYPE_MAX,

}E_MarshallApi_TDCardEntryType;
Card Subtype:
typedef enum E_MarshallApi_TDSelectCardBrand_tag
{
    MARSHALLAPI_BRAND_EMPTY                                 = 0x0000000000000000,              /* Unknown/Empty brand Sub-Type card */

    /* 1st 2nd bytes: Japanese e-money brands */
    MARSHALLAPI_BRAND_EMONEY_EDY                            = 0x0000000000000001,              /* Proprietary Japanese e-money */
    MARSHALLAPI_BRAND_EMONEY_WAON                           = 0x0000000000000002,              /* Proprietary Japanese e-money */
    MARSHALLAPI_BRAND_EMONEY_TRANSPORT_IC                   = 0x0000000000000004,              /* Proprietary Japanese Transportation e-money - see below */
    MARSHALLAPI_BRAND_EMONEY_ID                             = 0x0000000000000008,              /* Proprietary Japanese e-money */
    MARSHALLAPI_BRAND_EMONEY_QUICPAY                        = 0x0000000000000010,             /* Proprietary Japanese e-money */
    MARSHALLAPI_BRAND_EMONEY_NANACO                         = 0x0000000000000020,             /* Proprietary Japanese e-money */
    MARSHALLAPI_BRAND_EMONEY_PITAPA                         = 0x0000000000000040,             /* Proprietary Japanese e-money */
                                                                        
                                                                        
    /* 3rd 4th bytes: Credit card brands */                                            
    MARSHALLAPI_BRAND_EMV_VISA                              = 0x0000000000000100,              /* Visa */
    MARSHALLAPI_BRAND_EMV_MASTERCARD                        = 0x0000000000000200,              /* Mastercard*/
    MARSHALLAPI_BRAND_EMV_AMEX                              = 0x0000000000000400,              /* American express */
    MARSHALLAPI_BRAND_EMV_JCB                               = 0x0000000000000800,              /* JCB */
    MARSHALLAPI_BRAND_EMV_GENERAL                           = 0x0000000000001000,              /* Generic credit card (VEND_PAY_METHOD_CREDIT_CARD)*/
    MARSHALLAPI_BRAND_EMV_DISCOVER                          = 0x0000000000002000,              /* Discover*/
    MARSHALLAPI_BRAND_EMV_DINERS                            = 0x0000000000004000,              /* Diners*/
    MARSHALLAPI_BRAND_EMV_VISA_MASTER                       = 0x0000000000008000,              /* VisaMaster combined brand*/

    /* 5th 6th bytes: Free*/
                
    /* 7th-14th bytes: QR brands */
    /* 7,8: Japan */
    MARSHALLAPI_BRAND_QR_PAYPAY                             = 0x0000000001000000,              /* PayPay */
    MARSHALLAPI_BRAND_QR_LINE_PAY                           = 0x0000000002000000,              /* LinePay*/
    MARSHALLAPI_BRAND_QR_RAKUTEN_PAY                        = 0x0000000004000000,              /* RakutenPay*/
    MARSHALLAPI_BRAND_QR_AU_PAY                             = 0x0000000008000000,              /* AUPay*/
    MARSHALLAPI_BRAND_QR_AEON_PAY                           = 0x0000000010000000,              /* AEONPay */
    MARSHALLAPI_BRAND_QR_D_BARAI                            = 0x0000000020000000,              /* D Barai*/
    MARSHALLAPI_BRAND_QR_MERUPAY                            = 0x0000000040000000,             /*  MeruPay */
    MARSHALLAPI_BRAND_QR_J_COIN                             = 0x0000000080000000,              /* J-Coin*/
    

    /*9-13: East asia*/
    MARSHALLAPI_BRAND_QR_WECHAT_PLUS                        = 0x0000000010000000,              /* Monyx */
    MARSHALLAPI_BRAND_QR_WECHAT                             = 0x0000000020000000,              /* EFTPOS */
    MARSHALLAPI_BRAND_QR_ALIPAY                             = 0x0000000040000000,              /* INTERAC */
    MARSHALLAPI_BRAND_QR_ALIPAY_PLUS                        = 0x0000000080000000,              /*  */
    MARSHALLAPI_BRAND_QR_ALIPAY_HK                          = 0x0000000100000000,              /*  */
    MARSHALLAPI_BRAND_QR_MAE_PAY                            = 0x0000000200000000,              /*  */
    MARSHALLAPI_BRAND_QR_PROMPT_PAY                         = 0x0000000400000000,              /*  */
    MARSHALLAPI_BRAND_QR_DUIT_PAY                           = 0x0000000800000000,              /*  */
    MARSHALLAPI_BRAND_QR_TOUNCHNGO                          = 0x0000001000000000,              /*  */
    MARSHALLAPI_BRAND_QR_BOOST                              = 0x0000002000000000,              /*  */
    MARSHALLAPI_BRAND_QR_TRUE_MONEY                         = 0x0000004000000000,              /*  */
    MARSHALLAPI_BRAND_QR_ZALO_PAY                           = 0x0000008000000000,              /*  */
    MARSHALLAPI_BRAND_QR_SHOPEE_PAY                         = 0x0000010000000000,              /*  */
    MARSHALLAPI_BRAND_QR_VIET                               = 0x0000020000000000,              /*  */
    MARSHALLAPI_BRAND_QR_MOMO                               = 0x0000040000000000,              /*  */
    MARSHALLAPI_BRAND_QR_GRAB_PAY                           = 0x0000080000000000,              /*  */
    MARSHALLAPI_BRAND_QR_UNION_PAY                          = 0x0000100000000000,              /*  */
                               
    /*14: Other countries*/
    MARSHALLAPI_BRAND_QR_SWISH                              = 0x0001000000000000,              /*  */
    MARSHALLAPI_BRAND_QR_SATISPAY                           = 0x0002000000000000,              /*  */

    
    /* 15th~ bytes: Other brands */
    MARSHALLAPI_BRAND_OFFICE_PAY                            = 0x0100000000000000,              /* Office Pay */
    MARSHALLAPI_BRAND_NAYAX_PAY                             = 0x0200000000000000,              /* Nayax Pay (VEND_PAY_METHOD_NAYAX_PREPAID)*/
    MARSHALLAPI_BRAND_MONYX                                 = 0x0400000000000000,              /* Monyx */
    MARSHALLAPI_BRAND_EFTPOS                                = 0x0800000000000000,              /* EFTPOS */
    MARSHALLAPI_BRAND_INTERAC                               = 0x1000000000000000,              /* INTERAC */
    MARSHALLAPI_BRAND_PURE                                  = 0x2000000000000000,              /* PURE */}E_MarshallApi_TDSelectCardBrand;