Apple Pay Certificate Setting Instructions
Following details the steps of setting the domain before integrating Apple Pay.
For those merchants who integrate ECPay’s Embedded Checkout page — for webpage (站內付 2.0), before integrating Apple Pay, please follow the path on ECPay’s dashboard to set the domain and certificate: ECPay’s dashboard > System Settings > ApplePay interface settings (綠界廠商後台 > ApplePay介接設定 > 新增設定)

1.Input a domain to be used (do not input https://; there should be no slash “/” at the end of the URL)

2.Add a .well-known folder to your server.
3.Unzip the downloaded file from ECPay’s dashboard and place it in the .well-known folder.
Apple’s server will connect to the following path to verify the domain, so please make sure the location is correct and open to external connection.
https://yourDomainName/.well-known/apple-developer-merchantid-domain-association

React web sites deployed in Vercel
1. Input a domain to be used (do not input https://; there should be no slash “/” at the end of the URL)

2. In the “public” folder of your React project, create a “.well-known” folder
3. Unzip the downloaded file from ECPay’s dashboard and place it in the .well-known folder.
Apple’s server will connect to the following path to verify the domain, so please make sure the location is correct and open to external connection.
https://yourDomainName/.well-known/apple-developer-merchantid-domain-association
4.In vercel.json, add another source object in the rewrites array:
{
"rewrites": [
{ “source”: “/(.*)”, “destination”: “/” },
{ “source”: “/.well-known/(.*)”, “destination”: “/public/.well-known/$1” }
]
}
Common errors of verification failed:
1. The file location is incorrect so Apple cannot connect to it verify.
2. The firewall is not turned on.
3. The SSL certificate does not reach A+ level. Please confirm whether the SSL certificate reaches A+ level: https://www.ssllabs.com/ssltest
4. Using UrlScan tool.
5. Not using https (Apple Pay accepts only https). (also see: Using Ngrok to create a SSL Tunnel)