Apple Pay for Web
Apple Pay Controller
Header parameters
api-keyanyRequired
Clearent-provided API Key
Responses
200
Successfully obtained Apple Pay merchant details.
application/json
400
Failed to retrieve merchant details from Apple.
application/json
401
Authorization is invalid. Check your api-key.
application/json
get
GET //rest/v2/apple/merchants HTTP/1.1
Host: gateway-sb.clearent.net
Accept: */*
{
"domainNames": "['example.com', 'example.org']",
"encryptTo": "merchant.com.clearent.applepay-dev",
"merchantUrl": "example.com",
"partnerInternalMerchantIdentifier": "000000843334",
"partnerMerchantName": "Bob's Canoes"
}
Header parameters
api-keyanyRequired
Clearent-provided API Key
Responses
200
Successfully obtained merchant's registered domains.
application/json
401
Authorization is invalid. Check your api-key.
application/json
404
Failed to retrieve registered domains for merchant.
application/json
get
GET //rest/v2/apple/merchants/domains HTTP/1.1
Host: gateway-sb.clearent.net
Accept: */*
{
"merchant-domains": [
{
"domain": "example.com",
"isEnabled": true,
"merchantId": "000000843334"
}
],
"payloadType": "text"
}
Header parameters
api-keyanyRequired
Clearent-provided API Key
Body
domainNamesstring[]RequiredExample:
List of Merchant domains to register or de-register with Apple Pay
["example.com", "example.org"]
Responses
200
Successfully registered merchant domain(s).
application/json
400
Failed to register merchant domain(s).
application/json
401
Authorization is invalid. Check your api-key.
application/json
post
POST //rest/v2/apple/merchants/domains HTTP/1.1
Host: gateway-sb.clearent.net
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"domainNames": "[\"example.com\", \"example.org\"]"
}
{
"merchant-domains": [
{
"domain": "example.com",
"isEnabled": true,
"merchantId": "000000843334"
}
],
"payloadType": "text"
}
Header parameters
api-keyanyRequired
Clearent-provided API Key
Body
domainNamesstring[]RequiredExample:
List of Merchant domains to register or de-register with Apple Pay
["example.com", "example.org"]
Responses
200
Successfully registered merchant domain(s).
application/json
400
Failed to unregister merchant domain(s).
application/json
401
Authorization is invalid. Check your api-key.
application/json
delete
DELETE //rest/v2/apple/merchants/domains HTTP/1.1
Host: gateway-sb.clearent.net
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"domainNames": "[\"example.com\", \"example.org\"]"
}
{
"merchant-domains": [
{
"domain": "example.com",
"isEnabled": true,
"merchantId": "000000843334"
}
],
"payloadType": "text"
}
Header parameters
public-keyanyRequired
Clearent-provided Public Key
Body
domainstringRequiredExample:
Merchant domain that is already registered with Apple Pay
example.com
initiatedFromstringRequiredExample:
Apple Pay 'initiative' parameter that varies by platform
web
validationURLstringRequiredExample:
Apple Pay environment-dependent URL for acquiring a merchant Apple Pay for Web session
https://apple-pay-gateway.apple.com/paymentservices/startSession
Responses
200
Successfully obtained Apple Pay session from Apple.
application/json
400
Failed to get Apple Pay session from Apple.
application/json
401
Authorization is invalid. Check your public-key.
application/json
post
POST //rest/v2/apple/merchants/validation HTTP/1.1
Host: gateway-sb.clearent.net
Content-Type: application/json
Accept: */*
Content-Length: 129
{
"domain": "example.com",
"initiatedFrom": "web",
"validationURL": "https://apple-pay-gateway.apple.com/paymentservices/startSession"
}
{
"merchantSession": "text",
"payloadType": "text"
}
Was this helpful?