In-App Post Provisioning Fare Product Purchase
The In-App Post-Provisioning Fare Product Purchase workflow is initiated by the user directly through the transit operator's iOS app. The primary goal is for the user to purchase a fare product within the app and have it seamlessly applied to their transit card in Apple Wallet for immediate use.
Workflow
The following high level steps outline the In-App Post-Provisioning Fare Product Purchase workflow:
Fare Product Selection and Payment: The user selects the fare product they wish to purchase from the transit operator's iOS app. It may include adding stored value to an existing balance or purchasing/renewing a fare product.
Bundle Retrieval and Wallet Display Update: Upon receiving the updateBundle request, Apple requests the provisioning bundle containing the card details from D1 Transit. For any balance updates or fare product renewals, D1 Transit uses the Apple Push Notification service (APNs) to update Applet Wallet with the correct values.
Fare Product Selection and Payment
Before the workflow begins, the user must select an eligible fare product within the transit operator's iOS app to add to his transit card.
Once a fare product is selected, the app should display payment options for the user to complete the purchase. The user can then choose his preferred payment method from the available options.
Error Scenarios
Purchase or renewal not allowed
If the purchase or renewal of a fare product is prohibited due to business rules (e.g., expired card or ineligible fare product), the transit operator's iOS app shall indicate it to the user.
Bundle Retrieval and Wallet Display Update
After successfully purchasing or renewing a fare product, Transit Issuer shall send a request to D1 Transit indicating that the card account metadata are to be updated.
D1 Transit notifies Apple by making an updateBundle API request, with the intentionType parameter set to updatePass.
Upon receiving the updateBundle request, Apple retrieves the provisioning bundle by making a getProvisioningBundle request to D1 Transit.
Once the bundle is returned to Apple, D1 Transit notifies Transit Issuer that the bundle was successfully updated.
For balance updates, Transit Issuer notifies D1 Transit using handleEvent. The Apple Push Notification service (APNs) is used to ensure Apple Wallet reflects the latest information.
Error Scenarios
No request from Apple to get the provisioning bundle
D1 Transit defines a timeout period between receiving the updateBundle response and the getProvisioningBundle request from Apple.
If the getProvisioningBundle request is not received by D1 Transit within this timeout period, D1 Transit will apply a configured retry policy.
If all retry attempts are exhausted and the getProvisioningBundle request is still not received, D1 Transit notifies the failure to the Transit Issuer.
Unauthorized authentication token
When the card is provisioned, Apple registers the device for transactions with D1 Transit by calling D1 Transit transactionNotifications/register endpoint. In response, D1 Transit returns an authenticationToken, which is stored on the device. If the device makes a request with an expired authenticationToken, D1 Transit returns an HTTP 401 status, prompting the device to re-register for transactions.
Last updated
Was this helpful?