
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=Parameter
Description
operation
Operation to request from MagneFlex. Use:
requestCardSwipe
httpMethod
HTTP method to be used for the HTTP postback from MagneFlex. Use:
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.
closeDeviceAfter
Flag to close the device after the request. Use:
true – close device
false – do not close the device
readerArgument
Comma delimited list of arguments to be passed to MagneFlex. requestCardSwipe requires no arguments.
destinationURL
MagneFlex will send the postback to this URL.
requestLocation
Flag to send GPS location of the device from which Magneflex (iOS only) is hosted.
Use:
true – send location
false – do not send location
passInData
Optional data to send to MagneFlex. This data will be passed back to the web application.
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:
Return Value:
The CardSwipe output in TVL format.
Parameter
Description
errorCode
Error status. 0 is Success. Non-Zero is an error.
errorMessage
Description of the errorCode.
opType
The type of operation. For this command the value is:
CARD_SWIPE_RESULT
cardDataIn
Magnetic swipe card data in TLV format.
FA (Container for generic data) DFDF25 (Device serial number)
F4 (Container for Encrypted MSR data) DFDF30 (Masked T1 status) DFDF31 (Masked T1)
DFDF32 (Masked T2 status) DFDF33 (Masked T2)
DFDF34 (Masked T3 status) DFDF35 (Masked T3)
DFDF37 (Encrypted T1) DFDF39 (Encrypted T2) DFDF3B (Encrypted T3)
DFDF3C (Encrypted MagnePrint) DFDF43 (MagnePrint Status) DFDF50 (MSR KSN)
passInData
Optional data to send to MagneFlex. This data will be passed back to the web app.
Example:
https://192.168.10.100/magneflexdemo/cardpostback.aspx?errorCode=0&err orMessage=OK&opType=CARD_SWIPE_RESULT&cardDataIn=FA820178DFDF250F423246363045413036313731364141F4820161DFDF300100DFDF314A2542353535353030303032303030343434345E4D4153544552434152442F4155544F4D4154494F4E495E313830363230313030303030303030303030303030303030303030303030303FDFDF320100DFDF33263B353535353030303032303030343434343D313830363230313030303030303030303030303FDFDF340100DFDF3500DFDF3750A7803ECF28219BB1C955D7A88FC281BA663BE8590491D04FD7FD33BEAEB0B7ADD52B0FC39EEED677408FA65D68B5130D230EB99B769D05EE42AF6CE5FF09E335E2C8686D9C95FEB6D957771BEA899CDEDFDF39281121CC637D0F5921D8ED05FDCAE436C93384BC949C12FC85F34C29E3951A85D797765959D44514F0DFDF3B00DFDF3C383B61305D74C5B8FD39A3F9D7733F5F435F173ADE58897A407D4ED41D1F84BA7F2EA091D035B2990A0722C193F64BF1E7AD038BD3C0690D81DFDF430461401000DFDF500A9010010B2F60EA0001B9&passInData=
requestSendCommand
This query string sends a command to the device and returns the raw response from the device.
Parameter
Description
operation
Operation to request from MagneFlex. Use:
requestSendCommand
httpMethod
HTTP method to be used for the HTTP postback from MagneFlex. Use:
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.
closeDeviceAfter
Flag to close the device after the request. Use:
true – close device
false – do not close the device
readerArgument
Comma delimited list of arguments to be passed to MagneFlex. Arguments:
timeLimit:, command:, endSession:
Argument details:
timeLimit - Seconds to wait before the operation times out. Value is in hexadecimal format.
(00 - FF)
command - The command to send to the device.
endSession - Flag to end the session for the device. Default value is true.
“true” = End the session after the request is processed.
“false” = Do not end the session after the request is processed.
destinationURL
MagneFlex will send the postback to this URL.
requestLocation
Flag to send GPS location of the device from which Magneflex (iOS only) is hosted.
Use:
true – send location
false – do not send location
passInData
Optional data to send to MagneFlex. This data will be passed back to the web app.
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 Command response output in Hex string format of device raw response for this command.
Parameter
Description
errorCode
Error status. 0 is Success. Non-Zero is an error.
errorMessage
Description of the errorCode.
opType
The type of operation. For this command the value is:
SEND_COMMAND_RESULT
commandID
Command that was sent.
commandResult
Data returned from the command sent to the device.
passInData
Optional data to send to MagneFlex. This data will be passed back to the web app.
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.
Parameter
Description
operation
Operation to request from MagneFlex. Use: requestSendExtendedCommand
httpMethod
HTTP method to be used for the HTTP postback from MagneFlex. Use:
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.
closeDeviceAfter
Flag to close the device after the request. Use:
true – close device
false – do not close the device
readerArgument
Extended command to send to reader.
destinationURL
MagneFlex will send the postback to this URL.
requestLocation
Flag to send GPS location of the device from which Magneflex (iOS only) is hosted.
Use:
true – send location
false – do not send location
passInData
Optional data to send to MagneFlex. This data will be passed back to the web app.
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:
Return Value:
The Extended Command response output in Hex string format of device raw response for this command.
Parameter
Description
errorCode
Error status. 0 is Success. Non-Zero is an error.
errorMessage
Description of the errorCode.
opType
The type of operation. For this command the value is:
SEND_EXTENDED_COMMAND_RESULT
commandID
Command that was sent.
commandResult
Result of a command sent to the device.
passInData
Optional data to send to MagneFlex. This data will be passed back to the web app.
Example:
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)
This query string sends a batch of commands to the device and returns the raw response from the device.
Parameter
Description
operation
Operation to request from MagneFlex. Use: requestSendBatchCommand
httpMethod
HTTP method to be used for the HTTP postback from MagneFlex. Use:
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.
readerArgument
Batch of commands that should be sent to reader. Commands are delimited by the bar character ‘|’.
Example:
readerArgument=0900|000100|1500
destinationURL
MagneFlex will send the postback to this URL.
requestLocation
Flag to send GPS location of the device from which Magneflex (iOS only) is hosted.
Use:
true – send location
false – do not send location
passInData
Optional data to send to MagneFlex. This data will be passed back to the web app.
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.
Parameter
Description
errorCode
Error status. 0 is Success. Non-Zero is an error.
errorMessage
Description of the errorCode.
opType
The type of operation. For this command the value is:
SEND_BATCH_COMMAND_RESULT
commandResult
Result of a command sent to the device formatted as:
[command]-[result]
For each command sent in a batch is returned a separate commandResult. Example:
&commandResult=0900-000A9010010B355414000099 &commandResult=000100-000D31303030303033333534433033
&commandResult=1500-000103
passInData
Optional data to send to MagneFlex. This data will be passed back to the web app.
requestStartEMVTransaction (EMV Only)
This query string begins an EMV transaction.
Parameter
Description
operation
Operation to request from MagneFlex. Use: requestStartEMVTransaction
httpMethod
HTTP method to be used for the HTTP postback from MagneFlex. Use:
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.
closeDeviceAfter
Flag to close the device after the request. For requestStartEMVTransaction use:
false – do not close the device
readerArgument
Comma delimited list of arguments to be passed to MagneFlex. Arguments:
timeLimit:, cardType:, option:, amount:, transactionType:, cashBack:, currencyCode:, endSession:, quickChipMode:, reserved:
Argument details:
timeLimit - Seconds to wait before the operation times out. Value is in hexadecimal format.
(00 - FF)
transactionType - Type of transaction to be used in hexadecimal: 00 = Purchase (listed as “Payment” on ICS)
01 = Cash Advance (not supported for this reader) 02 or 09 = Cash back (09 not supported, contactless) 04 = Goods (Purchase)
08 = Services (Purchase)
10 = International Goods (Purchase) 20 = Refund
40 = International Cash Advance or Cash Back 80 = Domestic Cash Advance or Cash Back
cardType - Card type that can be used for the transaction:
1 = Magnetic stripe
2 = Contact smart card
3 = Magnetic stripe or contact smart card
amount - The amount to be used and authorized, EMV Tag 9F02. Format in decimal.
cashBack - Amount of cash back to be used, EMV Tag 9F02. Format in decimal.
currencyCode - Transaction Currency Code (EMV Tag 5F2A, format n4 string)
Sample valid values:
0840 = US Dollar 0978 = Euro
0826 = UK Pound
endSession - Flag to end the session for the device. Default value is true.“true” = End the session after the request is processed.
“false” = Do not end the session after the request is processed.
quickChipMode - Flag to start the transaction to accommodate qwick Chip mode.
“true” = Accommodate qwick chip mode.
“false” = Do not accommodate qwick chip mode.
reserved - These are the reserved bytes beginning at index 20
of the 0xA2 command. Reference device manual D99875585 for more details.
Example:
0000000000000000000000000840000100 – QuickDip Mode
0000000000000000000000000840000003 – PIN Verify
0000000000000000000000000840000004 – PIN Set
destinationURL
MagneFlex will send the postback to this URL.
requestLocation
Flag to send GPS location of the device from which Magneflex (iOS only) is hosted.
Use:
true – send location
false – do not send location
passInData
Optional data to send to MagneFlex. This data will be passed back to the web app.
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:
Return Value:
The EMV ARQC response output in Hex string format of device raw response for this command.
Parameter
Description
errorCode
Error status. This parameter is only available when the status is not successful.
errorMessage
Description of the errorCode. This parameter is only available when the status is not successful.
opType
The type of operation. For this command the value is:
EMV_ARQC_RESULT
arqcData
ARQC data from the device.
passInData
Optional data to send to MagneFlex. This data will be passed back to the web app.
Example:
https://192.168.10.100/magneflexdemo/cardpostback.aspx?opType=EMV_ARQC &arqcData=0211F982020DDFDF540A00000000000000000000DFDF550182DFDF250F42 3246363045413036313731364141FA8201E3708201DFDFDF5301005F20164D4153544552434152442F4155544F4D4154494F4E49DFDF4D263B353535353030303032303030343434343D313830363230313030303030303030303030303FDFDF520105F882018EDFDF59820170A95450D8E8376FBF7105F641858BD1E5945ABB7196759757BE9923631B7C5A3B530D27DB156E3321EEB740D5BC29EF85639CC678F4FB7FD1891FA6FFD6F696A9701AF8FC9C3C84FF98B8C05DD386048426C1FD2892C092D17CAB172A47C0C95899EDF643886DC9DA910203D09186ABF09BE524ABE33A9AD73703F59C6FD5727C468650CB975D92D5BB0DE359163527A8C04130626CC27A1B5C63598E3E7F26F367866A563AB091EC35A14D4F392522132FC5097E3757EFC52174445090DE44100FB453FD4BE077DB24F6D99E00EEBB92C9FD6604723C6E2393BA0F2F2A70F9A915D91E0A02D88A8807A77E7739F1CBCDCA791E647B56AD146C83AA57CD300589A60042A51BE3233C59F8AEE25F1D207F14FF8E0A968560612654F7B944B8B63ADF3467B24445D5FBE40DE8A2C46171461FD1D577ADDC568EB21A13E2913CA19C0FAE06BD8FE16B9B349481721D365BE5EA68BBACA63CDD76A78045ED1C128A90EF166F2DED19239ED6AF35DCA40128DADFDF560A9010010B2F60EA0001C3DFDF570180DFDF5801030000000000000011223344&passInData=testdata
Last updated

