In-App Provisioning process failure (error 500)

Hello,

We are implementing in-app provisioning in our banking app but are having trouble getting to the Terms & Conditions screen.

User taps on “Add to Apple Wallet” > PKAddPaymentPassViewController > Next > the flow fails quickly with "Could Not Add Card -> Set Up Later" alert.

The only notable thing in the logs, as far as I can see is the

https://nc-pod12-smp-device.apple.com:443/broker/v4/devices/{SEID}/cards 

fails with:

<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>Apple</center>
</body>
</html>

and maybe

ProvisioningOperationComposer: Step 'eligibility' failed with error <PKProvisioningError: severity: 'terminal'; internalDebugDescriptions: '(
    "eligibility request failure",
    "Received HTTP 500"
)'; underlyingError: 'Error Domain=PKPaymentWebServiceErrorDomain Code=0 "Unexpected error." UserInfo={PKErrorHTTPResponseStatusCodeKey=500, NSLocalizedDescription=Unexpected error.}'; userInfo: '{
    PKErrorHTTPResponseStatusCodeKey = 500;
}'; >

Feedback Assistant ID: FB22932141 (Error during In-App Provisioning)

Answered by DTS Engineer in 893633022

Hi @stupid_apple_username,

You wrote:

User taps on “Add to Apple Wallet” > PKAddPaymentPassViewController > Next > the flow fails quickly with "Could Not Add Card -> Set Up Later" alert. [...] Feedback Assistant ID: FB22932141 (Error during In-App Provisioning) [...]

Thanks for the Feedback ID. There are some issues with your in-app provisioning attempts:

  • PKAddPaymentPassRequestConfiguration isn't populated correctly
  • Issuer app isn't allowlisted

PKAddPaymentPassRequestConfiguration isn't populated correctly

Ensure all required fields are set before presenting the view controller:

let config = PKAddPaymentPassRequestConfiguration(encryptionScheme: .ECC_V2)!

config.cardholderName      = "Jane Smith"
config.primaryAccountSuffix = "3673"                    // last 4 of FPAN
config.primaryAccountIdentifier = "<your-stable-card-id>" 
config.paymentNetwork      = .masterCard
config.style               = .payment

let vc = PKAddPaymentPassViewController(requestConfiguration: config, delegate: self)!
present(vc, animated: true)

Note: If primaryAccountIdentifier is invalid, server-side validations can't be performed and provisioning is blocked.

Issuer app isn't allowlisted

Even with a valid primaryAccountIdentifier, the provisioning request can still be blocked due to a failed allowlist check. To request for your issuer's Adam ID to be allow listed, please see the following:

Apple Pay on the Web demo: In-App Provisioning

https://applepaydemo.apple.com/in-app-provisioning#5

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Hello, is there any potential news regarding this?

Hi @stupid_apple_username,

You wrote:

User taps on “Add to Apple Wallet” > PKAddPaymentPassViewController > Next > the flow fails quickly with "Could Not Add Card -> Set Up Later" alert. [...] Feedback Assistant ID: FB22932141 (Error during In-App Provisioning) [...]

Thanks for the Feedback ID. There are some issues with your in-app provisioning attempts:

  • PKAddPaymentPassRequestConfiguration isn't populated correctly
  • Issuer app isn't allowlisted

PKAddPaymentPassRequestConfiguration isn't populated correctly

Ensure all required fields are set before presenting the view controller:

let config = PKAddPaymentPassRequestConfiguration(encryptionScheme: .ECC_V2)!

config.cardholderName      = "Jane Smith"
config.primaryAccountSuffix = "3673"                    // last 4 of FPAN
config.primaryAccountIdentifier = "<your-stable-card-id>" 
config.paymentNetwork      = .masterCard
config.style               = .payment

let vc = PKAddPaymentPassViewController(requestConfiguration: config, delegate: self)!
present(vc, animated: true)

Note: If primaryAccountIdentifier is invalid, server-side validations can't be performed and provisioning is blocked.

Issuer app isn't allowlisted

Even with a valid primaryAccountIdentifier, the provisioning request can still be blocked due to a failed allowlist check. To request for your issuer's Adam ID to be allow listed, please see the following:

Apple Pay on the Web demo: In-App Provisioning

https://applepaydemo.apple.com/in-app-provisioning#5

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

In-App Provisioning process failure (error 500)
 
 
Q