When attempting to authorize an Apple Payment on an iOS 18 device using the scannable code in a non-Safari browser (i.e. Chrome), the payment sheet displays briefly, then dismisses.
This same exact implementation of Apple Pay on the Web works flawlessly in Safari, so this feels like a bug given that the merchant session works fine in Safari.
The following errors were found in my iOS device logs:
(PassbookUIService) Codable: Failed to decode Merchant Session Created: Error Domain=NSCocoaErrorDomain Code=4864 UserInfo={NSDebugDescription=<private>, NSCodingPath=<private>}
(PassbookUIService) Session 29592: Fatal Error: Failed to decode merchant session created`
Update: My team was able to resolve this issue!
It turns out that our server was trying to type the opaque payment session response from Apple, instead of treating it like an opaque string and simply forwarding that raw string response down to the frontend, to be sent into completeMerchantValidation()
.