Client Methods
Register Domain
Activates a domain for use with Apple Pay on the Web and Square. A validation is performed on this domain by Apple to ensure that it is properly set up as an Apple Pay enabled domain.A domain name as described in RFC-1034 that will be registered with ApplePay.
Contains the registration status and any validation errors
Domain Verification
Hosting the Verification File
Before registering a domain, you must host Apple’s domain verification file on your domain:-
Download the verification file from:
-
Host this file at:
- Ensure the file is accessible via HTTPS
Verification Process
When you callRegisterDomain:
- Square sends a registration request to Apple
- Apple validates that your domain is properly configured
- Apple checks for the presence and validity of the verification file
- If successful, your domain is activated for Apple Pay
Use Cases
Platform Developers
This endpoint provides an easy way for platform developers to bulk activate Apple Pay on the Web with Square for merchants using their platform.Example: Bulk Registration
E-commerce Applications
Integrate Apple Pay into your web checkout flow:- Register your domain using this API
- Implement the Square Web Payments SDK
- Initialize Apple Pay payment method
- Process payments using the Payments API
Error Handling
Common errors when registering domains:Domain Not Accessible
Ensure your domain:- Is accessible via HTTPS
- Has valid SSL certificates
- Responds to requests within Apple’s timeout period
Verification File Missing or Invalid
Confirm that:- The verification file is at the correct path (
.well-known/...) - The file content matches Apple’s current version
- The file is served with correct MIME type
- No authentication is required to access the file
Domain Already Registered
If a domain is already registered, the API will indicate this in the response. Re-registration is typically not necessary unless you’re experiencing issues.Security Considerations
HTTPS Required
Apple Pay on the Web requires HTTPS. Ensure:- Valid SSL/TLS certificates are installed
- Certificate chain is complete
- No mixed content warnings
Domain Ownership
Only register domains you own or have permission to use. Apple’s validation process ensures you control the domain.Integration with Web Payments SDK
After registering your domain, integrate Apple Pay into your checkout:Web Payments SDK Example
