---
title: "Get encrypted PIN"
method: GET
path: "/v2/{plasticId}"
tags: ["PIN operations with pre-shared key"]
---

# Get encrypted PIN

`GET /v2/{plasticId}`

This operation returns the encrypted PIN block in ISO format 1. The PIN block is encrypted using a pre-shared
double-length 3DES key.

#### 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())));

## Path parameters

- `plasticId` string, biginteger, required

## Query parameters

- `auditUser` string, required
- `zpkIndex` string, required

## Response `200`

Successful lookup of the card

- PinResponse
  - `pinBlock` string — 3DES encrypted ISO format 1 PIN block in hexadecimal.

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Card does not exist
- `500` — Internal server error

---

[API](https://skmtc.net/enfuce/apis/transfer-api.md) · [All operations](https://skmtc.net/enfuce/apis/transfer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/enfuce/transfer-api/revisions/dc4a41118f80/schema)
