Apple Pay Domains
Get association file
Serve the Apple-issued domain-association file for this instance. This endpoint is public and unauthenticated: Apple fetches it while verifying a registered domain. Host it from every domain that presents the Apple Pay button. The same file is also served without the .txt extension, at /.well-known/apple-developer-merchantid-domain-association.
If no domain-association content is configured yet, the request returns 400 with the classifier APPLE_PAY_NOT_CONFIGURED.
GET
/
.well-known
/
apple-developer-merchantid-domain-association.txt
Get association file
curl --request GET \
--url https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txtimport requests
url = "https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"code": 400,
"message": "The request could not be handle due to invalid data",
"classifier": "BAD_REQUEST"
}Response
The domain-association file.
The response is of type string.
⌘I
Get association file
curl --request GET \
--url https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txtimport requests
url = "https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.{env}.on-hellgate.cloud/.well-known/apple-developer-merchantid-domain-association.txt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"code": 400,
"message": "The request could not be handle due to invalid data",
"classifier": "BAD_REQUEST"
}