Skip to main content
GET
/
v2
/
{plasticId}
Get encrypted PIN
curl --request GET \
  --url 'https://integration-api-cat1.{{environment}}.ext.{{realm}}.cia.enfuce.com/pin/v2/{plasticId}' \
  --header 'Authorization: Bearer <token>'
{
  "pinBlock": "<string>"
}

Example

var pinResponse = pinApiClient.get()
        .uri("/pin/v2/{plasticId}?zpkIndex={zpk}&auditUser={user}", 123456, 0, "test")
        .retrieve()
        .bodyToMono(PinResponse.class)
        .block();
// preshared zpk
var zpk = Hex.decode("00112233445566778899AABBCCDDEEFF0011223344556677");
// decrypt pinBlock with zpk
var des = Cipher.getInstance("DESede/ECB/NoPadding");
des.init(Cipher.DECRYPT_MODE, new SecretKeySpec(zpk, "DESede"));
var decryptedPinBlock = Hex.toHexString(des.doFinal(Hex.decode(pinResponse.getPinBlock())));

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

plasticId
string<biginteger>
required

The plastic id for given card

Query Parameters

auditUser
string
required

The audit user to log the request

zpkIndex
string
required

The PIN encryption key (ZPK) index. This index is used to point out which key to use in case there are multiple keys available.

Example:

"0"

Response

Successful lookup of the card

pinBlock
string

3DES encrypted ISO format 1 PIN block in hexadecimal.