Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Restore from Transit Issuer

The restore process is initiated directly by the user from his transit mobile application. The primary goal is to re-enable a previously parked transit card, which is securely linked to the user's iCloud account, and provision it onto the device.

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

Workflow

Below are the high level steps of the restore workflow:

  1. Card Account Selection: The user selects a previously parked transit card via the transit mobile application.

  2. Provisioning: The selected card undergoes the standard provisioning workflow to be reactivated on the device.

  3. Restore Outcome: Apple sends a notification to D1 Transit with the outcome of the restore workflow.

Sequence diagram

Card Account Selection

The user begins the restore workflow from the transit mobile application.

Transit mobile application interacts with Transit mobile application server in order to retrieve available cards for restoration.

Then, the restoration process begins with a preparePushProvisioningBundle (similarly to the In-app provisioning flow).

Error Scenarios

Card account not eligible for restore

In case, the card account selected for restore, and specified within preparePushProvisioningBundle request, is not eligible, D1 Transit returns an error to Transit Issuer.

Provisioning

Push provisioning payload is then sent back to the transit operator's mobile app, which subsequently calls Apple PassKit API PKAddPaymentPassRequest to initiate the restore workflow with Apple.

Apple sends a request to D1 Transit to obtain the encrypted provisioning bundle.

D1 Transit platform retrieves digital card bundle data required to build the encrypted provisioning bundle, then returns it back to Apple.

Apple proceeds to provision the card onto the user's device.

Provisioning Outcome

Once Apple receives the provisioning bundle, the keys and data are securely extracted and stored on the applet. After completing personalization, a notification is sent to D1 Transit to report the outcome of the provisioning workflow.

Error Scenarios

Card fails to provision onto device

If provisioning fails, Apple sends a notification to D1 Transit with eventType as provisioningFailure. D1 Transit notifies Transit issuer about the failure.

The digital card is deleted from D1 Transit system and the card account can be provisioned to another device under the same iCloud account.

No Notification Request from Apple

D1 Transit has a timeout period after sending the provisioning bundle to Apple. If no notification is received within the specified timeframe, D1 Transit sends a getStatus(provisioningBundleIdentifier) request to Apple to check the current state of the card.

If the card's state is active, meaning the card successfully provisioned onto the device and is available for use, D1 Transit completes the workflow considering the provisioning as successful

If the card's state is not active, D1 Transit completes the worklow considering the provisioning as failed, i.e. Transit issuer is notified.

Last updated

Was this helpful?