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

# Handle token updates from TSP

The payment network TSP can update a token. Thales backend forwards updates to your token requestor endpoint.

## What triggers a token update ?

* The issuer updates the card details.
  * Renewal or reissue changes PAN last digits and/or PAN expiry date.
  * Card art can change.
* The payment network TSP updates token details.
  * Token expiry date can be extended.
    * Mastercard: token lifetime is typically 3 years.
    * Visa: Token expiry date equals card expiry date.
  * Token state can change.
    * `DELETED`: The card is destroyed or expired without renewal.
    * `SUSPENDED`: The Issuer blocks the card temporarily.

## Flow

<figure><img src="/files/G8GUGvJaBUps90nhXEre" alt=""><figcaption><p>Token update notification flow.</p></figcaption></figure>

<table><thead><tr><th width="100">Step</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>The issuer backend informs the payment network TSP that card or token data changed.</td></tr><tr><td>2</td><td>The payment network TSP sends the update to Thales backend.</td></tr><tr><td>3</td><td>Thales backend notifies the token requestor (merchant or PSP) with the updated token data. Acknowledge the notification, even if you process it asynchronously.</td></tr></tbody></table>

## API

[Notify token update](/merchant-tokenization/backend-integration/apis/client-api/token-management.md#post-notify-token-update)

## Implementation notes

* Make your handler idempotent.
* Expect retries. Notifications can arrive out of order.
* Use `lastUpdateTimestamp` to discard obsolete updates.

{% hint style="warning" %}
If you store the token PAN, discard it when `tokenLastDigits` changes.

Fetch the latest token PAN using the **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, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/merchant-tokenization/network-tokenization/implement-network-tokenization/handle-token-updates-from-tsp.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.
