> 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/requestcardswipe.md).

# requestCardSwipe

This query string instructs the device to prompt for a card swipe.

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

<table data-header-hidden><thead><tr><th width="165.81817626953125" 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>requestCardSwipe</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">Comma delimited list of arguments to be passed to MagneFlex. requestCardSwipe requires no arguments.</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 application.</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:**

```
https://192.168.10.100/magneflexdemo/default.aspx? 
operation=requestCardSwipe
&httpMethod=GET
&closeDeviceAfter=true
&readerArgument= 
&destinationURL=https://192.168.10.100/magneflexdemo/cardpostback.aspx 
&requestLocation=false
&passInData=

```

**Return Value:**

The CardSwipe output in TVL format.

<table data-header-hidden><thead><tr><th width="138.54547119140625" 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>CARD_SWIPE_RESULT</p></td></tr><tr><td valign="top">cardDataIn</td><td valign="top"><p>Magnetic swipe card data in TLV format.</p><p>FA (Container for generic data) DFDF25 (Device serial number)</p><p>F4 (Container for Encrypted MSR data) DFDF30 (Masked T1 status) DFDF31 (Masked T1)</p><p>DFDF32 (Masked T2 status) DFDF33 (Masked T2)</p><p>DFDF34 (Masked T3 status) DFDF35 (Masked T3)</p><p>DFDF37 (Encrypted T1) DFDF39 (Encrypted T2) DFDF3B (Encrypted T3)</p><p>DFDF3C (Encrypted MagnePrint) DFDF43 (MagnePrint Status) DFDF50 (MSR KSN)</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>

**Example:**&#x20;

```
https://192.168.10.100/magneflexdemo/cardpostback.aspx?errorCode=0&errorMessage=OK&opType=CARD_SWIPE_RESULT&cardDataIn=FA820178DFDF250F42324 6363045413036313731364141F4820161DFDF300100DFDF314A2542353535353030303
032303030343434345E4D4153544552434152442F4155544F4D4154494F4E495E31383
0363230313030303030303030303030303030303030303030303030303FDFDF320100D 
FDF33263B353535353030303032303030343434343D313830363230313030303030303 
030303030303FDFDF340100DFDF3500DFDF3750A7803ECF28219BB1C955D7A88FC281B 
A663BE8590491D04FD7FD33BEAEB0B7ADD52B0FC39EEED677408FA65D68B5130D230EB 
99B769D05EE42AF6CE5FF09E335E2C8686D9C95FEB6D957771BEA899CDEDFDF3928112
1CC637D0F5921D8ED05FDCAE436C93384BC949C12FC85F34C29E3951A85D797765959D
44514F0DFDF3B00DFDF3C383B61305D74C5B8FD39A3F9D7733F5F435F173ADE58897A4
07D4ED41D1F84BA7F2EA091D035B2990A0722C193F64BF1E7AD038BD3C0690D81DFDF4
30461401000DFDF500A9010010B2F60EA0001B9&passInData=
```


---

# 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/requestcardswipe.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.
