Why do I receive a 422 error with Apple Pay when using Adyen's Certificate?

It is possible to receive a 422 error when attempting a transaction with Apple Pay while using Adyen’s certificate.

The minimum recommended checkout version is 3.17.1 which requires API version 64 or above, following this check your /paymentMethods response should contain a configuration object for Apple Pay which is crucial for this to work. The configuration object should hold your merchantId which is a necessary property for the API call towards: https://checkoutshopper-test.adyen.com/checkoutshopper/v1/applePay/sessions (TEST) or https://checkoutshopper-live.adyen.com/checkoutshopper/v1/applePay/sessions (LIVE).

In the API call done towards Adyen's endpoint (applePay/sessions) you should have these properties included:

""displayName"": ""Shall match configuration.merchantName from paymentMethods response"",
""domainName"": “Shall match window.location.hostname of the web shop”,
""initiative"": ""web"",
""merchantIdentifier"": “Shall match configuration.merchantId from paymentMethods response”

There is no need to explicitly specify these properties in your checkout configuration object. By default, Drop-in/Components take the values from the paymentMethodsResponse in the AdyenCheckout instance configuration from version 3.17.1 and above. To make sure these properties are configured correctly in your checkout, you will have to pass the full response from the /paymentMethods call as the paymentMethodsResponse object when creating an instance of the AdyenCheckout.

Additionally, the values passed from the paymentMethodsResponse should not be tampered with in anyway.

Was this article helpful?
1 out of 3 found this helpful