> 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/implement-google-transit/account-based-ticketing-abt/lifecycle-management/cancel-card-account.md).

# Cancel Card Account

The cancel card account workflow is triggered by Transit Issuer when the card account is cancelled (for example end user closed it)

Once a card account is cancelled, it's not possible to provision digital cards linked to it onto devices anymore.

This section provides an overview of the workflow, including detailed steps, sequence diagrams, and potential error scenarios.

### Workflow <a href="#workflow" id="workflow"></a>

Below are the high level steps of the cancel card account workflow:

1. **Card Account Cancellation**: Transit issuer initiates the cancellation of the user's card account.
2. **Delete Token**: If a digital card linked to the card account is provisioned into a user's device, D1 Transit notifies Google that it needs to be removed.
3. **Card Account Deactivation**: D1 Transit notifies Google that this card account can no longer be used.

### Sequence diagram <a href="#sequence-diagram" id="sequence-diagram"></a>

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

The Transit issuer instructs D1 Transit to cancel the specified card account.

#### Delete Token <a href="#delete-token" id="delete-token"></a>

If a digital card exists in user's device, D1 Transit will notify Google server a token state update. Upon receiving such request from D1 Transit, Google server will request D1 Transit the state change to apply and perform the removal of the token.

Once Google has fetched the state change to D1 Transit, D1 Transit notifies Transit Issuer about the digital card deletion outcome.

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

In order to disable the card account to be used again, D1 Transit will notify Google with a card metadata updated notification. Once received, Google is fetching the card metadata from D1 Transit which will return that this card account is no longer available to the end user.

<figure><img src="https://1928701359-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZoFRCpZeaDWwcHYhJY7B%2Fuploads%2Fy2iXEkkZTCWV4mxqmzRg%2FSequence%20Diagram%20%E2%80%93%20Cancel%20Card%20Account.svg?alt=media&amp;token=946787b3-6b3b-4c19-be70-7fbed9091969" alt=""><figcaption></figcaption></figure>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.payments.thalescloud.io/transit-digitization/implement-google-transit/account-based-ticketing-abt/lifecycle-management/cancel-card-account.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
