> 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-card-supplied-account-data.md).

# Request PIN with Card Supplied Account Data

## Command 0x2002 - Request PIN with Card Supplied Account Data (Banking Functions Only) <a href="#toc203725819" id="toc203725819"></a>

This command directs the device to prompt the cardholder to present their card by swiping, dipping or tapping, and to enter a PIN. To prompt the cardholder for a PIN without presenting a card when the host knows the account number already, use Command 0x2001 - Request PIN with Host Supplied Account 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:
  * 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 the interstitial until the Timeout the host specified in the command has expired (ending the PIN entry session).
* The host can call this command again and again as needed, to invoke any number and any combination of available PIN Entry User Interface Sequences. This allows the host to determine 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.

The usual sequence is as follows:&#x20;

{% stepper %}
{% step %}

### Step: Host invokes the command

* The host invokes this command using the format in Table 186.
* If an error occurs, the device returns a command response message as shown in Table 187 with Response Status, Operation Status Summary byte set to 0x80 (Failed to start operation), and terminates the command.
* If no error occurs, the device returns a command response message as shown in Table 187 with Response Status, Operation Status Summary byte set to 0x01 (OK, Started / Running), and enters PIN Entry Mode.
  {% endstep %}

{% step %}

### Step: Request card and wait

* The device shows a prompt requesting the cardholder present one of the payment technologies specified in the Reader Options parameter, and waits up to the specified Timeout for the cardholder to respond.
  {% endstep %}

{% step %}

### Step: Card presented — report and data capture

* After the cardholder presents a card, the device sends Notification 0x0201 - Banking Functions Information Update to report the payment technology being used / Card Event / Detected.
* If the cardholder swiped a magnetic stripe card, the device reads Track 2 data.
* If the cardholder inserts an ICC or taps a PICC, the device reads records from the card and attempts to retrieve tags 57 (Track 2 Equivalent Data) and 5A (Primary Account number). It then powers off the card without performing the first Generate Application Cryptogram, so the card does not increment its transaction counters.
* If an error occurs, the device terminates the command and PIN entry session and sends Notification 0x0205 - Banking Functions Operation Complete to report Touchscreen / PIN Entry / Operation Failed / Account Data Capture Failed.
  {% endstep %}

{% step %}

### Step: Show PIN prompt and wait for PIN entry

* 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.
* If the host specified User Interface Sequence = Enter PIN / Enter PIN Again, the device automatically prompts the cardholder to enter the PIN a second time.
  {% endstep %}

{% step %}

### Step: Command completion and operation complete notification

* 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 332. The device creates the EPB using the PIN Block Format the host specified in the command.
  {% endstep %}

{% step %}

### Step: Host performs PIN verification (host-side)

* 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 %}

### Step: Host performs PIN Entry / Re-PIN (enter twice)

* 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 and 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 and sounds the EMV failure tone.
        {% endstep %}
        {% endstepper %}

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

<table><thead><tr><th width="205">Tag</th><th width="77.3333740234375">Len</th><th width="256">Value / Description</th><th width="73.6666259765625">Typ</th><th width="80">Req</th><th width="96">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>2002 = <strong>Command 0x2002 - Request PIN with Card 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 — Timeout in seconds that the device should wait for the cardholder to present card, enter PIN and confirm completion.</td><td>B</td><td>R</td><td></td></tr><tr><td>A3</td><td>09</td><td><p>Reader Options: </p><p>The parameters inside this TLV data object allow the host to enable and disable the various payment method interfaces</p></td><td>TC</td><td>R</td><td></td></tr><tr><td>/81</td><td>01</td><td>Magnetic Stripe Reader Mode — 0x00 = Disabled; 0x01 = Enabled</td><td>B</td><td>R</td><td></td></tr><tr><td>/82</td><td>01</td><td>Contact Reader Mode — 0x00 = Disabled; 0x01 = Enabled</td><td>B</td><td>R</td><td></td></tr><tr><td>/83</td><td>01</td><td>Contactless Reader Mode — 0x00 = Disabled; 0x01 = Enabled</td><td>B</td><td>R</td><td></td></tr><tr><td>A4</td><td>0A</td><td>PIN Entry Options</td><td>B</td><td>R</td><td></td></tr><tr><td>/82</td><td>01</td><td><p>User Interface Sequence —</p><ul><li>0x00 = Reserved</li><li>0x01 = Present Card / Enter PIN (start session)</li><li>0x02 = PIN Incorrect, Try Again (continue session)</li><li>0x03 = Enter PIN / Enter PIN Again (continue session)</li><li>0x04 = Present Card / Enter PIN / Enter PIN Again (start 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 (Only when PIN is requested) — 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>/85</td><td>01</td><td><p>PIN Block Format (Only when PIN is requested) —</p><ul><li>0x00 = ISO Format 0</li><li>0x01 = Reserved / Invalid</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 0x2002 - Request PIN with Card Supplied Account Data (Banking Functions Only)

<table><thead><tr><th width="235.33331298828125">Tag</th><th width="75.33331298828125">Len</th><th width="216.66668701171875">Value / Description</th><th width="75.66668701171875">Typ</th><th width="73.6666259765625">Req</th><th width="99.3333740234375">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>2002 = <strong>Command 0x2002 - Request PIN with Card 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 Request Status in the message wrapper is OK / Operation Started.

## Table - Request Example Command 0x2002 - Request PIN with Card Supplied Account Data (Banking Functions Only)

| Example (Hex)                                                                                                     |
| ----------------------------------------------------------------------------------------------------------------- |
| AA 00 81 04 01 0C 20 02 84 1C 20 02 81 01 3C A3 09 81 01 01 82 01 01 83 01 01 A4 0A 82 01 01 83 02 08 04 85 01 00 |

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

| Example (Hex)                             |
| ----------------------------------------- |
| AA 00 81 04 82 0C 20 02 82 04 01 00 00 00 |


---

# 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-card-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.
