> 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/nfc-wallet-sdk-android/implement-nfc-wallet/manage-digital-cards/manage-digital-card-lcm.md).

# Manage digital card LCM

## Overview

Use the NFC Wallet SDK in your digital wallet application to manage a digital card lifecycle (LCM).

Primary use case:

* Delete a digital card from the digital wallet application

Before you start you should get an access token as described in [Get an access token](/nfc-wallet-sdk-android/implement-nfc-wallet/manage-digital-cards/get-an-access-token.md).

{% hint style="info" %}
In this section, we describe LCM actions initiated from the digital wallet application. The issuer backend can also initiate digital card LCM directly with the TSP.
{% endhint %}

## SDK integration

Use `MGCardLifeCycleManager` and the digital card ID to trigger LCM actions.

Implement `MGCardLifecycleEventListener` to handle `onSuccess` and `onError` callbacks.

Supported actions:

* `deleteCard`
* `suspendCard`
* `resumeCard`

`onSuccess` confirms that the NFC Wallet SDK accepted the request. The digital wallet application updates after it receives a push notification.

{% hint style="info" %}
Changes from the **NFC Wallet backend** don't appear immediately in the digital wallet application.

**NFC Wallet backend** sends a push notification to synchronize the digital card state.

See [Handle push notifications](/nfc-wallet-sdk-android/get-started/configuration/5.-push-notifications/handle-push-notifications.md).
{% endhint %}

### Delete a digital card

Delete a digital card using `MGCardLifeCycleManager.deleteCard(...)`.

Deleting a card permanently removes it from the digital wallet application.

{% code title="DeleteCard.java" %}

```java
// get the access token
String accessToken = "....";

// Get the card life cycle manager.
MGCardLifeCycleManager cardLifeCycleManager = MGClient.getCardLifeCycleManager();

// Delete a card using its digital card ID.
cardLifeCycleManager.deleteCard(
    digitalCardId,
    new MGCardLifecycleEventListener() {
        @Override
        public void onSuccess(String digitalCardId) {
            /*
             * Request accepted by the NFC Wallet SDK.
             * The NFC Wallet backend sends a push notification to complete the operation.
             *
             * If the card is already deleted server-side, the SDK removes local card data.
             */
        }

        @Override
        public void onError(String digitalCardId, MobileGatewayError error) {
            /*
             * Request failed.
             * Inspect MobileGatewayError to determine the cause.
             */
        }
    },
    null,
    null,
    accessToken );
```

{% endcode %}

{% hint style="info" %}
After the **issuer backend** or **digital wallet application** initiates a delete request, the digital card can temporarily appear as `RETIRED`state.

During this time, `DigitalizedCardManager#getAllCards()` can still return the card.

The card disappears from the list after the SDK removes it from local storage.
{% endhint %}

### Suspend a digital card

Suspend a digital card using `MGCardLifeCycleManager.suspendCard(...)`.

### Resume a digital card

Resume a digital card using `MGCardLifeCycleManager.resumeCard(...)`.


---

# 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/nfc-wallet-sdk-android/implement-nfc-wallet/manage-digital-cards/manage-digital-card-lcm.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.
