> 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-go/documents/user-manuals/magneflex-browser-developer-tool-programmers-reference-web-api/magneflex-browser-web-api-resources/requestsendcommand-pinpad-only.md).

# requestSendCommand (PinPad Only)

This query string sends a command to the device and returns the raw response from the device.

{% code overflow="wrap" %}

```
?operation=
&httpMethod= 
&closeDeviceAfter= 
&readerArgument= 
&destinationURL= 
&requestLocation= 
&passInData=
```

{% endcode %}

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">operation</td><td valign="top"><p>Operation to request from MagneFlex. Use:</p><p>requestSendCommand</p></td></tr><tr><td valign="top">httpMethod</td><td valign="top"><p>HTTP method to be used for the HTTP postback from MagneFlex. Use:</p><p>GET - returns the response data in the form of a query string. POST – recommended for EVM related transactions to accommodate limits on query string lengths.</p></td></tr><tr><td valign="top">closeDeviceAfter</td><td valign="top"><p>Flag to close the device after the request. Use:</p><p>true – close device</p><p>false – do not close the device</p></td></tr><tr><td valign="top">readerArgument</td><td valign="top"><p>Comma delimited list of arguments to be passed to MagneFlex. Arguments:</p><p>timeLimit:, command:, commandType:, waitForReport:, endSession:</p><p>Argument details:</p><p>timeLimit - Seconds to wait before the operation times out. Value is in hexadecimal format.</p><p>(1 - 255)</p><p> </p><p>command – Command to be sent in hexadecimal.</p><p>commandType – Type of command to be sent.</p><p>“SET” = For commands where the ACK status is to be returned. “GET” = For commands where the data is to be returned.</p><p> </p><p>waitForReport - The report number to wait for before returning the response.</p><p>Example:</p><p>Command 30 00 (Set KSN) will respond with an ACK (01) or with data in Get Mode (30).</p><p>“01” = will return the response for ACK report (01). “30” = will return the data report (30).</p><p> </p><p>endSession - Flag to end the session for the device. Default value is true.</p><p>“true” = End the session after the request is processed.</p><p>“false” = Do not end the session after the request is processed.</p></td></tr><tr><td valign="top">destinationURL</td><td valign="top">MagneFlex will send the postback to this URL.</td></tr><tr><td valign="top">requestLocation</td><td valign="top"><p>Flag to send GPS location of the device hosting Magneflex (iOS only). Use:</p><p>true – send location</p><p>false – do not send location</p></td></tr><tr><td valign="top">passInData</td><td valign="top">Optional data to send to MagneFlex. This data will be passed back to the web app.</td></tr></tbody></table>

Each input parameter supplied in the request is delimited by an ampersand character ‘&’, and the value for a parameter begins after an equal character ‘=’. Where ever a parameter contains multiple values, each are delimited by a comma character ‘,’.

**Example query:**

{% code overflow="wrap" %}

```
https://192.168.10.100/magneflexdemo/default.aspx? 
operation=requestSendCommand
&httpMethod=GET
&closeDeviceAfter=true 
&readerArgument=
    timeLimit:3C, 
    command:070501, 
    commandType:SET, 
    waitForReport:27, 
    endSession:true
&destinationURL=https://192.168.10.100/magneflexdemo/cardpostback.aspx 
&requestLocation=false
&passInData=testData
```

{% endcode %}

**Return Value:**

The Command response output in TVL format.

<table data-header-hidden><thead><tr><th width="176.727294921875" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">errorCode</td><td valign="top">Error status. 0 is Success. Non-Zero is an error.</td></tr><tr><td valign="top">errorMessage</td><td valign="top">Description of the errorCode.</td></tr><tr><td valign="top">opType</td><td valign="top"><p>The type of operation. For this command the value is:</p><p>SEND_COMMAND_RESULT</p></td></tr><tr><td valign="top">commandID</td><td valign="top">Command that was sent.</td></tr><tr><td valign="top">commandResult</td><td valign="top">Data returned from the command sent to the device.</td></tr><tr><td valign="top">passInData</td><td valign="top">Optional data to send to MagneFlex. This data will be passed back to the web app.</td></tr></tbody></table>

**Example:**

{% code overflow="wrap" %}

```
https://192.168.10.100/magneflexdemo/cardpostback.aspx?errorCode=0&err orMessage=OK&opType=SEND_COMMAND_RESULT&commandID=070501&commandResult
=270000401F3F12006034F70080F8FFFF6034F70080F8FFFF70E6530F80FAFFFF20F34 40D80FAFFFF287EF40080F8FFFF10B4480D80FAFFFF78B4480D80FAFFFF80B4480D80F AFFFF00000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000&passInData=testdata
```

{% endcode %}

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">operation</td><td valign="top"><p>Operation to request from MagneFlex. Use:</p><p>requestSignature</p></td></tr><tr><td valign="top">httpMethod</td><td valign="top"><p>HTTP method to be used for the HTTP postback from MagneFlex. Use:</p><p>GET - returns the response data in the form of a query string. POST – recommended for EVM related transactions to accommodate limits on query string lengths.</p></td></tr><tr><td valign="top">closeDeviceAfter</td><td valign="top"><p>Flag to close the device after the request. Use:</p><p>true – close device</p><p>false – do not close the device</p></td></tr><tr><td valign="top">readerArgument</td><td valign="top"><p>Comma delimited list of arguments to be passed to MagneFlex. Arguments:</p><p>timeLimit:, option:, tone:, endSession:</p><p>Argument details:</p><p>timeLimit - Seconds the device will wait for the user to complete the operation in hexadecimal.</p><p>(1 - 255)</p><p> </p><p>option:</p><p>0 = Timeout clears any signature data</p><p>1 = Timeout returns timeout status plus length collected. Sig Data can be requested.</p><p> </p><p>tone – Type of prompt tone:</p><p>0 = No sound</p><p>1 = One beep</p><p>2 = Two beeps</p><p> </p><p>endSession - Flag to end the session for the device. Default value is true.</p><p>“true” = End the session after the request is processed.</p><p>“false” = Do not end the session after the request is processed.</p></td></tr><tr><td valign="top">destinationURL</td><td valign="top">MagneFlex will send the postback to this URL.</td></tr><tr><td valign="top">requestLocation</td><td valign="top"><p>Flag to send GPS location of the device from which Magneflex (iOS only) is hosted.</p><p>Use:</p><p>true – send location</p><p>false – do not send location</p></td></tr><tr><td valign="top">passInData</td><td valign="top">Optional data to send to MagneFlex. This data will be passed back to the web app.</td></tr></tbody></table>

Each input parameter supplied in the request is delimited by an ampersand character ‘&’, and the value for a parameter begins after an equal character ‘=’. Where ever a parameter contains multiple values, each are delimited by a comma character ‘,’.

**Example query:**

{% code overflow="wrap" %}

```
https://192.168.10.100/magneflexdemo/default.aspx? 
&operation=requestSignature
&httpMethod=GET 
&closeDeviceAfter=true 
&readerArgument=
    timeLimit:3C, 
    option:00, 
    tone:01, 
    endSession:true
&destinationURL=https://192.168.10.100/magneflexdemo/cardpostback.aspx 
&requestLocation=false
&passInData=testData
```

{% endcode %}

**Return Value:**

The Signature capture output in TVL format.

<table data-header-hidden><thead><tr><th width="160.3636474609375" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Parameter</td><td valign="top">Description</td></tr><tr><td valign="top">errorCode</td><td valign="top">Error status. 0 is Success. Non-Zero is an error.</td></tr><tr><td valign="top">errorMessage</td><td valign="top">Description of the errorCode.</td></tr><tr><td valign="top">opType</td><td valign="top"><p>The type of operation. For this command the value is:</p><p>SIGNATURE_RESULT</p></td></tr><tr><td valign="top">signatureDataIn</td><td valign="top">Signature data from the device in hexadecimal format.</td></tr><tr><td valign="top">signatureResult</td><td valign="top">Result of the signature capture.</td></tr><tr><td valign="top">passInData</td><td valign="top">Optional data to send to MagneFlex. This data will be passed back to the web app.</td></tr></tbody></table>

**Example:**

{% code overflow="wrap" %}

```
https://192.168.10.100/magneflexdemo/cardpostback.aspx,Data=opType=SIG NATURE_RESULT&signatureDataIn=283E293F29402B422B442C462E4B2F4F30513257 335A345D346035633769376B386D386E386F376C376937663663365F36573653374F38
4B39473A443C413E3F403D463A493A4D3B513C553E58406046684D6B506E547057725B
7361736473666F696C6A696A656A60695C68FFFF8E6290639163926392649364946495
64FFFF813882388337853787378A378B368D3690369236953599359C34A333A732AB32 B230B62FB92FBD2EC02DC62CC82CFFFFA827A828A929AA2AAA2BAB2CAD2FAE31AF35B0 37B138B23BB33EB542B748B84CB852B855B75AB65CB55EB05FAE60AA5FA75EA35DFFFF
D156CF54CE53CD52CC51CB4FC94EC64BFFFF&signatureResult=0&passInData=test data
```

{% 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:

```
GET https://developer.magtek.com/hardware/card-readers/mms-dyna-devices/dynaflex-ii-go/documents/user-manuals/magneflex-browser-developer-tool-programmers-reference-web-api/magneflex-browser-web-api-resources/requestsendcommand-pinpad-only.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
