This operation sets the card PIN. Provided PIN must be in ISO format 1 and encrypted with the tzpk received from the “Get tzpk” API call.
// PIN 1234 in ISO format 1 (xxYYYYxxxxxxxxxx) where YYYY is the PIN var pinBlock = “141234AAAAAAAAAA”; // encrypt pinBlock with previously received tzpk var des = Cipher.getInstance(“DESede/ECB/NoPadding”); des.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(tzpk, “DESede”)); var encryptedPinBlock = des.doFinal(Hex.decode(pinBlock.getBytes()));
// var encryptedPinBlock = // Received from the device // make request pinApiClient.post() .uri(“/pin/v3/set?auditUser=”, “test”) .bodyValue(Map.of( “controlId”, controlId, “pinBlock”, Base64.getEncoder().encodeToString(encryptedPinBlock) )) .retrieve() .bodyToMono(Object.class) .block();
The audit user to log the request
The related PIN control request data
The body is of type object
.
The response is of type object
.