# Display a PIN source: https://developer.mastercard.com/mastercard-processing-core/documentation/use-cases/pin-management/display-a-pin/index.md ## Overview {#overview} This use case describes the process in which a cardholder displays the PIN in the mobile application or e-banking service. ## Sequence diagram {#sequence-diagram} Diagram display-a-pin-new Note: The diagram does not contain end-to-end payload encryption which is part of every operation. Refer to [Encryption](https://developer.mastercard.com/mastercard-processing-core/documentation/api-basics-section/encryption/index.md) for more information. ### Explanation {#explanation} 1. The cardholder wants to display the PIN for the card by using the mobile application or e-banking service. 2. The mobile application or e-banking service generates a pair of RSA keys. 3. The mobile application or e-banking service sends a `POST` request to the `/cards/{card_contract_id}/pins/searches` endpoint by passing the `cardExpiryDate` field in the request body and the `Customer-Public-Rsa-Key` header containing the Public key generated in step 2 which must be verified by the issuer server. 4. The API retrieves the PIN block from the CMS based on the `card_contract_id` and `cardExpiryDate` provided in the request. 5. The API returns the `encryptedCardContractNumber`, `encryptedZpk` encrypted using `Customer-Public-Rsa-Key`, and `encryptedPinBlock` encrypted using the temporary `encryptedZpk`. 6. The mobile application or e-banking service decrypts the `encryptedCardContractNumber` and `encryptedZpk` with the Private RSA key generated in step 2. 7. The mobile application or e-banking service decrypts the `encryptedPinBlock` and converts it to the PIN value using a decrypted ZPK and card contract number from step 6. 8. The mobile application displays the PIN value to the cardholder. Tip: Refer to the [PIN Display Process](https://developer.mastercard.com/mastercard-processing-core/tutorial/pin-display-process/index.md) tutorial for more information with code samples to help you with the integration. Refer to [Sandbox testing](https://developer.mastercard.com/mastercard-processing-core/documentation/sandbox-testing/pin-management/display-pin/index.md) for information on how to execute the use case in the Sandbox environment. ## Endpoint {#endpoint} API Reference: `POST /cards/{card_contract_id}/pins/searches`