Apple pay payment error

Hi Experts,

Could you please help me understand the below error? This is happening when i try to integrate Apple pay web. The error is logged in colsole log while authenticating payment with touch id.

State machine change state from PKPaymentAuthorizationStateRewrap to PKPaymentAuthorizationStateError with param: <PKPaymentAuthorizationErrorStateParam: 0x600001ad0160; error: Error Domain=PKPassKitErrorDomain Code=-2007 "(null)" UserInfo={NSUnderlyingError=0x60000167c120 {Error Domain=PKPaymentWebServiceErrorDomain Code=0 "Unexpected error." UserInfo={NSLocalizedDescription=Unexpected error.}}}>

Thanks in advance! Arun

Same problem here, after touch id identification I'm getting this error in the system log. I think this error is a consequence to a previous "completeSession" request that result in a 400 error:

2022-03-29 12:23:32.911047+0200 0xa66369   Default     0x0                  6399   0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] Response:
https://crt-pod1-smp-device.apple.com:443/paymentservices/v4/devices/XXXXXXXX/passes/paymentpass.com.apple/nc.prod.cert_YYYYYYYYY/completeSession 400
{
    "Content-Length" = 150;
    "Content-Type" = "application/json";
    Date = "Tue, 29 Mar 2022 10:23:32 GMT";
    "x-envoy-upstream-service-time" = 53;
}
{
    statusCode = 400;
    statusMessage = "Payment Services Exception Failed to verify transaction instructions signature generated with SEP keys";
}

2022-03-29 12:23:32.911317+0200 0x8d81e0   Default     0x0                  6399   0    com.apple.PassKit.PaymentAuthorizationUIExtension: (PassKitCore) [com.apple.passkit:Payment] State machine change state from PKPaymentAuthorizationStateRewrap to PKPaymentAuthorizationStateError with param: <PKPaymentAuthorizationErrorStateParam: 0x600002635b10; error: Error Domain=PKPassKitErrorDomain Code=-2007 "(null)" UserInfo={NSUnderlyingError=0x600002a54ae0 {Error Domain=PKPaymentWebServiceErrorDomain Code=0 "Unexpected error." UserInfo={NSLocalizedDescription=Unexpected error.}}}>

@arunnair91, did you find the problem?

The error is logged in colsole log while authenticating payment with touch id.

Is there any more information in the logs on where authorization could be going wrong? If not, check the following items:

  • A request for a payment session contains a domain other than what is being tested on. For example, testing on www.example.com and the request a payment session request is being sent for `staging.example.com``.

  • A Merchant Session is considered to have a bad signature because of issues with a Merchant Identity Certificate or Merchant Domain.

  • You have not authorized your payment with watchOS, macOS, or iOS.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com

@meaton I tried the exact same code in another mac, same iCloud tester account, same card and it's working. The problem is related to my computer. I don't know how to debug this issue.

After upgrading to Monterey (from Catalina) has started working, but I don't understand why safari allowed me to start the apple pay process if there was some sort of incompatibility issue, and the most important, any clue of why... Maybe you should improve the error feedback.

Apple pay payment error
 
 
Q