> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/readme/files/dir_fd97ec13bcecf864d0a2538bcb52d927/dir_64d02063c70c5c9b1f1dea0f7cacc02a/sdi__data_8h.md).

# sdi\_data.h

[Macros](#define-members) | [Functions](#func-members)

`#include "`[emv/EMV\_CT\_Interface.h](/s-adk-5.1-programmers-guide/_e_m_v___c_t___interface_8h_source.md)`"` `#include "`[emv/EMV\_CTLS\_Interface.h](/s-adk-5.1-programmers-guide/_e_m_v___c_t_l_s___interface_8h_source.md)`"`

Include dependency graph for sdi\_data.h:

![](/files/IoEtWrVBWmipeJfhrSDO)

[Go to the source code of this file.](/s-adk-5.1-programmers-guide/sdi__data_8h_source.md)

|         |                                                                                                                                                                                                                                                                         |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Macros  |                                                                                                                                                                                                                                                                         |
| #define | [CLA\_DATA](#a3dabd433b8b080a6d5ce3ca9de2258f2)   0x29                                                                                                                                                                                                                  |
|         | <p>Class for Data Handling. <a href="#a3dabd433b8b080a6d5ce3ca9de2258f2">More...</a><br></p>                                                                                                                                                                            |
| #define | [INS\_FETCH\_TAGS](#a256a3bbbf589f289835aefd7754014ab)   0x02                                                                                                                                                                                                           |
|         | <p>Fetch Tags. <a href="#a256a3bbbf589f289835aefd7754014ab">More...</a><br></p>                                                                                                                                                                                         |
| #define | [SENSITIVE\_TAG\_OMIT](/s-adk-5.1-programmers-guide/readme/modules/group___f_e_t_c_h___t_a_g_s___o_p_t_i_o_n_s.md#ga4d0d4200051eace7b386b0b60576a7f8)   0                                                                                                               |
|         | <p>(b1 & b2): Default handling of sensitive tags by <a href="#aa0964da27a7a19aaae21a423f330af83">SDI\_fetchTxnTags()</a>: Sensitive tags are not returned in the response. <a href="/pages/vn1nFgvDBgcVZrk10K1m#ga4d0d4200051eace7b386b0b60576a7f8">More...</a><br></p> |
| #define | [SENSITIVE\_TAG\_TRUNCATE](/s-adk-5.1-programmers-guide/readme/modules/group___f_e_t_c_h___t_a_g_s___o_p_t_i_o_n_s.md#ga6f8e5b493d848f1d3c55031be9d729b8)   0x01                                                                                                        |
|         | <p>b1: Sensitive tags are returned with zero length. Note: b1 and b2 are mutually exclusive <a href="/pages/vn1nFgvDBgcVZrk10K1m#ga6f8e5b493d848f1d3c55031be9d729b8">More...</a><br></p>                                                                                |
| #define | [SENSITIVE\_TAG\_REPLACE](/s-adk-5.1-programmers-guide/readme/modules/group___f_e_t_c_h___t_a_g_s___o_p_t_i_o_n_s.md#ga02da4a00c6611051f852cba64f25696e)   0x02                                                                                                         |
|         | <p>b2: Sensitive tags are returned with data replaced by 0xFF bytes and original length <a href="/pages/vn1nFgvDBgcVZrk10K1m#ga02da4a00c6611051f852cba64f25696e">More...</a><br></p>                                                                                    |
| #define | [FETCHTAGS\_EXPIRY\_DATE\_IN\_CLEAR](/s-adk-5.1-programmers-guide/readme/modules/group___f_e_t_c_h___t_a_g_s___o_p_t_i_o_n_s.md#ga7b8ac5b03afa9de30ceb1700d2d696a3)   0x04                                                                                              |
|         | <p>b3: Get expiry date (tag 5F24) in clear text if VCL encryption is enabled <a href="/pages/vn1nFgvDBgcVZrk10K1m#ga7b8ac5b03afa9de30ceb1700d2d696a3">More...</a><br></p>                                                                                               |
| #define | [FETCHTAGS\_GET\_DATA](/s-adk-5.1-programmers-guide/readme/modules/group___f_e_t_c_h___t_a_g_s___o_p_t_i_o_n_s.md#gab484f75a638e56fe47d83bc9259c67fb)   0x08                                                                                                            |
|         | <p>b4: Use EMV\_ADK\_FETCHTAGS\_GET\_DATA option (for CT only) <a href="/pages/vn1nFgvDBgcVZrk10K1m#gab484f75a638e56fe47d83bc9259c67fb">More...</a><br></p>                                                                                                             |
| #define | [FETCHTAGS\_ADK\_ONLY](/s-adk-5.1-programmers-guide/readme/modules/group___f_e_t_c_h___t_a_g_s___o_p_t_i_o_n_s.md#ga8d4aadbc4bb2f4d2793b44118f07d17e)   0x10                                                                                                            |
|         | <p>b5: Use EMV\_ADK\_FETCHTAGS\_ADK option <a href="/pages/vn1nFgvDBgcVZrk10K1m#ga8d4aadbc4bb2f4d2793b44118f07d17e">More...</a><br></p>                                                                                                                                 |
| #define | [FETCHTAGS\_KERNEL\_ONLY](/s-adk-5.1-programmers-guide/readme/modules/group___f_e_t_c_h___t_a_g_s___o_p_t_i_o_n_s.md#ga9e6fb716305f4cb210b405d9df10134d)   0x20                                                                                                         |
|         | <p>b6: Use EMV\_ADK\_FETCHTAGS\_KERNEL option <a href="/pages/vn1nFgvDBgcVZrk10K1m#ga9e6fb716305f4cb210b405d9df10134d">More...</a><br></p>                                                                                                                              |
| #define | [FETCHTAGS\_KERNEL\_PRIVATE](/s-adk-5.1-programmers-guide/readme/modules/group___f_e_t_c_h___t_a_g_s___o_p_t_i_o_n_s.md#ga1f8aa1c7b6526f3e587078079fe2558a)   0x40                                                                                                      |
|         | <p>b7: Use EMV\_ADK\_FETCHTAGS\_KERNEL\_PRV option (only kernel private data base) <a href="/pages/vn1nFgvDBgcVZrk10K1m#ga1f8aa1c7b6526f3e587078079fe2558a">More...</a><br></p>                                                                                         |

|                                                                                                                                                                               |                                                                                                                                                                                                                                          |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Functions                                                                                                                                                                     |                                                                                                                                                                                                                                          |
| [EMV\_ADK\_INFO](/s-adk-5.1-programmers-guide/readme/modules/group___a_d_k___g_e_n_e_r_a_l___c_t/group___a_d_k___r_e_t___c_o_d_e___c_t.md#gaa5ed8ecc7a31f36a8927e6e258187810) | [SDI\_fetchTxnTags](#aa0964da27a7a19aaae21a423f330af83) (unsigned char options, unsigned long \*requestedTags, unsigned short noOfRequestedTags, unsigned char \*tlvBuffer, unsigned short bufferLength, unsigned short \*tlvDataLength) |
|                                                                                                                                                                               | <p>Fetch one or several tags at the end of the transaction, excluding sensitive cardholder data. <a href="#aa0964da27a7a19aaae21a423f330af83">More...</a><br></p>                                                                        |

### MacroDefinition Documentation <a href="#macro-definition-documentation" id="macro-definition-documentation"></a>

### CLA\_DATA <a href="#a3dabd433b8b080a6d5ce3ca9de2258f2" id="a3dabd433b8b080a6d5ce3ca9de2258f2"></a>

\#define CLA\_DATA   0x29

Class for Data Handling.

### INS\_FETCH\_TAGS <a href="#a256a3bbbf589f289835aefd7754014ab" id="a256a3bbbf589f289835aefd7754014ab"></a>

\#define INS\_FETCH\_TAGS   0x02

Fetch Tags.

### FunctionDocumentation <a href="#function-documentation" id="function-documentation"></a>

### SDI\_fetchTxnTags() <a href="#aa0964da27a7a19aaae21a423f330af83" id="aa0964da27a7a19aaae21a423f330af83"></a>

[EMV\_ADK\_INFO](/s-adk-5.1-programmers-guide/readme/modules/group___a_d_k___g_e_n_e_r_a_l___c_t/group___a_d_k___r_e_t___c_o_d_e___c_t.md#gaa5ed8ecc7a31f36a8927e6e258187810) SDI\_fetchTxnTags

Fetch one or several tags at the end of the transaction, excluding sensitive cardholder data.

One common function for all technologies: CT, CTLS, MSR and manual entry. Sensitive tags are excluded from the returned data in the way defined by the parameter `mode`. The SDI Server has a predefined set of sensitive tags. Additionally, the user can configure additional sensitive tags using the Software and Configuration Upload command set 20-14, 20-15 and 20-16 as described in the SDI Server documentation. The user can also configure a white list using the same Software and Configuration Upload commands. If a card is in the configured white list, all data is returned in clear text, including also sensitive tags.

#### Author

GSS R\&D Germany

**Parameters**

\[in] **options** ... fetch tags options, see Tag fetching options \[in] **requestedTags** ... requested tags \[in] **noOfRequestedTags** ... number of requested tags \[in,out] **tlvBuffer** ... buffer for TLV output, allocated by calling application \[in] **bufferLength** ... number of bytes allocated for tlvBuffer \[out] **tlvDataLength** ... number of bytes written to tlvBuffer

#### Returns

EMV\_ADK\_OK, EMV\_ADK\_PARAM, EMV\_ADK\_TLV\_BUILD\_ERR, EMV\_ADK\_INTERNAL


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/s-adk-5.1-programmers-guide/readme/files/dir_fd97ec13bcecf864d0a2538bcb52d927/dir_64d02063c70c5c9b1f1dea0f7cacc02a/sdi__data_8h.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
