---
updatedAt: 2026-02-25T11:47:38.000Z
agentTools:
  projectIndex: https://partner.getpliant.com/llms.txt
---

# Hints

## In-App Provisioning

Simple explanation of how to use the SDK methods.

### Check the presence of the card in the wallet

1. If you don't have a [cached `primaryAccountIdentifier`](./apple-ios-implementation#caching-primaryaccountidentifier), call [`MeaPushProvisioning.initializeOemTokenization`](./apple-ios-implementation#initialize-apple-pay-in-app-provisioning) to get it.
2. Check the `primaryAccountIdentifier` value:
   * `primaryAccountIdentifier` doesn't exist: The card hasn't been added to Wallet.
   * `primaryAccountIdentifier` exists:
     * Use `MeaPushProvisioning.canAddSecureElementPass(withPrimaryAccountIdentifier: primaryAccountIdentifier)`/`MeaPushProvisioning.canAddPaymentPass(withPrimaryAccountIdentifier: primaryAccountIdentifier)` to check if the card can be added to iPhone Wallet.
     * [If a watch is paired](./apple-ios-implementation#check-if-card-can-be-added-to-apple-wallet-on-iphone-or-apple-watch), use `MeaPushProvisioning.remoteSecureElementPassExists(withPrimaryAccountIdentifier: primaryAccountIdentifier)`/`MeaPushProvisioning.remotePaymentPassExists(withPrimaryAccountIdentifier: primaryAccountIdentifier)` to check if the card can be added to Apple Watch.
3. [Show the button](./apple-ios-implementation#add-to-apple-wallet-button) if:
   * There's no `primaryAccountIdentifier`.
   * `primaryAccountIdentifier` exists but the card can be added to at least one device (iPhone or Watch).

### Add card to wallet

1. Use `addPaymentPassRequestConfiguration` from the `MeaPushProvisioning.initializeOemTokenization` result.
2. Set `addPaymentPassRequestConfiguration.cardholderName`
3. Set `addPaymentPassRequestConfiguration.primaryAccountIdentifier` from cache or from the `MeaPushProvisioning.initializeOemTokenization` result (if not already set).
4. Get the `paymentPassController`:

```swift
let paymentPassController = PKAddPaymentPassViewController.init(requestConfiguration: addPaymentPassRequestConfiguration!, delegate: self)
```

5. Present the `paymentPassController` using the current controller's `.present(...)` method. [Read more](./apple-ios-implementation#add-payment-pass-view-controller)
6. Your delegate should implement the `PKAddPaymentPassViewControllerDelegate` protocol to call the `completeOemTokenization:completionHandler:` method. Once the data is exchanged, `PKAddPaymentPassRequest` gets passed to the handler to add the payment card to Apple Wallet. Finally, a delegate method tells you whether the request succeeded or failed. [Read more](./apple-ios-implementation#complete-apple-pay-in-app-provisioning)

## Extension

[Read here for general implementation details](./apple-ios-implementation#wallet-extensions)

### Notes

* `IssuerExtensionHandler.status(...)` can always return `requiresAuthentication = false`, enabling you to create a basic implementation of `IssuerAuthorizationExtensionHandler`. However, you'll need to transfer your `access/refresh token` (required to fetch card data from your backend) to the extension using an `app group` combined with `UserDefaults` or alternative methods.