Hello Apple Devs,
We’re currently trying to integrate Apple Pay on the web using Apple Pay JS. We've followed the official documentation closely, but we're running into a blocker during the merchantSession validation phase.
We successfully retrieved a merchantSession, which looks like this:
json
{
"displayName": "Our Name",
"domainName": "https://pay.ourdomain.co",
"epochTimestamp": ,
"expiresAt": ****************,
"merchantIdentifier": "",
"merchantSessionIdentifier": ",
"nonce": "",
"operationalAnalyticsIdentifier": our name "t:",
"pspId": "",
"retries": 0,
"signature": "*****************..."
}
Issue:
Shortly after initiating the session, we receive a cancel event with the following info:
ApplePayCancelEvent {
type: "cancel",
sessionError: {
code: "unknown",
info: {}
}
}
We're unsure what causes the cancellation. There are no clear error messages or hints in the logs to identify what went wrong.
What We’ve Checked:
The merchantSession is returned successfully from our backend.
The domainName matches our frontend domain (https://pay.durdomain.co).
The session hasn’t expired when tested.
We're using Apple Pay JS APIs as described in the documentation.
Help Needed:
What can trigger an ApplePayCancelEvent with an "unknown" error code?
Any insight or guidance would be deeply appreciated. Thanks in advance!
Selecting any option will automatically load the page