> 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/transit-digitization/get-started/concepts/lifecycle-management.md).

# Lifecycle Management

Life cycle management (LCM) is very important to deliver an optimal user experience throughout the lifetime of card accounts and digital cards.

This section below describes the core aspects of LCM.

To begin with, details about the 6 main LCM actions:

* Provisioning
* Park and Recover
* Suspend and Resume
* Delete

Then, a view on Card Account and Digital Card state management within D1 Transit solution.

### LifeCycle Management Actions <a href="#lifecycle-management-actions" id="lifecycle-management-actions"></a>

#### Provisioning <a href="#provisioning" id="provisioning"></a>

Provisioning adds a transit digital card to the Digital Wallets. There are 2 ways to provision a digital card:

* From Wallet (aka DCI for Apple)
* From Transit operator application (aka In-app provisioning for Apple, Push provisioning for Google)

#### Park and Recover <a href="#park-and-recover" id="park-and-recover"></a>

Parking a digital card removes its instance from the Wallet temporarily while maintaining relative card account association with the user's wallet account. Parking can be initiated by both the Issuer and the user.

Users can "recover", or add a card from the user's wallet account to the Wallet.

#### Suspend and Resume <a href="#suspend-and-resume" id="suspend-and-resume"></a>

When a transit digital card is suspended in the Wallet, the card remains visible and accessible to the user, but NFC capabilities are disabled.

Resuming a card reverses the effects of a suspension. Resumption can be initiated by both the Issuer and the user.

#### Delete <a href="#delete" id="delete"></a>

Deletion unbinds the card from the user's wallet account and removes it from the Digital Wallet ecosystem. Both the Transit Issuer and the user can request deletion.

### States <a href="#states" id="states"></a>

#### Card Account <a href="#card-account" id="card-account"></a>

Card Account state management within D1 Transit platform is as follows.

A card account can be either:

* **active**: the state a card account is in, when sucessful purchase is performed for initial provisioning.
* **parked**: the state a card account is in, when park was successfully completed (i.e. digital card linked to this card account was deleted)
* **cancelled**: card account moves to this state when Transit Issuer requests it through a **cancelCardAccount** API call. It's a non-reversible state.

{% hint style="info" %}
card account reference is completely removed from D1 Transit platform when there is no provisioning request from Digital Wallet within a configured TTL.
{% endhint %}

```mermaid
%%{init: {

 "theme": "base",

 "htmlLabels": false,

 "themeVariables": {

 "background": "#F5FBFF",

 "primaryColor": "#EAF8FF",

 "primaryBorderColor": "#00B5D8",

 "primaryTextColor": "#061A8A",

 "secondaryColor": "#DDF5FF",

 "secondaryBorderColor": "#00B5D8",

 "tertiaryColor": "#FFFFFF",

 "lineColor": "#061A8A",

 "textColor": "#061A8A",

 "labelBackgroundColor": "#BBEBFF",

 "fontSize": "12px",

 "fontFamily": "Arial, Helvetica, sans-serif"

 },

 "themeCSS": ".edgeLabel rect, .labelBkg, .stateLabelBkg { fill: #BBEBFF !important; opacity: 1 !important; transform: scaleX(1.18); transform-box: fill-box; transform-origin: center; } .edgeLabel text, .edgeLabel tspan, .stateLabel, .stateLabel tspan { fill: #061A8A !important; }",

 "state": {

 "nodeSpacing": 240,

 "rankSpacing": 240

 }

}}%%

stateDiagram-v2

    [*] --> ACTIVE : purchaseProducts or<br/>preparePushProvisioning<br/>Bundle processed for<br/>initial provisioning

    state "active" as ACTIVE
    state "parked" as PARKED
    state "cancelled" as CANCELLED

    ACTIVE --> PARKED : park complete

    PARKED --> ACTIVE : restore

    ACTIVE --> CANCELLED : cancelCardAccount<br/>received from<br/>Transit Issuer

    PARKED --> CANCELLED : cancelCardAccount<br/>received from<br/>Transit Issuer

    ACTIVE --> [*] : no provisioning request<br/>from Digital Wallet<br/>within configured TTL
```

#### Digital Card <a href="#digital-card" id="digital-card"></a>

Digital Card state management within D1 Transit platform is as follows.

A digital card can be either:

* **created**: the initial state of a digital card, before its provisioning to a device.
* **failed\_provisioning**: in case of failed initial provisioning, a digital card goes into this state.
* **active**: the state a digital card is in, when fully provisioned into a device.
* **suspended (wallet or issuer)**: digital card moves to this state when either Transit Issuer or Digital Wallet requests the suspension of this digital card.
* **unlinked**: digital card moves to this state when a **park** request is done, but there is no guarantee that it's removed from device, i.e. when triggered from cloud or transit issuer side.
* **deleted**: digital card moves to this state when there is a confirmation that the digital card was removed from the device.

{% hint style="info" %}
digital card reference is completely removed from D1 Transit platform when there is no provisioning request from Digital Wallet within a configured TTL.
{% endhint %}

The transitions of a digital card state are slightly different between ABT and CBT.

**Account Based Ticketing**

The state diagram below illustrates the different transitions in ABT context.

```mermaid
%%{init: {
  "theme": "base",
  "htmlLabels": false,
  "themeVariables": {
    "background": "#F5FBFF",

    "primaryColor": "#EAF8FF",
    "primaryBorderColor": "#00B5D8",
    "primaryTextColor": "#061A8A",

    "secondaryColor": "#DDF5FF",
    "secondaryBorderColor": "#00B5D8",

    "tertiaryColor": "#FFFFFF",

    "lineColor": "#061A8A",
    "textColor": "#061A8A",

    "labelBackgroundColor": "#BBEBFF",

    "fontSize": "12px",
    "fontFamily": "Arial, Helvetica, sans-serif"
  },

  "themeCSS": ".edgeLabel rect, .labelBkg, .stateLabelBkg { fill: #BBEBFF !important; opacity: 1 !important; transform: scaleX(1.18); transform-box: fill-box; transform-origin: center; } .edgeLabel text, .edgeLabel tspan, .stateLabel, .stateLabel tspan { fill: #061A8A !important; }",

  "state": {
    "nodeSpacing": 350,
    "rankSpacing": 350
  }
}}%%

stateDiagram-v2

    state "created" as CREATED
    state "active" as ACTIVE
    state "failed_provisioning" as FAILED
    state "unlinked" as UNLINKED
    state "suspended_wallet" as SUSPENDED_WALLET
    state "suspended_issuer" as SUSPENDED_ISSUER
    state "deleted" as DELETED

    [*] --> CREATED : purchaseProducts or<br/>preparePushProvisioning<br/>Bundle processed

    CREATED --> ACTIVE : provisioning done

    CREATED --> FAILED : provisioning failed

    CREATED --> [*] : no provisioning request<br/>from Digital Wallet<br/>within configured TTL

    FAILED --> ACTIVE : provisioning done

    ACTIVE --> UNLINKED : unlink from Digital Wallet<br/>(device or cloud initiated)<br/>or from Transit Issuer
    
    SUSPENDED_WALLET --> UNLINKED : unlink from Digital Wallet<br/>(device or cloud initiated)<br/>or from Transit Issuer
    
    SUSPENDED_ISSUER --> UNLINKED : unlink from Digital Wallet<br/>(device or cloud initiated)<br/>or from Transit Issuer

    UNLINKED --> DELETED : deletion confirmation<br/>from Digital Wallet

    ACTIVE --> SUSPENDED_WALLET : suspend from<br/>Digital Wallet

    SUSPENDED_WALLET --> ACTIVE : resume from<br/>Digital Wallet

    ACTIVE --> SUSPENDED_ISSUER : suspend from<br/>Transit Issuer

    SUSPENDED_WALLET --> SUSPENDED_ISSUER : suspend from<br/>Transit Issuer

    SUSPENDED_ISSUER --> ACTIVE : resume from<br/>Transit Issuer

    ACTIVE --> DELETED : cancelCardAccount<br/>from Transit Issuer

    SUSPENDED_WALLET --> DELETED : cancelCardAccount<br/>from Transit Issuer

    SUSPENDED_ISSUER --> DELETED : cancelCardAccount<br/>from Transit Issuer

    FAILED --> DELETED : cancelCardAccount<br/>from Transit Issuer

    DELETED --> ACTIVE : restore
```

**Card Based Ticketing**

The state diagram below illustrates the different transitions in CBT context.

```mermaid
%%{init: {
  "theme": "base",
  "htmlLabels": false,
  "themeVariables": {
    "background": "#F5FBFF",

    "primaryColor": "#EAF8FF",
    "primaryBorderColor": "#00B5D8",
    "primaryTextColor": "#061A8A",

    "secondaryColor": "#DDF5FF",
    "secondaryBorderColor": "#00B5D8",

    "tertiaryColor": "#FFFFFF",

    "lineColor": "#061A8A",
    "textColor": "#061A8A",

    "labelBackgroundColor": "#BBEBFF",

    "fontSize": "12px",
    "fontFamily": "Arial, Helvetica, sans-serif"
  },

  "themeCSS": ".edgeLabel rect, .labelBkg, .stateLabelBkg { fill: #BBEBFF !important; opacity: 1 !important; transform: scaleX(1.18); transform-box: fill-box; transform-origin: center; } .edgeLabel text, .edgeLabel tspan, .stateLabel, .stateLabel tspan { fill: #061A8A !important; }",

  "state": {
    "nodeSpacing": 240,
    "rankSpacing": 240
  }
}}%%

stateDiagram-v2

    state "created" as CREATED
    state "active" as ACTIVE
    state "failed_provisioning" as FAILED
    state "suspended_wallet" as SUSPENDED_WALLET
    state "suspended_issuer" as SUSPENDED_ISSUER
    state "unlinked" as UNLINKED
    state "deleted" as DELETED

    [*] --> CREATED : purchaseProducts or<br/>preparePushProvisioning<br/>Bundle processed

    CREATED --> ACTIVE : provisioning done

    CREATED --> FAILED : provisioning failed

    CREATED --> [*] : no provisioning request<br/>from Digital Wallet<br/>within configured TTL

    FAILED --> ACTIVE : provisioning done

    ACTIVE --> SUSPENDED_WALLET : suspend from<br/>Digital Wallet

    ACTIVE --> SUSPENDED_ISSUER : suspend from<br/>Transit Issuer

    SUSPENDED_WALLET --> ACTIVE : resume from<br/>Digital Wallet

    SUSPENDED_ISSUER --> ACTIVE : resume from<br/>Transit Issuer

    SUSPENDED_WALLET --> SUSPENDED_ISSUER : suspend from<br/>Transit Issuer

    ACTIVE --> UNLINKED : unlink from Digital Wallet<br/>(device or cloud initiated)<br/>or Transit Issuer

    SUSPENDED_WALLET --> UNLINKED : unlink from Digital Wallet<br/>(device or cloud initiated)<br/>or from Transit Issuer
    
    SUSPENDED_ISSUER --> UNLINKED : unlink from Digital Wallet<br/>(device or cloud initiated)<br/>or from Transit Issuer

    ACTIVE --> DELETED : cancelCardAccount<br/>from Transit Issuer

    FAILED --> DELETED : cancelCardAccount<br/>from Transit Issuer

    SUSPENDED_WALLET --> DELETED : cancelCardAccount<br/>from Transit Issuer

    SUSPENDED_ISSUER --> DELETED : cancelCardAccount<br/>from Transit Issuer

    UNLINKED --> DELETED : deletion confirmation<br/>from Digital Wallet

    DELETED --> ACTIVE : restore
```


---

# 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/transit-digitization/get-started/concepts/lifecycle-management.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.
