> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/pin-management/es/implementar-la-gestion-de-pin/mostrar-un-pin.md).

# Mostrar un PIN

Esta sección describe cómo mostrar el PIN de la tarjeta de forma segura.

D1 actualmente admite **bloque PIN ISO 0** devuelto por el **backend del emisor**.

### Experiencia del usuario

<figure><img src="/files/cb2e39e40f918372f5ad7483faed2237acff6e6a" alt=""><figcaption><p>Pantalla de ejemplo para mostrar el PIN en la aplicación del emisor</p></figcaption></figure>

### Flujo

<figure><img src="/files/e16b016d9b175fe87d869cd6dc3d940b82d48477" alt=""><figcaption><p>Flujo de alto nivel para mostrar un PIN</p></figcaption></figure>

1. **Usuario final** se autentica en la **aplicación del emisor** y solicita el PIN.
2. La aplicación del emisor llama al método de visualización de PIN del SDK de D1.
3. El SDK de D1 llama al **backend de D1** API “Obtener PIN”.
4. El backend de D1 solicita el bloque PIN al **backend del emisor** (D1 no almacena PINs).
5. backend de D1 **transcifra** el bloque PIN desde las claves del emisor a las claves del dispositivo.
6. El SDK muestra el PIN en una interfaz segura durante un tiempo limitado.

### Diagrama de secuencia

#### Pre-requisitos

* Usuario final, cuenta y tarjeta ya registrados en D1
* El SDK está correctamente inicializado
* La aplicación del emisor llamó a la API de inicio de sesión del SDK de D1.
* El backend del emisor expone el endpoint “Obtener PIN” y devuelve **bloque PIN ISO 0**.

<figure><img src="/files/9c2b72482b772acef3fc9f6f98acb04e366bcdad" alt=""><figcaption><p>Diagrama de secuencia para la visualización del PIN</p></figcaption></figure>

`CardPINUI` contiene `PINDisplayTextView` (Android) y `D1PINDisplayTextField` (iOS), que heredan del [TextView](https://developer.android.com/reference/android/widget/TextView) y [UITextField](https://developer.apple.com/documentation/uikit/uitextfield). La configuración del campo de texto (fuente, tamaño, color) puede hacerse usando las propiedades de estos objetos nativos.

### Seguridad y cumplimiento

* La visualización del PIN ocurre en una interfaz segura y resistente a manipulaciones.
* Los datos del PIN no se persisten en el dispositivo.
* El intercambio de datos está cifrado de extremo a extremo.
* La solución está diseñada para cumplir con PCI DSS en el manejo de PIN.

### APIs requeridas

| API                                                                                                                                                                          | Entrada/Salida      | Descripción                                                         |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ------------------------------------------------------------------- |
| [Obtener PIN](/pin-management/es/integrar-la-api-d1/referencia-de-la-api-d1/api-saliente-desde-d1/api-de-gestion-de-pin.md#get-cms-api-v1-issuers-issuerid-cards-cardid-pin) | Emisor <- Thales D1 | Recuperar el PIN del backend del emisor para mostrarlo en el móvil. |

### SDK

{% tabs %}
{% tab title="Android" %}

```java
PINDisplayTextView pinDisplayTextView = <Objeto de tipo PINDisplayTextView>;
CardPINUI ui = new CardPINUI(pinDisplayTextView);
String cardID = "<ID de la tarjeta>";

d1Task.displayPhysicalCardPIN(cardID, ui, new D1Task.Callback<Void>() {
    @Override
    public void onSuccess(Void data) {
        // Continúe con los flujos posteriores, el PIN ahora se está mostrando en la vista de texto proporcionada.
    }
    
    @Override
    public void onError(D1Exception exception) {
        // Consulte la sección Integración del SDK D1 – Gestión de errores
    }
});
```

{% endtab %}

{% tab title="iOS" %}

```swift
let displayTextField = <Objeto de tipo D1PINDisplayTextField>
let cardPINUI = CardPINUI(pinTextField: displayTextField)
let cardID = <ID de la tarjeta>

d1Task.displayPhysicalCardPIN(cardID, cardPINUI: cardPINUI) { error in
    if let error = error {
        // Consulte la sección Integración del SDK D1 – Gestión de errores
    } else {
        // Continúe con los flujos posteriores, el PIN ahora se está mostrando en el campo de texto proporcionado.
    }
}En
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/pin-management/es/implementar-la-gestion-de-pin/mostrar-un-pin.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
