# Appendix D Batch Data Format

This section gives the format of the data the device uses to do completion processing. The output is controlled by Property 0x68 – EMV Message Format. There are currently 2 selectable formats: Original and DynaPro. It is a TLV object with the following contents.

Original Format:

```
FE<len>/* container for generic data 
    */ DFDF25(IFD Serial Number)<len><val> 
    FA<len>/* container for generic data */
        F0<len>/* Transaction Results */
            F1<len>/* container for Status Data */
            … /* Status Data tags */
                DFDF1A - Transaction Status (See DFDF1A descriptions) 
                DFDF1B - Additional Transaction Information (always 0) 
                DFDF52 - Card Type Used

            F2<len>/* container for Batch Data */
            … /* Batch Data tags defined in DFDF17 */
            …/* Note: Sensitive Data cannot be defined in DFDF17*/

            F3<len>/* container for Reversal Data, if any */
            … /* Reversal Data tags defined in DFDF05 */
            …/* Note: Sensitive Data cannot be defined in DFDF05*/

            F7<len>/* container for Merchant Data */
            … /* < Merchant Data tags */

            F8<len>/* container tag for encrypted data */ 
                DFDF56(Encrypted Transaction Data KSN)<len><val> 
                DFDF57(Encrypted Transaction Data Encryption Type)<val>

            FA<len>/* container for generic data */ 
                DF30(Encrypted Tag 56 TLV, T1 Data)<len><val> 
                DF31(Encrypted Tag 57 TLV, T2 Data)<len><val> 
                DF32(Encrypted Tag 5A TLV, PAN)<len><val> 
                DF35(Encrypted Tag 9F1F TLV, T1 DD)<len><val> 
                DF36(Encrypted Tag 9F20 TLV, T2, DD)<len><val> 
                DF37(Encrypted Tag 9F61 TLV, T2 CVC3)<len><val>
                DF38(Encrypted Tag 9F62 TLV, T1,PCVC3)<len><val> 
                DF39(Encrypted Tag DF812A TLV, T1 DD)<len><val> 
                DF3A(Encrypted Tag DF812B TLV), T2 DD<len><val> 
                DF3B(Encrypted Tag DFDF4A TLV, T2 ISO Format)<len><val> 
                DF40(Encrypted Value only of DFDF4A, T2 ISO 
                Format)<len><val>
```

#### DFDF1A Transaction Status Return Codes <a href="#d.1_dfdf1a_transaction_status_return_cod" id="d.1_dfdf1a_transaction_status_return_cod"></a>

* 0x00 = Approved&#x20;
* 0x01 = Declined&#x20;
* 0x02 = Error
* 0x10 = Cancelled by Host
* 0x1E = Manual Selection Cancelled by Host&#x20;
* 0x1F = Manual Selection Timeout
* 0x21 = Waiting for Card Cancelled by Host&#x20;
* 0x22 = Waiting for Card Timeout
* 0x23 = Cancelled by Card Swipe&#x20;
* 0xFF = Unknown

DynaPro Format:

```
F9<len>/* container for MAC structure and generic data */ 
    DFDF54(MAC KSN)<len><val>
    DFDF55(MAC Encryption Type)<len><val> 
    DFDF25(IFD Serial Number)<len><val> 
    FA<len>/* container for generic data */
        F0<len>/* Transaction Results */
            F1<len>/* container for Status Data */
                … /* Status Data tags */
            F8<len>/* container tag for encryption */
                DFDF59(Encrypted Data Primative)<len><Encrypted Data val> 
                    (Decrypt data to read tags)
                DFDF56(Encrypted Transaction Data KSN)<len><val> 
                DFDF57(Encrypted Transaction Data Encryption Type)<val> 
                DFDF58(# of bytes of padding in DFDF59)<len><val>
            F7<len>/* container for Merchant Data */
                … /* < Merchant Data tags */
(Buffer if any to be a multiple of 8 bytes) 
CBC-MAC (4 bytes, always set to zeroes)
```


---

# 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/appendix-d-batch-data-format.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.
