Unsupported Devices

The Decryptx Payload Parser supports a number of card readers; if you have a P2PE card reader that is not listed in the Supported Devices section on our homepage you can still decrypt the payload using our Decryptx decrypt endpoint. To use the decrypt endpoint you have to extract the decryption parameters from the device payload yourself. The required parameters include the device serial number, the payload sequence number, the encrypted track data, and the serial number encoding. Unfortunately each manufacturer encodes their devices' payload in a different format so we cannot include a one-fits-all explanation to help you extract these parameters.

Over time we will increase the number of devices supported by our parser endpoint. To request support for a device that is not listed contact us on decryptxsupport@bluefin.com.

Authentication

This documentation uses transparent authentication; all requests embed the partner's credentials (partnerId and partnerKey) in the body of the request. To explore other authentication methods check out our Authentication documentation.

Decryptx decrypt cURL example

To use the decrypt endpoint you need to extract the device serial number, the payload sequence number and the encrypted tracks from the payload and post them with your Bluefin credentials to our decrypt endpoint.

curl 'https://cert-parser.decryptx.com/api/v1/decrypt' \
    -X POST \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json'
    -d '{
        "partnerId"  : "WATERFORD",
        "partnerKey" : "ef1ad938150fb15a1384b883a104ce70",
        "reference"  : "723f57e1-e9c8-48cb-81d9-547ad2b76435",
        "serial"     : "541T112708",
        "hasCcData"  : "1",
        "decryptionParameters" : {
            "sequenceNumber" : "629949960E001D200037",
            "encoding"       : "hex"
        },
        "encrypted" : [
            {
                "name"  : "track1",
                "value" : "EF77ABC20DE782C48A88FBF25C59A6C7E21FD7E42D9A1C091F5FC8BBC1BF7DA89E2D8DB1AEB58A7318A79DDE4E59A5E7BD682FCAE9F6BBFD"
            },
            {
                "name"  : "track2",
                "value" : "7EF02FC12FD9864672B4DDAE562F4D6EDAB53D91A85A83964A3E4EA545AD7D6CAFBB9D6BB51016E4"
            }
          ]
        }'

If you posted proper data then you will get a response object like this.

{
  "success"   : true,
 "reference"  : "723f57e1-e9c8-48cb-81d9-547ad2b76435",
 "messageId"  : "1201607010051161022432609",
  "decrypted" : [
    {
      "name"  : "track1",
      "value" : "25423337303030303939393939393939305e544553542f424c554546494e5e323231323130313132333435363738393f2800000000000000"
    },
    {
      "name"  : "track2",
      "value" : "3b3337303030303939393939393939303d323231323130313132333435363738393f3f0000000000"
    }
  ]
}

If by some chance one of your encrypted values failed to decrypt you will receive a message like the following. Note that success is true despite one failure.

{
  "success"   : true,
  "message"   : "One or more values were unable to decrypt, see items for details",
  "code"      : 1302,
  "reference" : "723f57e1-e9c8-48cb-81d9-547ad2b76435",
  "messageId" : "1201607010100381011190531",
  "decrypted" : [
    {
      "name"    : "track1",
      "failed"  : true,
      "message" : "Invalid hex string"
    },
    {
      "name"  : "track2",
      "value" : "3b3337303030303939393939393939303d323231323130313132333435363738393f3f0000000000"
    }
  ]
}

Decryptx decrypt Java example

final DecryptxApi decryptxApi = new DecryptxApi();

decryptxApi.getApiClient().setBasePath("https://cert-parser.decryptx.com/api/v1");

//build up parameter object
final DecryptParam params = new DecryptParam()
     .partnerId("WATERFORD")
     .partnerKey("ef1ad938150fb15a1384b883a104ce70")
     .reference("723f57e1-e9c8-48cb-81d9-547ad2b76435")
     .clientId("my_client")
     .hasCcData(DecryptParam.HasCcDataEnum._1)
     .serial("541T112708")
     .decryptionParameters(new DecryptionParameters()
             .sequenceNumber("629949960E001D200037")
             .encoding(DecryptionParameters.EncodingEnum.HEX));

//Add track data to decrypt.
final List<Encrypted> encryptedList = new ArrayList<Encrypted>();

encryptedList.add(new Encrypted()
                 .name("track1")
                 .value("EF77ABC20DE782C48A88FBF25C59A6C7E21FD7E42D9A1C091F5FC8BBC1BF7DA89E2D8DB1AEB58A7318A79DDE4E59A5E7BD682FCAE9F6BBFD"));

encryptedList.add(new Encrypted()
                 .name("track2")
                 .value("7EF02FC12FD9864672B4DDAE562F4D6EDAB53D91A85A83964A3E4EA545AD7D6CAFBB9D6BB51016E4"));

params.setEncrypted(encryptedList);

final DecryptResponse resp = decryptxApi.decrypt(params);

//process result.
if (resp.isSuccess()){
    System.out.println("success    :" + resp.isSuccess());
    System.out.println("message id : " + resp.getMessageId());
    System.out.println("reference  :" + resp.getReference());

    for (final Decrypted decrypted : resp.getDecrypted()){
        //name is always returned
        System.out.println("name  :" + decrypted.getName());

        if (null != decrypted.isFailed() && decrypted.isFailed()){
            System.out.println("error code   :" + decrypted.getCode());
            System.out.println("error message: " + decrypted.getMessage());
        }
        else{
            System.out.println("value :" + decrypted.getValue());
        }
    } 
}

Sample output:

success    :true
message id : 1201607010825191011016636
reference  :723f57e1-e9c8-48cb-81d9-547ad2b76435
name  :track1
value :25423337303030303939393939393939305e544553542f424c554546494e5e323231323130313132333435363738393f2800000000000000
name  :track2
value :3b3337303030303939393939393939303d323231323130313132333435363738393f3f0000000000