Apple wallet extension
Apple wallet extension
Use Apple Wallet extensions to let end users discover and provision cards directly from the Apple Wallet application, in addition to the issuer application.
Through application extensions, you can expose custom functionality and content outside the issuer application and make it available while the end user interacts with Apple Wallet or the system.
Provisioning cards within the Apple Wallet application improves the in-app experience by avoiding manual entry of payment card details.
Refer to the Apple extension overview for general information about iOS extensions.
User experience
The end-to-end Apple Wallet extension flow has two main phases:
Apple Wallet discovers that the issuer application has cards available for provisioning.
The end user authenticates and selects which cards to add; Apple Wallet then requests the provisioning payload from the issuer application via the D1 SDK.
Discovery and authentication
Discover issuer application in Apple Wallet
Apple Wallet checks with the issuer application to determine whether cards are available. If cards are available, the issuer application appears in the list of options.
The end user selects the issuer application
When the end user selects the issuer application, Apple Wallet triggers the issuer application UI extension to authenticate the end user.
Authenticate the end user
The issuer application’s UI extension authenticates the end user using the same credentials and methods (for example, manual login and biometrics) as the main issuer application.
Selecting and provisioning cards
Apple Wallet fetches available cards
Apple Wallet requests the list of available cards from the issuer application through the non-UI extension. The end user sees a list of cards to add.
View card details
The end user can review card details (for example, card art, product title, and last four digits) before adding the card.
Accept terms and conditions
The end user reviews and accepts the issuer’s and payment network’s terms and conditions.
Provisioning payload and tokenization
For each selected card, Apple Wallet requests a provisioning payload from the issuer application and then initiates the tokenization flow with the payment network TSP.
Extensions
The Apple Wallet integration requires two types of extensions from the issuer application:
Non-UI extension Reports the status of the extension flow and card availability. This covers the card discovery and provisioning payload steps. It is implemented by extending the D1 SDK base class
D1IssuerProvisioningExtensionHandler.UI extension Authenticates the end user. This is a separate screen that uses the same login credentials as the issuer application. It implements the
D1IssuerProvisioningExtensionAuthorizationProvidingprotocol.
D1 SDK provides a base implementation for the non-UI extension so that you do not need to implement the complete logic yourself. The issuer application calls D1Task.configure() with WalletExtensionConfig during application launch to share card details with the extension. While this configuration is required only once after installation, we recommend calling it on every application launch to keep card information up to date.
After successful authentication in the UI extension, the issuer application must call D1IssuerProvisioningExtensionAuthorizationProviding.bindingHash() to retrieve the encoded hashed client binding payload (cbp). The issuer application must pass this cbp value to the issuer backend when requesting the issuer token. Then it must call D1IssuerProvisioningExtensionAuthorizationProviding.login() so the SDK can continue the non-UI extension flow.
The bindingHash() value is different in the issuer application and in the extension. Generate a separate issuer access token for the extension.
Sequence diagrams
1. Apple Wallet shows the issuer application button
2. End user authentication
3. Available cards are displayed
4. Tokenization
Integrate Apple Wallet via the D1 SDK
SDK configuration
When you perform iOS SDK initialization, the issuer application must also call configure(ConfigParams.walletExtensionConfig(...)) and provide:
cardParamsList
Use this variant when you have a single consumerId and a single issuerId:
cardParamsList– List of card IDs, card art, product titles, and last four digits. Card art and product title are displayed in Apple Wallet.appGroupID– The shared container ID so the D1 SDK can share data between the issuer application and its extensions.
issuerParamsList
Use this variant when you support multiple combinations of issuerId and consumerId:
issuerParamsList– List ofcardParamsListwith the correspondingissuerIdandconsumerId.appGroupID– The shared container ID so the D1 SDK can share data between the issuer application and its extensions.
App Group ID
By default, the issuer application and its extensions do not share storage. Use app groups to share storage between them. See the Apple extension overview for more details.
appGroupID identifies the shared container between the issuer application and its extensions. You configure it in Xcode under Capabilities.

Apple Pay entitlement
Similar to in-app Apple Pay provisioning, you must add the entitlement com.apple.developer.payment-pass-provisioning to both the UI and non-UI extension targets. For onboarding details, refer to your Apple Wallet provisioning documentation or Push provisioning onboarding for wallets.
UI extension
Create a UI extension

Add a new target in Xcode of type Intents UI Extension.
In the new target, enable the same App Group ID and entitlement values as in the issuer application. If the App Group ID differs, the login API returns the walletExtensionAppGroupIDNotFound error.
Update the extension Info.plist:
Set
NSExtensionPointIdentifiertocom.apple.PassKit.issuer-provisioning.authorization.Set
NSExtensionPrincipalClassto a class that conforms toD1IssuerProvisioningExtensionAuthorizationProviding.
Example entitlements and extension configuration:
Integrate the SDK for the UI extension
The D1 SDK provides the D1IssuerProvisioningExtensionAuthorizationProviding protocol, which extends Apple’s PKIssuerProvisioningExtensionAuthorizationProviding and adds bindingHash() and login() APIs.
In the UI extension, implement a view controller that conforms to D1IssuerProvisioningExtensionAuthorizationProviding, authenticates the end user, calls bindingHash() to retrieve the cbp, requests the issuer token from the issuer backend with this cbp, and then calls login. See your SDK login documentation for token generation.
Login with a single issuerId
Login with multiple issuerIds
Non-UI extension
Create a non-UI extension

Add a new target in Xcode of type Intents Extension. Clear Include UI Extension because the UI extension was created previously.
In the new target, enable the same App Group ID and entitlement values as in the issuer application. If the App Group ID differs, D1 SDK operations return the walletExtensionAppGroupIDNotFound error.
Update the extension Info.plist:
Set
NSExtensionPointIdentifiertocom.apple.PassKit.issuer-provisioning.Set
NSExtensionPrincipalClassto a class that extendsD1IssuerProvisioningExtensionHandler.
Example entitlements and extension configuration:
Integrate the SDK for the non-UI extension
The D1 SDK provides the base class D1IssuerProvisioningExtensionHandler, which extends Apple’s PKIssuerProvisioningExtensionHandler and implements the required APIs. In most cases, you only need to extend this class.
Error handling
Optionally, override errorEncountered(_:) in the non-UI extension to log or track errors received during the extension flow.
Typical error cases include:
The
appGroupIDis invalid or not found.The D1 backend returns an error.
Apple functional requirements
To align with Apple’s functional requirements, the D1 SDK D1IssuerProvisioningExtensionHandler and the issuer application adopt the following practices:
Display card art and cardholder name.
Determine whether cards are available (eligibility) within 100 ms of Apple invoking the API.
Provide card art and app icons with squared edges.
Support both manual and biometric login methods for authentication in the UI extension.
FAQ
Last updated
Was this helpful?