Apple Pay Domain Verification Guide | Payment Methods
About 864 wordsAbout 3 min
2025-07-31
1. Application Materials
Please send the application materials to the email address acq-pmteam@pingpong.com, and CC to acq-tech@pingpongx.com and acq-ts@pingpongx.com.
- Merchant Name
- Merchant AccId
- Merchant ClientId
- Merchant Domain (if multiple exist, please fill in multiple, note to keep pairing with accId and clientId)
Domain Verification Process
To enable Apple Pay functionality on your website, you need to complete Apple's domain verification process to prove you have control over the domain. Here are the detailed steps:
step-1: Obtain Verification File
- You will receive a verification file named
apple-developer-merchantid-domain-association.txtvia email. This file is pre-generated by Apple, please do not manually modify it. - This file contains a unique string pre-generated by Apple to verify your domain ownership.
- Important: Do not modify the content of this file, any changes will cause verification failure.
step-2: Deploy Verification File
- Create the
.well-knowndirectory on your Web server (if it doesn't exist yet). - Upload the
apple-developer-merchantid-domain-association.txtfile to this directory. - Ensure the file is accessible via HTTPS protocol.
https://your-domain/.well-known/apple-developer-merchantid-domain-association.txtVerification Requirements
- File Path: Must be located in the
/.well-known/directory - File Name: Must strictly be
apple-developer-merchantid-domain-association.txt - File Content: Must be exactly the same as the original content provided by Apple
- Access Protocol: Must support HTTPS access
Verification Confirmation
After completing the deployment, you can confirm whether the verification file is correctly configured through the following methods:
- Access
https://your-domain/.well-known/apple-developer-merchantid-domain-association.txtin your browser - Confirm that the returned content is exactly the same as the original file content you received
- Confirm that the file can be downloaded normally without any errors
Shell Script Example
The following demonstrates the domain verification file deployment process through a shell script.
Note
This script will check and deploy the Apple Pay domain verification file.
The script is only for process explanation and reference, please modify according to your actual situation, do not run directly.
#!/bin/bash
# Apple Pay Domain Verification File Deployment Script
# Configuration variables
DOMAIN="example.com" # Replace with your domain
WEB_ROOT="/var/www/$DOMAIN" # Replace with your website root directory
FILE_PATH="$HOME/Downloads/apple-developer-merchantid-domain-association.txt" # Replace with the local path of the verification file
# Display welcome message
echo "===== Apple Pay Domain Verification File Deployment Tool ====="
echo "Domain: $DOMAIN"
echo "Website Root Directory: $WEB_ROOT"
echo "Verification File: $FILE_PATH"
echo "========================================"
# Check if verification file exists
if [ ! -f "$FILE_PATH" ]; then
echo "Error: Verification file does not exist at $FILE_PATH"
echo "Please ensure you have downloaded the verification file provided by Apple"
exit 1
fi
# Create .well-known directory
echo "Creating .well-known directory..."
mkdir -p "$WEB_ROOT/.well-known"
if [ $? -ne 0 ]; then
echo "Error: Unable to create .well-known directory, please check permissions"
exit 1
fi
# Set directory permissions
echo "Setting directory permissions..."
chmod 755 "$WEB_ROOT/.well-known"
# Copy verification file
echo "Copying verification file to target location..."
cp "$FILE_PATH" "$WEB_ROOT/.well-known/apple-developer-merchantid-domain-association.txt"
if [ $? -ne 0 ]; then
echo "Error: Unable to copy verification file, please check permissions"
exit 1
fi
# Set file permissions
echo "Setting file permissions..."
chmod 644 "$WEB_ROOT/.well-known/apple-developer-merchantid-domain-association.txt"
# Verify deployment
echo "Verifying file deployment..."
if command -v curl &> /dev/null; then
echo "Using curl to verify file access..."
curl -s -o /dev/null -w "HTTP Status Code: %{http_code}\n" "https://$DOMAIN/.well-known/apple-developer-merchantid-domain-association.txt"
echo "Verification file content (first 20 characters):"
curl -s "https://$DOMAIN/.well-known/apple-developer-merchantid-domain-association.txt" | head -c 20
echo "..."
else
echo "curl is not installed, please manually verify if the file is accessible:"
echo "https://$DOMAIN/.well-known/apple-developer-merchantid-domain-association.txt"
fi
echo "========================================"
echo "Deployment completed! Please visit the following address in your browser to confirm whether the verification file is correctly deployed:"
echo "https://$DOMAIN/.well-known/apple-developer-merchantid-domain-association.txt"
echo ""
echo "If you can see the file content, and the content is exactly the same as the original file provided by Apple, it means the file has been successfully deployed."Common Issues
- 404 Error: Check if the file path and name are correct
- Content Mismatch: Confirm the file has not been modified and no encoding issues occurred
- HTTPS Issues: Ensure your domain has SSL certificate properly configured
After completing the verification, Apple will automatically detect your domain verification status. After successful verification, you will be able to use Apple Pay functionality on your website.
Note: Domain verification is a necessary step to enable Apple Pay, please ensure configuration is completed strictly according to requirements.
