# WEB API Resources - Part 1

## 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="190.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">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:**&#x20;

```
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="168.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><img src="file:///C:/Users/Allenr/AppData/Local/Temp/msohtmlclip1/01/clip_image002.gif" alt="">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\\&err> orMessage=OK\&opType=CARD\_SWIPE\_RESULT\&cardDataIn=FA820178DFDF250F423246363045413036313731364141F4820161DFDF300100DFDF314A2542353535353030303032303030343434345E4D4153544552434152442F4155544F4D4154494F4E495E313830363230313030303030303030303030303030303030303030303030303FDFDF320100DFDF33263B353535353030303032303030343434343D313830363230313030303030303030303030303FDFDF340100DFDF3500DFDF3750A7803ECF28219BB1C955D7A88FC281BA663BE8590491D04FD7FD33BEAEB0B7ADD52B0FC39EEED677408FA65D68B5130D230EB99B769D05EE42AF6CE5FF09E335E2C8686D9C95FEB6D957771BEA899CDEDFDF39281121CC637D0F5921D8ED05FDCAE436C93384BC949C12FC85F34C29E3951A85D797765959D44514F0DFDF3B00DFDF3C383B61305D74C5B8FD39A3F9D7733F5F435F173ADE58897A407D4ED41D1F84BA7F2EA091D035B2990A0722C193F64BF1E7AD038BD3C0690D81DFDF430461401000DFDF500A9010010B2F60EA0001B9\&passInData=

## requestSendCommand <a href="#bookmark9" id="bookmark9"></a>

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

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

<table data-header-hidden><thead><tr><th width="202" 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:, endSession:</p><p>Argument details:</p><p>timeLimit - Seconds to wait before the operation times out. Value is in hexadecimal format.</p><p>(00 - FF)</p><p> </p><p>command - The command to send to the device.</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: https://192.168.10.100/magneflexdemo/default.aspx? 
operation=requestSendCommand 
&httpMethod=GET 
&closeDeviceAfter=true 
&readerArgument= 
    timeLimit:3C, 
    command:0900, 
    endSession:true 
&destinationURL=https://192.168.10.100/magneflexdemo/cardpostback.aspx &requestLocation=false 
&passInData= 
```

Return Value:

The Command response output in Hex string format of device raw response for this command.

<table data-header-hidden><thead><tr><th width="187.33331298828125" 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:

<https://192.168.10.100/magneflexdemo/cardpostback.aspx?errorCode=0\\&err> orMessage=OK\&opType=SEND\_COMMAND\_RESULT\&commandID=0900\&commandResult=0 00A9010010B2F60EA0001BA& passInData=

## requestSendExtendedCommand

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

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

```

<table data-header-hidden><thead><tr><th width="208.6666259765625" 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">Operation to request from MagneFlex. Use: requestSendExtendedCommand</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">Extended command to send to reader.</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:&#x20;

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

Return Value:

The Extended Command response output in Hex string format of device raw response for this command.

<table data-header-hidden><thead><tr><th width="174.6666259765625" 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_EXTENDED_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">Result of a 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:&#x20;

<https://192.168.10.100/magneflexdemo/cardpostback.aspx?errorCode=0\\&err> orMessage=OK\&opType=SEND\_EXTENDED\_COMMAND\_RESULT\&commandID=0306\&comman dResult=000001A801A6FA8201A2DFDF2101105F2A0208405F360102DFDF5B010CDFDF5C0102DFDF75010CDFDF76010CDFDF6E010C9F150230309F1607303030303030309F1A0208409F1C0831313232333334349F33032028C89F3501219F4005720000B0019F4E0730303030303030DFDF0109A000000004F8001000DFDF025E9ADFDF289F025A899F109F159F169F4E828E5F245F259F069F079F0D9F0E9F0F9F269F279F369C9F339F349F379F399F40959B9F5BDFDF009F1E9F1A5F2A9F019F218ADF8120DF8121DF81225F20505F34849F039F099F1E9F359F419F53DFDF05299A829F369F1E9F109F5B9F339F35959F015F245A5F348A9F159F169F399F1A9F1C579F025F2A9F219CDFDF06028A91DFDF140400007530DFDF150400000001DFDF160400000080DFDF17599ADFDF289F029F035A899F109F159F169F4E828E5F245F259F069F079F0D9F0E9F0F9F269F279C9F339F349F359F369F379F399F409F419F53959B9F5BDFDF009F1E9F1A5F2A9F018ADF8120DF8121DF81225F205F349F0984DFDF20024328DFDF260E4D414754454B2044454641554C549F3C0209989F3D0102DFDF4704755EFA9B& passInData=

## requestSendBatchCommand (Reserved for Future Use) <a href="#bookmark11" id="bookmark11"></a>

This query string sends a batch of commands to the device and returns the raw response from the device.

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

<table data-header-hidden><thead><tr><th width="180" 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">Operation to request from MagneFlex. Use: requestSendBatchCommand</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">readerArgument</td><td valign="top"><p>Batch of commands that should be sent to reader. Commands are delimited by the bar character ‘|’.</p><p>Example:</p><p>readerArgument=0900|000100|1500</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 ‘,’.

Return Value:

The Batch Command response output in Hex string format of device raw response for this command.

<table data-header-hidden><thead><tr><th width="194.66668701171875" 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_BATCH_COMMAND_RESULT</p></td></tr><tr><td valign="top">commandResult</td><td valign="top"><p>Result of a command sent to the device formatted as:</p><p>[command]-[result]</p><p>For each command sent in a batch is returned a separate commandResult. Example:</p><p>&#x26;commandResult=0900-000A9010010B355414000099 &#x26;commandResult=000100-000D31303030303033333534433033</p><p>&#x26;commandResult=1500-000103</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>

## requestStartEMVTransaction (EMV Only) <a href="#bookmark12" id="bookmark12"></a>

This query string begins an EMV transaction.

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

<table data-header-hidden><thead><tr><th width="189.33331298828125" 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">Operation to request from MagneFlex. Use: requestStartEMVTransaction</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. For requestStartEMVTransaction use:</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:, cardType:, option:, amount:, transactionType:, cashBack:, currencyCode:, endSession:, quickChipMode:, reserved:</p><p>Argument details:</p><p>timeLimit - Seconds to wait before the operation times out. Value is in hexadecimal format.</p><p>(00 - FF)</p><p> </p><p> </p><p>transactionType - Type of transaction to be used in hexadecimal: 00 = Purchase (listed as “Payment” on ICS)</p><p>01 = Cash Advance (not supported for this reader) 02 or 09 = Cash back (09 not supported, contactless) 04 = Goods (Purchase)</p><p>08 = Services (Purchase)</p><p>10 = International Goods (Purchase) 20 = Refund</p><p>40 = International Cash Advance or Cash Back 80 = Domestic Cash Advance or Cash Back</p><p> </p><p>cardType - Card type that can be used for the transaction:</p><p>1 = Magnetic stripe</p><p>2 = Contact smart card</p><p>3 = Magnetic stripe or contact smart card</p><p> </p><p>amount - The amount to be used and authorized, EMV Tag 9F02. Format in decimal.</p><p> </p><p>cashBack - Amount of cash back to be used, EMV Tag 9F02. Format in decimal.</p><p> </p><p>currencyCode - Transaction Currency Code (EMV Tag 5F2A, format n4 string)</p><p>Sample valid values:</p><p>0840 = US Dollar 0978 = Euro</p><p>0826 = UK Pound</p><p> </p><p>endSession - Flag to end the session for the device. Default value is true.“true” = End the session after the request is processed.</p><p>“false” = Do not end the session after the request is processed.</p><p> </p><p>quickChipMode - Flag to start the transaction to accommodate qwick Chip mode.</p><p>“true” = Accommodate qwick chip mode.</p><p>“false” = Do not accommodate qwick chip mode.</p><p> </p><p>reserved - These are the reserved bytes beginning at index 20</p><p>of the 0xA2 command. Reference device manual D99875585 for more details.</p><p>Example:</p><p>0000000000000000000000000840000100 – QuickDip Mode</p><p>0000000000000000000000000840000003 – PIN Verify</p><p>0000000000000000000000000840000004 – PIN Set</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:&#x20;

```
https://192.168.10.100/magneflexdemo/default.aspx? 
operation=requestStartEMVTransaction 
&httpMethod=GET 
&closeDeviceAfter=true 
&readerArgument= 
    timeLimit:3C, 
    cardType:02, 
    option:00, 
    amount:9.99, 
    transactionType:00, 
    cashBack:0.0, 
    currencyCode:0840, 
    endSession:true, 
    quickChipMode:false, 
    reserved:00000000000000000000000008400001 
&destinationURL=https:/192.68.10.100/magneflexdemo/cardpostback.aspx 
&requestLocation=false &passInData=testData
```

Return Value:

The EMV ARQC response output in Hex string format of device raw response for this command.

<table data-header-hidden><thead><tr><th width="178.66668701171875" 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. This parameter is only available when the status is not successful.</td></tr><tr><td valign="top">errorMessage</td><td valign="top">Description of the errorCode. This parameter is only available when the status is not successful.</td></tr><tr><td valign="top">opType</td><td valign="top"><p>The type of operation. For this command the value is:</p><p>EMV_ARQC_RESULT</p></td></tr><tr><td valign="top">arqcData</td><td valign="top">ARQC data from 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:&#x20;

<https://192.168.10.100/magneflexdemo/cardpostback.aspx?opType=EMV\\_ARQC> \&arqcData=0211F982020DDFDF540A00000000000000000000DFDF550182DFDF250F42 3246363045413036313731364141FA8201E3708201DFDFDF5301005F20164D4153544552434152442F4155544F4D4154494F4E49DFDF4D263B353535353030303032303030343434343D313830363230313030303030303030303030303FDFDF520105F882018EDFDF59820170A95450D8E8376FBF7105F641858BD1E5945ABB7196759757BE9923631B7C5A3B530D27DB156E3321EEB740D5BC29EF85639CC678F4FB7FD1891FA6FFD6F696A9701AF8FC9C3C84FF98B8C05DD386048426C1FD2892C092D17CAB172A47C0C95899EDF643886DC9DA910203D09186ABF09BE524ABE33A9AD73703F59C6FD5727C468650CB975D92D5BB0DE359163527A8C04130626CC27A1B5C63598E3E7F26F367866A563AB091EC35A14D4F392522132FC5097E3757EFC52174445090DE44100FB453FD4BE077DB24F6D99E00EEBB92C9FD6604723C6E2393BA0F2F2A70F9A915D91E0A02D88A8807A77E7739F1CBCDCA791E647B56AD146C83AA57CD300589A60042A51BE3233C59F8AEE25F1D207F14FF8E0A968560612654F7B944B8B63ADF3467B24445D5FBE40DE8A2C46171461FD1D577ADDC568EB21A13E2913CA19C0FAE06BD8FE16B9B349481721D365BE5EA68BBACA63CDD76A78045ED1C128A90EF166F2DED19239ED6AF35DCA40128DADFDF560A9010010B2F60EA0001C3DFDF570180DFDF5801030000000000000011223344\&passInData=testdata


---

# Agent Instructions: 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/magnetic-stripe-readers/idynamo-5-gen-iii/documentation/developers-manuals/magneflex-browser-programmers-reference/magneflex-browser-web-api-resources/web-api-resources-part-1.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.
