> 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-apple-transit/account-based-ticketing-abt/lifecycle-management/park-from-icloud.md).

# Park from iCloud

The iCloud-initiated parking workflow can be triggered by the user through one of the following 2 methods:

1. Signing into their iCloud account via iCloud.com.
2. Using the **Find My** application on another device that is logged in with the same Apple ID.

Initiating this workflow will result in the removal of all cards in the Wallet from the specified device.

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 iCloud initiated parking workflow:

1. **Card Removal**: The user initiates the removal of the cards from his device.
2. **Unlink Card**: Apple notifies D1 Transit platform that the user has removed the transit card from his device.
3. **Removal Verification**: D1 Transit sends **getStatus** requests to Apple in order to check whether digital cards were removed or not.

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

#### Card Removal <a href="#card-removal" id="card-removal"></a>

The user accesses to his iCloud account, he selects the device and press 'Erase Device'. Wallet will instruct Apple server to delete all cards from that device.

#### Unlink Card <a href="#unlink-card" id="unlink-card"></a>

Upon receiving a request from Wallet to delete cards from a device, Apple server will initiate a managePass(unlink) API call to the D1 Transit platform for all transit cards associated with that device.

#### Removal Verification <a href="#removal-verification" id="removal-verification"></a>

Apple doesn't send eventNotification to D1 Transit platform in this workflow. Therefore, D1 Transit is responsible for actively querying the state of the digital cards by calling getStatus(provisioningBundleIdentifier) to Apple. D1 Transit can verify whether the deletion was successful or not.

If the device is online, the response contain an HTTP 404 status code. This confirms that the card has been successfully deleted and no longer exists on Apple servers.

If the device is offline, the response will contain an active state. This confirms that the parking process is incomplete, and the card must remain on the deny list.

**Error Scenarios**

**Device Offline**

As the request is not device-initiated, there is no certainty that the device will be online. In such cases, the request to delete the card may never reach the device. For example, the device may be in airplane mode. Therefore, it is strongly recommended to put the provisioned digital cards to deny list to prevent its use for transit.

Transit Issuer must ensure that the deny list has been fully propagated across all relevant readers before allowing the card to be provisioned on another device. This step is critical to prevent the same transit card from being used concurrently on multiple devices and avoiding potential misuse.

<figure><img src="/files/g7jzsdO7QTv2LQ49Xrds" 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 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/implement-apple-transit/account-based-ticketing-abt/lifecycle-management/park-from-icloud.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.
