Validate Apple Pay Merchant
Apple have documented the overall process and references to individual stages can be found in their documentation. Once you have created an Apple Pay session you will need to perform the merchant validation process. If you are using an Access PaySuite issued Apple Pay merchant identifier, you can use the following Access PaySuite API. This API is secured by HTTP Basic using the same credentials as the transaction processing API. Calls to this API must not be made from your JavaScript implementation directly, and must come from your own server.
If you are using your own Apple Pay developer account, you will need to perform the merchant validation call directly to Apple. Follow Apple’s guidance on requesting an Apple Pay payment session.
This is an example of how this could be used with the Apple Pay JavaScript SDK:
applePaySession.onvalidatemerchant = function( event ) {
var url = event.validationURL;
var siteDomain = window.location.hostname;
// The function createSession( url ) will make an ajax call to the site server,
// which will in turn call the Access PaySuite service
// /acceptor/rest/applepay/{instId}/validate/{applePayMerchantIdentifier}?validationURL={url}&siteDomain={siteDomain}
createSession( url, siteDomain ).done( ( response ) => {
session.completeMerchantValidation( response );
} );
};API endpoint
POST/acceptor/rest/applepay/{instId}/validate/{applePayMerchantIdentifier}Validate a merchant#
Validates an Apple Pay merchant session for the given installation and merchant identifier
- instId
- applePayMerchantIdentifier
- validationURL
- siteDomain
{} — This call takes no request body — send an empty JSON object.
Responses
400Invalid Apple Pay validation request
advancedPayments/validation-failure-outcome- status
- reasonCode
- reasonMessage
- fieldErrors [ {
- field
- message
} ]
401Unauthorized
advancedPayments/error-response- status
- error
- message
- path
- timestamp
403Not authorised to validate Apple Pay for the installation
advancedPayments/error-response- status
- error
- message
- path
- timestamp
500Internal Server Error
advancedPayments/error-response- status
- error
- message
- path
- timestamp
No examples yet.
Once the merchant is validated, continue to Apple Pay Payments or Apple Pay Payouts.