> 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/3d-secure/es/implementar-3ds/implementar-el-flujo-sms-otp.md).

# Implementar el flujo SMS OTP

## Descripción general

Cuando una transacción 3DS es impugnada y el flujo OOB no está disponible, el servicio 3DS de D1 recurre al reto OTP por SMS.

## Experiencia del usuario

<figure><img src="/files/e305c7ca1f67d9a1db9b776504296f192897f512" alt="End‑user journey for the SMS OTP challenge flow"><figcaption></figcaption></figure>

## Flujo

Los siguientes diagramas resumen el flujo OTP por SMS cuando OOB no está disponible.

<figure><img src="/files/806dfef5a7f299e1fd1b51f83465aff0a8b7bc29" alt="High‑level 3DS SMS OTP flow overview"><figcaption><p>Resumen del flujo de alto nivel - paso 1.</p></figcaption></figure>

<figure><img src="/files/406a1bf9eddaf5bc107271034bd2792a19fbf363" alt="Detailed message flow for key steps"><figcaption><p>Resumen del flujo de alto nivel - paso 2.</p></figcaption></figure>

## Diagrama de secuencia

### Prerrequisitos

* Los productos de tarjeta están configurados en D1 y en el servidor de directorio de la red de pago.
* El usuario final y la tarjeta están registrados en D1.

### 1 - AReq/ARes

<figure><img src="/files/edf8b33d42cc3f5474b75611488dd6336b47ce0e" alt="AReq/ARes sequence for the challenge flow"><figcaption><p>Solicitud/respuesta de autenticación (AReq/ARes).</p></figcaption></figure>

### 2 - Reto OTP

<figure><img src="/files/3aceb10d743202eb258e27f97cfd2316b0c2df09" alt="OTP generation, delivery, and validation sequence"><figcaption><p>Generación, entrega y validación del OTP.</p></figcaption></figure>

### 3 - CReq/CRes final y notificación

<figure><img src="/files/c9178c5ca0a5c4d0cf09554d6f31ec09d52611a5" alt="Final CReq/CRes and notifications"><figcaption><p>Solicitud/respuesta de reto final (CReq/CRes) y notificación del resultado.</p></figcaption></figure>

## Integración backend

Hay dos maneras de entregar el OTP:

1. D1 envía el SMS al usuario final
   * El backend de D1 usa el número de teléfono del usuario final proporcionado por el backend del emisor durante el registro.
   * D1 genera el OTP y lo entrega por SMS.
2. El backend del emisor envía el SMS al usuario final
   * D1 genera el OTP y lo entrega al backend del emisor a través del `DeliverOTP` operación.
   * El backend del emisor es responsable de enviar el SMS al usuario final.
   * Para detalles de solicitud/respuesta, consulte el [referencia API de D1](/3d-secure/es/integrar-la-api-de-d1/referencia-de-la-api-de-d1.md).

{% hint style="info" %}
Consideraciones operativas:

* Formato y TTL (caducidad) del OTP, intentos máximos, límites de reenvío
* Localización del contenido del SMS y del identificador del remitente
* Reintentos/fallos del proveedor de entrega y seguimiento del estado de entrega
* Evitar registrar valores OTP y sanear la información personal identificable (PII)
* Limitar la tasa de solicitudes de OTP para mitigar abusos
  {% endhint %}


---

# 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/3d-secure/es/implementar-3ds/implementar-el-flujo-sms-otp.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.
