Problem with cert validation and button show

Hi, I’ve been trying to integrate Apple Pay, but for some reason, the payment button is not showing up.

The project is built with Laravel 11 and Vue. I imported the script as follows:

<script crossorigin crossorigin
src="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js"
        ></script>

Then I added the following the steps:

<style>
apple-pay-button {{
  --apple-pay-button-width: --apple-pay-button-width: 150px;;
  --apple-pay-button-height: --apple-pay-button-height: 30px;;
  --apple-pay-button-border-radius: --apple-pay-button-border-radius: 3px;;
  --apple-pay-button-padding: --apple-pay-button-padding: 0px  0px;;
  --apple-pay-button-box-sizing: border-box;
}
</style>
<apple-pay-button buttonstyle="black" type="plain" locale="en-US"></apple-pay-button>

I followed all the steps from the official Apple Pay demo:

https://applepaydemo.apple.com/

I also configured the Content Security Policy (CSP) to allow all necessary resources. However, when I test my integration, the button doesn’t appear. I’ve checked the console, but there are no errors.

At the same time, I have my certificate imported into the Keychain, and I’ve completed the entire process of creating both the certificate and the private key. However, when I try to validate the session using the certificate and key with Apple’s API, I get an error:

400 The SSL certificate error

https://apple-pay-gateway-cert.apple.com/paymentservices/

Answered by DTS Engineer in 893980022

Hi @cbtorres,

Please use the Apple Pay Demo site to learn more about the correct JS and CSS styling:

Apple Pay on the Web Interactive Demo

https://applepaydemo.apple.com

Your code contains invalid HTML and CSS and could cause unexpected behavior in most browsers.

Now, for there 400 SSL certificate error. Apple Pay users two different certificates:

  • Merchant Identity Certificate: Used for TLS mutual authentication when calling Apple's merchant validation endpoint.
  • Payment Processing Certificate: Users to decrypt the payment token after the user authorizes.

You must use the Merchant Identity Certificate when calling the validation endpoint.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Hi @cbtorres,

Please use the Apple Pay Demo site to learn more about the correct JS and CSS styling:

Apple Pay on the Web Interactive Demo

https://applepaydemo.apple.com

Your code contains invalid HTML and CSS and could cause unexpected behavior in most browsers.

Now, for there 400 SSL certificate error. Apple Pay users two different certificates:

  • Merchant Identity Certificate: Used for TLS mutual authentication when calling Apple's merchant validation endpoint.
  • Payment Processing Certificate: Users to decrypt the payment token after the user authorizes.

You must use the Merchant Identity Certificate when calling the validation endpoint.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Problem with cert validation and button show
 
 
Q