> 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/hardware/card-readers/mms-dyna-devices/dynaflex-ii-ped/documentation/developers-manuals/dynaflex-ii-ped-programmers-manual/commands/banking-functions/request-pin-with-host-supplied-account-data.md).

# Request PIN with Host Supplied Account Data

## Command 0x2001 - Request PIN with Host Supplied Account Data (Banking Functions Only) <a href="#toc203725818" id="toc203725818"></a>

This command directs the device to prompt the cardholder to enter a PIN when a card is not present or is not presented. The host is aware of the account information and the device is not. To prompt the cardholder to present a card before prompting for a PIN, use Command 0x2002 - Request PIN with Card Supplied Account Data (Banking Functions Only) instead.

When the host calls this command, the device enters PIN Entry Mode, meaning it starts a “PIN Entry session.” While in PIN Entry Mode:

* The device ignores most other commands from the host, similar to the way it behaves while Command 0x1001 - Start Transaction is running: Only essential commands and those that are relevant to the current PIN entry session are allowed.
* When the device is waiting for the host to take action, it resets the timeout clock and shows an interstitial page until one of the following occurs: PLEASE WAIT
  * The host calls the same PIN entry command again to show another UI sequence or to end the PIN entry session, or
  * The host calls another allowed command (ending the PIN entry session), or
  * The device has shown until the Timeout the host specified in the command has expired (ending the PIN entry session).
* The host can call this command repeatedly as needed, to invoke any number and any combination of available PIN Entry User Interface Sequences. This allows the host to determine the number of retries, and to exercise flexible fine-grained control over the end-to-end “sequence of sequences.”
* The host may cancel the PIN entry session by calling this command again with User Interface Sequence = Cancel PIN Session. In response, the device shows an interstitial page: PIN Entry Canceled for 2 seconds, then returns to idle.

Typical flow and behaviors are described below.

{% stepper %}
{% step %}
The host invokes this command using the format in Table 182.
{% endstep %}

{% step %}
If an error occurs, the device returns a command response message as shown in Table 183 with Response Status, Operation Status Summary byte set to 0x80 (Failed to start operation), and terminates the command.
{% endstep %}

{% step %}
If no error occurs, the device returns a command response message as shown in Table 183 with Response Status, Operation Status Summary byte set to 0x01 (OK, Started / Running), and enters PIN Entry Mode.
{% endstep %}

{% step %}
The device shows one of the predefined messages specified by the User Interface Sequence parameter and waits up to the specified Timeout for the cardholder to enter a PIN.
{% endstep %}

{% step %}
If the host has specified User Interface Sequence = Enter PIN / Enter PIN Again, the device automatically prompts the cardholder to enter the PIN a second time.
{% endstep %}

{% step %}
When the command completes (PIN entry done, cardholder or operator canceled, or Wait Time timeout), the device sends Notification 0x0205 - Banking Functions Operation Complete to report Touchscreen / PIN Entry. If PIN entry is successful, the report also contains a payload as shown in Table 331. The EPB format the device uses depends on the parameters the host specified in the command:

* If the host provided the Account Number data in the command, the device creates the EPB using the PIN Block Format the host specified in the command.
* If the host did not provide the Account Number data in the command, the device creates the EPB using ISO format 1.
  {% endstep %}

{% step %}
If the host is performing a PIN Verification function (such as User Interface Sequence = Enter PIN), the host software uses the financial institution’s backend systems to compare the EPB to the account information on file, receives a result as to whether the entered PIN was correct, and reports the results to the teller and to the device.

* If the PIN is correct, the host calls the same command again with parameter User Interface Sequence = PIN Entry Successful to indicate success and exit PIN Entry Mode. The device responds by showing an interstitial page for 2 seconds, then returns to idle. The device sounds the EMV success tone to audibly report the result and call the cardholder’s attention to the display.
* If the PIN is incorrect, depending on host-driven retry rules and the history of the session:
  * The host may call the same command again with parameter User Interface Sequence = PIN Incorrect, Try Again to show the prompt. The device sounds the EMV failure tone to audibly report the result and call the cardholder’s attention to the display.
  * The host may call the same command again with other User Interface Sequences as desired.
  * The host must eventually finalize by calling the same command again with parameters to end the PIN entry session. If the host calls the command with User Interface Sequence = PIN Entry Failed to trigger final failure, the device shows an interstitial page for 2 seconds, then returns to idle. The device also sounds the EMV failure tone.
    {% endstep %}

{% step %}
If the host is performing a PIN Entry / Re-PIN function (such as User Interface Sequence = Enter PIN / Enter PIN Again), after the cardholder enters the PIN a second time:

* If the PINs match:
  * The device sends the Encrypted PIN block to the host by sending Notification 0x0205 - Banking Functions Operation Complete to report Touchscreen / PIN Entry / Success / Data Attached. The host may pass this PIN block to backend systems for processing and storage.
  * The host calls the same command again with parameter User Interface Sequence = PIN Entry Successful to indicate success and exit PIN Entry Mode. The device shows an interstitial page for 2 seconds, then returns to idle mode. The device also sounds the EMV success tone.
  * If the PINs do not match, the device sends Notification 0x0205 - Banking Functions Operation Complete to report Touchscreen / PIN Entry / Operation Failed / PIN Verify Failed. Depending on host-driven retry rules and the history of the session:
    * The host may call the same command again with parameter User Interface Sequence = Enter PIN / Enter PIN Again to prompt the cardholder to enter a PIN twice again.
    * The host must eventually finalize by calling the same command again with parameters to end the PIN entry session. If the host calls the command with User Interface Sequence = PIN Entry Failed to trigger final failure, the device shows an interstitial page for 2 seconds, then returns to idle. The device also sounds the EMV failure tone.
      {% endstep %}
      {% endstepper %}

## Table - Request Data for Command 0x2001 - Request PIN with Host Supplied Account Data (Banking Functions Only)

<table><thead><tr><th width="184.66668701171875">Tag</th><th width="74">Len</th><th width="296">Value / Description</th><th width="77.33331298828125">Typ</th><th width="73.99993896484375">Req</th><th width="96.6666259765625">Default</th></tr></thead><tbody><tr><td>Beginning of any wrappers, at minimum including <strong>Request Message</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2001 = <strong>Command 0x2001 - Request PIN with Host Supplied Account Data (Banking Functions Only)</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>81</td><td>01</td><td>Timeout</td><td>B</td><td>B</td><td></td></tr><tr><td></td><td></td><td><p>Timeout in seconds that the device should wait for the cardholder to enter PIN and confirm completion.</p><ul><li>0x00 = Reserved, Not Allowed</li><li>0x01 to 0xFF = 1 to 255 seconds</li></ul></td><td></td><td></td><td></td></tr><tr><td>82</td><td>01</td><td><p>User Interface Sequence</p><ul><li>0x00 = Enter PIN (start session)</li><li>0x02 = PIN Incorrect, Try Again (continue session)</li><li>0x03 = Enter PIN / Enter PIN Again (start session)</li><li>0x05 = Enter PIN Again (continue session)</li><li>0xFD = Cancel PIN Session (end session)</li><li>0xFE = PIN Entry Failed (end session)</li><li>0xFF = PIN Entry Successful (end session)</li></ul></td><td>B</td><td>R</td><td></td></tr><tr><td>83</td><td>02</td><td>PIN Length Limits Byte 1 Maximum PIN Length (&#x3C;= 0x0C) Byte 2 Minimum PIN Length (>=0x04)</td><td>B</td><td>R</td><td></td></tr><tr><td>A1</td><td>var</td><td>Account Number Options</td><td>T</td><td>R</td><td></td></tr><tr><td>/81</td><td>01</td><td>Account Number Length When host specifies <strong>PIN Block Format</strong> parameter = <strong>ISO Format 1</strong>the Account Number length must be 0 When host specifies <strong>PIN Block Format</strong>parameter = <strong>ISO Format 0 or 3</strong>the Account Number length must be 12 When host specifies <strong>PIN Block Format</strong>parameter = <strong>ISO Format 4</strong> the Account Number length must be between 12 and 19 , if this length is not an even number, the device ignores the rightmost nibble, which the host should generally set to zero.</td><td>B</td><td>R</td><td></td></tr><tr><td>/82</td><td>var</td><td>Account Number If the host does provide an account number, it must provide it in Compressed Numeric (CN) format as defined by <em><strong>EMV 4.3 Book 3</strong></em>, section <em><strong>Data Element Format Conventions</strong></em></td><td>CN</td><td>O</td><td></td></tr><tr><td>85</td><td>01</td><td><p>PIN Block Format</p><ul><li>0x00 = ISO Format 0</li><li>0x01 = ISO Format 1</li><li>0x03 = ISO Format 3</li><li>0x04 = ISO Format 4</li></ul></td><td>B</td><td>R</td><td></td></tr><tr><td>End of any wrappers, at minimum including <strong>Request Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

## Table - Response Data for Command 0x2001 - Request PIN with Host Supplied Account Data (Banking Functions Only)

<table><thead><tr><th width="242.33331298828125">Tag</th><th width="73.33331298828125">Len</th><th>Value / Description</th><th width="72.66668701171875">Typ</th><th width="73.33331298828125">Req</th><th width="97.333251953125">Default</th></tr></thead><tbody><tr><td>Beginning of any wrappers, at minimum including <strong>Response Message</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2001 = <strong>Command 0x2001 - Request PIN with Host Supplied Account Data (Banking Functions Only)</strong></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>No parameters.</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>End of any wrappers, at minimum including <strong>Response Message</strong> </td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

If the request started successfully, the Response Status in the message wrapper is OK, Started/Running.

## Table - Request Example for Command 0x2001 - Request PIN with Host Supplied Account Data (Banking Functions Only)

{% code title="Example (Hex)" %}

```
AA 00 81 04 01 09 20 01 84 1C 20 01 81 01 3C 82 01 00 83 02 08 04 85 01 00 A1 0B 81 01 0C 
82 06 12 34 56 78 90 12
```

{% endcode %}

## Table - Response Example Command 0x2001 - Request PIN with Host Supplied Account Data (Banking Functions Only)

{% code title="Example (Hex)" %}

```
AA 00 81 04 82 09 20 01 82 04 01 00 00 00
```

{% endcode %}


---

# 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/hardware/card-readers/mms-dyna-devices/dynaflex-ii-ped/documentation/developers-manuals/dynaflex-ii-ped-programmers-manual/commands/banking-functions/request-pin-with-host-supplied-account-data.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.
