alt

Important information

The API reference is now available here.
The deprecated API reference is available here.

Unzer

Troubleshooting for Apple Pay integration

Learn how to solve common problems that might occur when you are integrating Apple Pay payment method.

Apple pay payment type creation fails

Problem:

The Apple Pay type creation fails and the Unzer API returns Failed to decrypt ApplePay data from merchant s-pub-xxx as the merchant message.

Solution:

Make sure you transmit correct and complete payment data. You should provide the data received from Apple Pay, in the onpaymentauthorized event. The payment data must be in JSON format with the following structure:

{
  "version": "EC_v1",
  "data": "{data}",
  "signature": "{signature}",
    "header": {
      "ephemeralPublicKey": "{ephemeralPublicKey}",
      "publicKeyHash": "{publicKeyHash}",
      "transactionId": "{ApplePayTransactionId}"
    }
}

For more information on payment token format, see the Apple Pay documentation.

For example, the payment request object in the step 2 of the integration guide.


The charge or authorize transaction fails

Problem:

The charge or authorize request fails and the Unzer API returns Validation error with the partner system as the merchant message.

Solution:

Make sure that you do not set the supportsEmv property in your merchantCapabilities of your Apple Pay payment request when initiating your Apple Pay session in the front end.

For example, the payment request object in the step 2 of the integration guide.