Apple Pay Domain Verification
Verify your domain with Apple Pay
Note
This step is not required in the case of integrating using MyFatoorah IOS SDK.
To use Apple Pay Button, you need to register with Apple on all of your web domains that will show an Apple Pay button. This includes both top-level domains and subdomains. You need to do this for domains you use in both demo and live servers.
- Host the domain verification file.
- Register your domain with Myfatoorah.
Step1: Host the domain verification file
You will be using a domain verification file provided by MyFatoorah. Contact the technical support team at [email protected] to get the domain verification file that you will host on your domain.
Steps:
1- Create a folder in the root path and name it ".well-known"
2- Paste the file inside the ".well-known" folder.
3- Test that the file is located in the correct place by opening the below URL
https://{example.com}/.well-known/apple-developer-merchantid-domain-association
Replace only the {example.com} with your site URL.
https://{example.com}/.well-known/apple-developer-merchantid-domain-association
Domain Verification File
Do not remove the file from the server. Apple might need to revalidate the domain on a yearly basis and this file must be available for successful validation.
SSL
Domain should be TLS (HTTPS) enabled.
Step2: Register your domain with Myfatoorah
To register your domain with Myfatoorah and Apple Pay, you need to call v2/RegisterApplePayDomain endpoint. The request is a POST request with the following parameters.
{
"DomainName": "example.com"
}
{
"IsSuccess": true,
"Message": "OK",
"ValidationErrors": null,
"Data": null
}
{
"IsSuccess": false,
"Message": "Please make sure that domain verification file in the following path 'https://<YourDomainName>/.well-known/apple-developer-merchantid-domain-association' is valid and accessible",
"ValidationErrors": null,
"Data": null
}
End Point:
https://apitest.myfatoorah.com/v2/RegisterApplePayDomain
https://api.myfatoorah.com/v2/RegisterApplePayDomain
https://api-sa.myfatoorah.com/v2/RegisterApplePayDomain
https://api-qa.myfatoorah.com/v2/RegisterApplePayDomain
Notes
- Domain name in the request JSON should be domain name without a scheme (HTTPS)
- Header should have a valid token to access it.
- You may receive failed response with error detail in case of an invalid request.
Updated about 2 months ago