No momento, esta página não está disponível em português
Payment-method icon

Handle Apple Pay errors

Troubleshoot common Apple Pay errors.

It is possible that sometimes you run into an error when you submit a request or get a response for an Apple Pay payment, or when you are integrating Apple Pay in your website, store, or app. In the following error scenarios, you can read more about what some of the Apple Pay error codes mean, how to troubleshoot those errors.

API errors

In this section we give you some examples of API errors that can occur when you submit a payment request.

5_001 Apple Pay token amount-mismatch

What it means

The amount that was authorised in Apple Pay is not the same as the amount that was authorised by the Adyen payments platform.

How to troubleshoot

Verify the amounts in the transaction. Note that transactions made with Discover cards (test) and American Express cards (test) support only USD as currency.

5_002 Invalid Apple Pay token

What it means

The Apple Pay token that was sent in the API request does not conform to the specification.

How to troubleshoot

Make sure that the Apple Pay token is retrieved, formed, and passed on correctly.
For example, for a /payments request, make sure that you stringify and base64 encode the payment.token.paymentData from Apple Pay and submit it in the request as the applePayToken value. For examples and more information about custom integrations, see Apple Pay for API only.

5_004 Could not find Merchant Private Key

What it means

The Apple Pay key is correct, but the key that was used to encrypt the data isn't configured for your Adyen API credential.

How to troubleshoot

There are several things you can do to troubleshoot this error.

  • Check the payment processing certificate
    Make sure that:

    • You are using the same API credential as you did when creating the payment processing certificate.
    • You have configured your website or app to use the same merchant identifier as the one that was used to create the payment processing certificate.
    • You have activated the latest payment processing certificate in the Apple Developer Portal after you received a confirmation that Adyen added the certificate to your API credential.
  • Check the merchant identifier
    Make sure that:

    • You have updated the test merchant identifier to the live merchant identifier when you moved your website or app to production.
  • Check the card
    Make sure that:

    • The payment isn't made with a test card in a live environment. You can only use production cards in your live environment.

An error occurred. CSR algorithm/size incorrect. Expected: RSA(2048)

What it means

You see this error in the Apple Developer Portal when you are creating the merchant identity to enable Apple Pay on the web. You're most likely using an incorrect Certificate Signing Request (CSR) file.

How to troubleshoot

Make sure that you are not using the CSR file that you received from Adyen to generate the merchant identity certificate. To enable Apple Pay on the web, generate a CSR file following the steps to create a merchant identity certificate.

Payment Not Processed

What it means

An Apple Pay payment cannot be processed. The Apple Pay payment sheet on your website displays the error message "Payment Not Processed".

How to troubleshoot

Make sure that:

  • You have validated your domain.
  • You have linked a verified domain to your merchant identity certificate in the Apple Developer Portal.
  • You have defined your onValidateMerchant function correctly and send a valid payload to the validationUrl. See Providing Merchant Validation for more information.
  • You send in the correct initiativeContext in the body of the AJAX request to the validationUrl. The request and the initiativeContext have to be in the same verified domain.
  • Your server meets the requirements set by Apple.
  • You check and fix any errors that show up in the Safari Web Inspector.

Can't process Apple Pay payments using Adobe Commerce

What it means

There is an issue with processing Apple Pay payments from websites using Adobe Commerce, and errors appear in the logs.

How to troubleshoot

Check the adyen_exception.log for the error messages Error Apple, API HTTP Status is: and Network error. If you find any, make sure that:

  • The path to the location of your PEM file is correct.
  • The merchant identifier, the domain name, and the PEM file are correct.
  • The network status is healthy.

422 Unauthorized to process transactions on behalf of merchantId

What it means

There is an issue with requesting your merchant session token from the /applePay/sessions endpoint.

How to troubleshoot

Make sure that you are using SDK version 3.18.0 or later and API version 65 or later.

First, check whether the /paymentMethods contains a configuration object with a merchantId. The merchantId is required for the /applePay/sessions request.