> 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/ja/3dswosuru/sms-otpfurwosuru.md).

# SMS OTPフローを実装する

## 概要

3DSトランザクションがチャレンジされ、OOBフローが利用できない場合、D1の3DSサービスはSMS OTPチャレンジにフォールバックします。

## ユーザー体験

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

## フロー

以下の図は、OOBが利用できない場合のSMS OTPフローを要約したものです。

<figure><img src="/files/f3b7e7e138e8ef147835e20821493e7cfbec1403" alt="High‑level 3DS SMS OTP flow overview"><figcaption><p>ハイレベルフローの概要 - ステップ1。</p></figcaption></figure>

<figure><img src="/files/dd4978887e515756da3fd4eba3b2cf3e2d5357cb" alt="Detailed message flow for key steps"><figcaption><p>ハイレベルフローの概要 - ステップ2。</p></figcaption></figure>

## シーケンス図

### 前提条件

* カード製品がD1および決済ネットワークのディレクトリサーバーに設定されていること。
* エンドユーザーとカードがD1に登録されていること。

### 1 - AReq/ARes

<figure><img src="/files/2da2a77099cc95524021fe3e6d83cca0f813cf3d" alt="AReq/ARes sequence for the challenge flow"><figcaption><p>認証要求/応答（AReq/ARes）。</p></figcaption></figure>

### 2 - OTPチャレンジ

<figure><img src="/files/d1dfbf1f511390dd458283901653f08167b9ea70" alt="OTP generation, delivery, and validation sequence"><figcaption><p>OTPの生成、配信、検証。</p></figcaption></figure>

### 3 - 最終CReq/CResと通知

<figure><img src="/files/ccd9c7fd45ed0c9e3690230cd8a2b313fbf3ad5f" alt="Final CReq/CRes and notifications"><figcaption><p>最終チャレンジ要求/応答（CReq/CRes）および結果通知。</p></figcaption></figure>

## バックエンド統合

OTPを配信する方法は2つあります：

1. D1がエンドユーザーにSMSを送信する
   * D1のバックエンドは登録時にイシュアのバックエンドが提供したエンドユーザーの電話番号を使用します。
   * D1はOTPを生成し、SMSで配信します。
2. イシュアのバックエンドがエンドユーザーにSMSを送信する
   * D1はOTPを生成し、次を介してイシュアのバックエンドに配信します： `DeliverOTP` 操作。
   * イシュアのバックエンドはエンドユーザーへのSMS送信を担当します。
   * リクエスト/レスポンスの詳細については、次を参照してください： [D1 APIリファレンス](/3d-secure/ja/d1-apiwosuru/d1-apirifarensu.md).

{% hint style="info" %}
運用上の考慮事項：

* OTP形式とTTL（有効期限）、最大試行回数、再送制限
* SMSコンテンツと言語対応および送信者IDのローカライズ
* 配信プロバイダーの再試行/フォールバックおよび配信状況の追跡
* OTP値をログに記録しないこととPIIのサニタイズ
* 悪用を軽減するためにOTPリクエストのレート制限を行う
  {% 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:

```
GET https://docs.payments.thalescloud.io/3d-secure/ja/3dswosuru/sms-otpfurwosuru.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
