> 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/classic-tokenization/use-cases/post-enrolment/token-life-cycle-management/update-token-state-from-issuer-backend.md).

# Update token state from issuer backend

Use `updateCardState` to perform an issuer-initiated token **LCM** operation.

Typical use cases:

* Suspend or resume a token.
* Delete a token.
* Apply the same action to all tokens for a card.

### Choose the scope

You can target:

* A single token, using `virtualCardId`.
* All tokens belonging to a card, using the card identifiers defined in the API.

See [`updateCardState`](https://thales-dis-dbp.stoplight.io/docs/digital-payment/b3A6MjU4Nzg1MTQ-update-state-of-funding-virtual-card) for the full request schema.

### Update a specific token

<figure><img src="/files/WqYB1VqJbOiEgZKHZVmf" alt="Issuer-initiated token state update flow."><figcaption><p>Token state update initiated by the issuer backend.</p></figcaption></figure>

{% stepper %}
{% step %}

### 1. Call updateCardState

Call `updateCardState` from the issuer backend.

Include at least:

| Parameter          | Description                                                                                  |
| ------------------ | -------------------------------------------------------------------------------------------- |
| `x-correlation-id` | Correlates this LCM operation with subsequent callbacks. Generate a new value per operation. |
| `virtualCardId`    | Identifies the token to update.                                                              |
| `action`           | Specifies the state change to apply.                                                         |
| {% endstep %}      |                                                                                              |

{% step %}

### 2. Wait for the token update to complete

The payment network and wallet provider apply the state change.

They update the token in the digital wallet application and in the **TSP**.
{% endstep %}

{% step %}

### 3. Handle notifyVirtualCardChange

When the operation completes (or fails), you receive `notifyVirtualCardChange`.

See [`notifyVirtualCardChange`](https://thales-dis-dbp.stoplight.io/docs/digital-payment/b3A6MjU4Nzg1MjE-notify-issuer-about-any-virtual-card-token-change).

| Parameter          | Description                                                                             |
| ------------------ | --------------------------------------------------------------------------------------- |
| `x-correlation-id` | Matches the value from `updateCardState`.                                               |
| `virtualCardId`    | Identifies the updated token.                                                           |
| `action`           | Specifies the action performed.                                                         |
| `errorCode`        | Indicates failure. For example, `221` means the device was not reachable after retries. |
| {% endstep %}      |                                                                                         |
| {% endstepper %}   |                                                                                         |

{% hint style="info" %}
Handle `notifyVirtualCardChange` idempotently. Callbacks can be duplicated or delayed.
{% endhint %}

### Update all tokens for a card

<figure><img src="/files/pMW4UbbikhAWcRNxHsrd" alt="Issuer-initiated state update for all tokens of a card."><figcaption><p>Token state update for all tokens belonging to a card.</p></figcaption></figure>

Call `updateCardState` with the card identifiers defined in the API.

You receive one `notifyVirtualCardChange` callback per updated token.

### Related documentation

* [Update token state from wallet provider](/classic-tokenization/use-cases/post-enrolment/token-life-cycle-management/update-token-state-from-wallet-provider.md)
* [Handle enrollment failures](/classic-tokenization/use-cases/card-enrolment/handle-enrollment-failures.md)


---

# 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/classic-tokenization/use-cases/post-enrolment/token-life-cycle-management/update-token-state-from-issuer-backend.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.
