> 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/api-and-command-reference/7-30-26-draft-version-scra-dynafamily-programmers-manual/7-30-26-draft-version-commands/7-30-26-draft-version-read-mobile-document-command-group-0x12nn/7-30-26-draft-version-0x1202-age-verification-for-iso-18013-5.md).

# (7/30/26 Draft Version) 0x1202 - Age Verification for ISO 18013-5

The host uses this command to start Age Verification through mobile document transaction.

The sequence of events for transactions with device (mDOC Reader) enabled is roughly as follows.

{% stepper %}
{% step %}
**Command 0x1202** is a subset of <mark style="color:red;">**Command 0x1201**</mark>.  It only allows a request item, Age over 18, 21 or 25. It only supports ISO 18013-5 specification. The rest of the features are the same.
{% endstep %}

{% step %}
The device sends a response in the format below, and waits for the mDOC Holder (Apple, Android or other phones) to present a Data Engagement method, either QR Code or NFC. The data exchanged during the Data Engagement phase will be used to generate multiple keys for the encryption/decryption of mDOC messages. The ephemeral key generation algorith is defined in ISO-IEC-18013-5.
{% endstep %}

{% step %}
After the mDOC Holder presents data engagement method, the device sends <mark style="color:red;">**Notification 0x0101 - Transaction Information Update**</mark> to report the Data Engagement status. If Data Engagement phase has completed successfully, then go to the next step to handle Data Retrieval phase. Else, exit with failure.
{% endstep %}

{% step %}
The device will connect to the mDOC holder through BLE connection. The device will build the “mdoc request” message based on the settings of the command string below. The mDOC Holder will send back the “mdoc response" to the device. The device will decode the CBOR encoded response message.
{% endstep %}

{% step %}
The device will authenticate the “mdoc response" message with a pre-loaded certificate. The device will verify the SHA-256 hash of all the response items to validate the Data integrity. If the security validation has completed successfully, the device will send the results to the host through <mark style="color:red;">**Notification 0x0101**</mark>. Otherwise, the device will send a failure message through <mark style="color:red;">**Notification 0x0101**</mark>.
{% endstep %}

{% step %}
Host may set up the A4 TLVs to enable/disable/select the proper Audio Cue during operation.
{% endstep %}
{% endstepper %}

## Codes for Command 0x1201 - Read Mobile Document

{% code overflow="wrap" %}

```
AA 00                      	// marker
81 04 01 05 12 02          	// command 0x1202
84 32 12 02                	// command payload
82 01 1E                   	// timeout: 30 seconds
83 01 02                    // Verify age is Over-21
85 01 00			              // Output Data security is disabled
87 01 00                    // Do not retain the received data
A3 06				                // reader options
83 01 01                   	// NFC reader is enabled 
85 01 01                   	// BCR reader is enabled
A4 1D				                // audio cue option
81 01 02			              // command mode
82 04 03B80040			        // Start engagement profile 
83 08 01B8009603700096	    // Finish engagement profile
84 08 0370009600C80096	    // BLE transfer complete profile 
```

{% endcode %}

## Request Data for Command 0x1201- Read Mobile Document

<table data-header-hidden><thead><tr><th width="54"></th><th width="53"></th><th></th><th width="53"></th><th width="59"></th><th width="83"></th></tr></thead><tbody><tr><td>Tag</td><td>Len</td><td>Value / Description</td><td>Typ</td><td>Req</td><td>Default</td></tr><tr><td>82</td><td>01</td><td><p>This parameter defines how long the device waits for the completion of this command..</p><p>·         0x00 = No timeout</p><p>·         0x01 to 0xFF = 1 to 255 seconds</p></td><td>B</td><td>R</td><td> </td></tr><tr><td>83</td><td>01</td><td><p>This parameter defines the options of age verification.</p><p>·         1=18, 2=21, 3=25 years old.</p><p>·         00, 04-FF:  Reserved</p></td><td>B</td><td>R</td><td> </td></tr><tr><td>85</td><td>01</td><td><p>It defines the security of the Data Container. If security is enabled, Data Container will be Encrypted and MACed.</p><p>·         0x00, security is disabled.</p><p>·         0x01, security is enabled.</p></td><td>B</td><td>R</td><td> </td></tr><tr><td>87</td><td>01</td><td>It defines the reader shall or shall not retain the<br>received data elements.<br>• 0x00, Shall not retain the data.<br>• 0x01, Shall retain the data.</td><td>B</td><td>R</td><td></td></tr><tr><td>A3</td><td>06</td><td><p>Device Engagement Phase Options</p><p>The parameters inside this TLV data object allow the host to enable and disable the various interfaces to start engagement.</p></td><td>T</td><td>R</td><td> </td></tr><tr><td>/83</td><td>01</td><td><p>NFC Mode</p><p>·         0x00 = Disabled</p><p>·         0x01 = Enabled</p></td><td>B</td><td>R</td><td> </td></tr><tr><td>/85</td><td>01</td><td><p>QR Code Mode</p><p>·         0x00 = Disabled</p><p>·         0x01 = Enabled</p><p>·         0x02 = Onboard BCR Disabled, BCR data from Tag 86</p></td><td>B</td><td>R</td><td> </td></tr><tr><td>86</td><td>var</td><td>BCR data (optional / required if Tag 85 is 02)</td><td>B</td><td>0/R</td><td> </td></tr><tr><td>A4</td><td>var</td><td>Audio Cue option</td><td>T</td><td>R</td><td> </td></tr><tr><td>/81</td><td>01</td><td><p>Device Audio Mode</p><p>0x00 = disabled</p><p>0x01 = auto</p><p>0x02 = command, the following 3 TLVs are required if the </p><p>            value is 0x02</p><p> </p><p>If set to 0x01 auto mode. The tone profiles are:</p><p>03B80040                      // Start engagement</p><p>01B8009603700096      // Finish engagement</p><p>01B8009603700096      //BLE/mDoc Transfer complete</p><p>012C009600960096      // mDL transaction error</p></td><td>B</td><td>R</td><td> </td></tr><tr><td>/82</td><td>04</td><td><p>Start engagement profile</p><p>4 bytes data parameter for each tone in the sequence</p><p>Byte0-Byte1 – Frequency in units of 1 Hz · 0x0000..0x0031 (&#x3C; 50 Hz, Silent) · 0x0032 - Min (50 Hz)</p><p>Value / Description Typ Req · 0x0FA0 - Max (4000 Hz) · 0x0FA1..0xFFFF (> 4000 Hz, Error)</p><p>Byte 2-Byte3 – Duration of tone in units of 1 millisecond · 0x0001 – Min (1 ms) · 0xFFFF – Max (65535 ms)</p></td><td>B</td><td>O/R</td><td> </td></tr><tr><td>/83</td><td>08</td><td><p>Finish engagement profile</p><p>2 set of data parameter for each tone as above</p></td><td>B</td><td>O/R</td><td> </td></tr><tr><td>/84</td><td>08</td><td><p>BLE transfer complete profile</p><p>2 set of data parameter for each tone as above</p></td><td>B</td><td>O/R</td><td> </td></tr><tr><td>/85</td><td>08</td><td>mDL transaction error<br>2 set of data parameter for each tone as above</td><td>B</td><td>O/R</td><td></td></tr></tbody></table>


---

# 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://developer.magtek.com/api-and-command-reference/7-30-26-draft-version-scra-dynafamily-programmers-manual/7-30-26-draft-version-commands/7-30-26-draft-version-read-mobile-document-command-group-0x12nn/7-30-26-draft-version-0x1202-age-verification-for-iso-18013-5.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.
