Capture Card Data

This table summarizes the On Demand methods you will call in order to capture card data or track data without processing the payment transaction.

MethodCondition
1. On Demand Card Read

2. On Demand Device Status

Capture swiped card data information only
1. On Demand Card Read

2. On Demand Device Status

3. On Demand PIN Entry

4. On Demand Device Status

Capture swiped card data and/or PIN data
1. On Demand Card Reset

2. On Demand Device Status

Received statusDetails: TARGET_UNAVAILABLE messsage

important

These methods only apply to CWS integrations.

The requestId or id of the status command (device status) must match the requestId or id of the action command (card read, PIN entry or card reset).

On Demand Card Read

This method directs the card reader to prompt the cardholder to swipe the card through the magnetic swipe reader.

Request

{
    "method" : "startCardReadOnCardReader",
    "requestId" : "715270350",
    "targetType" : "cardReader",
    "version" : "1.0",
    "parameters" : {
        "retrievalModes" : ["SWIPE"]
    }
}

Response

{
    "data" : {
        "cardReaderCommand" : {
            "id" : "715270350",
            "eventQueue" : [],
            "completed" : false
        }
    },
    "statusDetails": "REQUESTED_ACCEPTED",
    "requestId": "715270350"
}

On Demand PIN Entry

This method directs the card reader to request a PIN from the cardholder.

Request

{
    "method" : "startPinEntryOnCardReader",
    "requestId" : "715270350",
    "targetType" : "cardReader",
    "version" : "1.0",
    "parameters" : {
        "maskedPan": "************0119",
    }
}

Response

{
    "data": {
        "cardReaderCommand": {
            "id": "715270350",
            "eventQueue": [],
            "completed": false
        }
    },
    "statusDetails": "REQUEST_ACCEPTED",
    "requestId": "715270350"
}

On Demand Card Reset

This method clears the current commands in the event queue of the card reader.

Request

{
    "method" : "startResetOnCardReader",
    "requestId" : "569998777",
    "targetType" : "cardReader",
    "version" : "1.0",
    "parameters" : { }
}

Response

{
    "data": {
        "cardReaderCommand": {
            "id": "569998777",
            "eventQueue": [],
            "completed": false
        }
    },
    "statusDetails": "REQUEST_ACCEPTED",
    "requestId": "569998777"
}

On Demand Device Status

This method pulls the results of the previous collect card data, PIN entry or device status request.

For On Demand Card Read

Request

{
    "method" : "getCommandStatusOnCardReader",
    "requestId" : "715270350",
    "targetType" : "cardReader",
    "version" : "1.0",
    "parameters" : {
        "id" : "715270350"
    }
}

Response

{
    "data": {
        "cardReaderCommand": {
            "cardData": {
                "source": "SWIPE",
                "maskedPan": "************0119",
                "expirationDate": "",
                "serviceCode": "",
                "ksn": "",
                "firstName": "",
                "lastName": "",
                "cardType": null,
                "posEntryCapability": "05",
                "posEntryMode": null,
                "trackDataFormat": "",
                "encryptedCombineTrack1Data": "",
                "encryptedTrack1Data": null,
                "encryptedTrack2Data": null,
                "cardEncryptionFormat": ""
            },
            "id": "715270350",
            "eventQueue": [
                {
                    "timeStamp": "1547666076671",
                   "statusDetails": "CARD_ENTRY_PROMPTED"
                },
                {
                    "timeStamp": "1547666082637",
                    "statusDetails": "CARD_SWIPED"
                },
                {
                    "timeStamp": "1547666082637",
                    "statusDetails": "CARD_ENTRY_COMPLETED"
                }
            ],
            "completed": true
        }
    },
    "statusDetails": "REQUEST_ACCEPTED",
    "requestId": "715270350"
}

For On Demand PIN Entry

Request

{
    "method" : "getCommandStatusOnCardReader",
    "requestId" : "715270350",
    "targetType" : "cardReader",
    "version" : "1.0",
    "parameters" : {
        "id" : "715270350"
    }
}

Response

{
    "data": {
        "cardReaderCommand": {
            "pinData": {
                "ksn": "",
                "pin": "",
                "encryptionMethod": ""
            },
            "id": "715270350",
            "eventQueue": [
                {
                    "timeStamp": "1547666248446",
                    "statusDetails": "PIN_ENTRY_STARTED"
                },
                {
                    "timeStamp": "1547666251903",
                    "statusDetails": "PIN_ENTRY_COMPLETED"
                }
            ],
            "completed": true
        }
    },
    "statusDetails": "REQUEST_ACCEPTED",
    "requestId": "715270350"
}

For On Demand Card Reset

Request

{
    "method" : "getCommandStatusOnCardReader",
    "requestId" : "569998777",
    "targetType" : "cardReader",
    "version" : "1.0",
    "parameters" : {
        "id" : "569998777"
    }
}

Response

{
    "data": {
        "cardReaderCommand": {
            "id": "569998777",
            "eventQueue": [
                {
                    "timeStamp": "1547667568412",
                    "statusDetails": "PIN_PAD_RESETTING"
                },
                {
                    "timeStamp": "1547667568642",
                    "statusDetails": "PIN_PAD_RESET_COMPLETED"
                }
            ],
            "completed": true
        }
    },
    "statusDetails": "REQUEST_ACCEPTED",
    "requestId": "569998777"
}