> 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/merchant-tokenization/ja/nettowkutkun/implement-network-tokenization/handle-token-updates-from-tsp.md).

# TSPからのトークン更新を処理

決済ネットワークTSPはトークンを更新できます。Thalesのバックエンドは更新をあなたのトークンリクエスタのエンドポイントに転送します。

## 何がトークン更新を引き起こしますか？

* イシュアがカードの詳細を更新します。
  * 更新または再発行によりPANの末尾桁やPAN有効期限が変更されます。
  * カードデザインが変更されることがあります。
* 決済ネットワークTSPがトークンの詳細を更新します。
  * トークンの有効期限が延長されることがあります。
    * Mastercard: トークンの有効期間は通常3年です。
    * Visa: トークンの有効期限はカードの有効期限と同じです。
  * トークンの状態が変わることがあります。
    * `DELETED`: カードが破棄されたか、更新なしで有効期限切れになっています。
    * `SUSPENDED`: イシュアがカードを一時的にブロックしています。

## フロー

<figure><img src="/files/63bb9cd2b9c7f9e75c5433c0a087d93b4bfe77aa" alt=""><figcaption><p>トークン更新通知フロー。</p></figcaption></figure>

<table><thead><tr><th width="100">ステップ</th><th>説明</th></tr></thead><tbody><tr><td>1</td><td>イシュアのバックエンドがカードまたはトークンデータの変更を決済ネットワークTSPに通知します。</td></tr><tr><td>2</td><td>決済ネットワークTSPが更新をThalesのバックエンドに送信します。</td></tr><tr><td>3</td><td>Thalesのバックエンドは更新されたトークンデータをトークンリクエスタ（加盟店またはPSP）に通知します。非同期で処理する場合でも通知を確定（acknowledge）してください。</td></tr></tbody></table>

## API

[トークン更新を通知する](broken://pages/62433ff43cb0aad7c02d3ecff7ea785f4650cacb#post-notify-token-update)

## 実装上の注意

* ハンドラを冪等（idempotent）にしてください。
* リトライが発生することを想定してください。通知は順不同で届くことがあります。
* 使用する `lastUpdateTimestamp` で古い更新を破棄してください。

{% hint style="warning" %}
トークンPANを保存している場合、次のときに破棄してください `tokenLastDigits` が変更されたとき。

最新のトークンPANを取得するには **Create Transaction** APIを使用してください。
{% 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/merchant-tokenization/ja/nettowkutkun/implement-network-tokenization/handle-token-updates-from-tsp.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.
