> 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/products/card-readers/magnetic-stripe-readers/idynamo-5-gen-iii/documentation/developers-manuals/programmers-manual-.net-pcl/appendix-f-emv-transaction-flow.md).

# Appendix F EMV Transaction Flow

#### Flow Chart

<figure><img src="https://content.gitbook.com/content/qN8qT2GJ2O0P1blQMIVj/blobs/3m4jsvpoaov66w8sUGQJ/Screenshot%202026-03-10%20130923.png" alt=""><figcaption></figcaption></figure>

#### Sample Transaction Flow Code

```
// #1

MTSCRA m_SCRA = new MTSCRA();

// Delegate the MTSCRA Events. 
m_SCRA.OnDisplayMessageRequest += OnDisplayMessageRequest;
.
// Assign parameters. 
byte timeLimit = 0x3C; 
byte cardType = 0x07; 
byte option = 0x00;
byte[] amount = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x15, 0x00 }; 
byte transactionType = 0x00; // Purchase
byte[] cashBack = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 
byte[] currencyCode = new byte[] { 0x08, 0x40 };
byte reportingOption = 0x02; // All Status Changes

// Start transaction.
long result = m_SCRA.startTransaction( 
timeLimit,
cardType, 
option, 
amount,
transactionType, 
cashBack, 
currentCode, reportingOption);

```

```
// #2

protected void OnDisplayMessageRequest(obj sender, byte[] data)
{
    String message;

    // Get the message. 
    if (data != NULL)
    {
        message = System.Text.Encoding.UTF8.GetString(data);
    }

// A data size of 0 is an instruction to clear the display. 
if (data.Length == 0)
{
// Clear the display.
}
}
```

```
// #3

protected void OnUserSelectionRequest(object sender, byte[] data)
{
    /* data[0]	– selection type 
        data[1]	– timeout
        data[2..n] – remainder contains zero-terminated string items */

    // display/retrieve user selection.
    .
    // set status and selection result. 
    m_SCRA.setUserSelectionResult(status, selection);
}
```

```
// #4

protected void OnARQCReceived(object sender, byte[] data)
{
    /* data[0..1] – ARQC length
        data[2..n] – remainder contains the ARQC TLV object */


    // #4a Forward ARQC to Processor.
    
    /* An application function to forward the ARQC 
        to a Processor for approval. */
    proccesorResponse = sendARQCToProcesor(data);


    /* No need to send ARQC Response if transaction option 
        had enabled Quick Chip mode. */
    if (isQuickChipEnabled())
    {
        return;
    }


    // #4b Set Acquirer Response.

    // An application function to build Acquirer Response. 
    buildAcquirerResponse(processorResponse);

    // Set Acquirer Response.
    m_SCRA.setAcquirerResponse(response);

}
```

<pre><code>// #5

protected void OnDisplayMessageRequest(obj sender, byte[] data)
{
<strong>    String message;
</strong>
    // Get the message. 
    if (data != NULL)
    {

        message = System.Text.Encoding.UTF8.GetString(data);
    }

    // A data size of 0 is an instruction to clear the display. if (data.Length == 0)
    {
        // Clear the display.
    }
}
</code></pre>

```
// #6

protected void OnTransactionResult(obj sender, byte[] data)
{
    /* data[0]	– Signature Required 
        data[1..2] – Batch Data length
        data[3..n] – remainder contains the Batch Data TLV object */

    // Parse the TLV from data[].
    .
    // Abstract Approval status from TLV tag “DFDF1A”.
    .
    // Abstract Signature Required status from TLV tag data[0].
    .
}
```


---

# 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/products/card-readers/magnetic-stripe-readers/idynamo-5-gen-iii/documentation/developers-manuals/programmers-manual-.net-pcl/appendix-f-emv-transaction-flow.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.
