Apple Pay
Validate Apple Pay Merchant
Performs Apple Pay merchant validation and returns the merchant session
POST
Validate Apple Pay Merchant
Overview
Apple Pay requires merchant validation before the payment sheet can be shown. When the client’sApplePaySession fires onvalidatemerchant, pass the event’s validationURL to this endpoint. Firmly performs the mutual-TLS paymentSession handshake with Apple and returns Apple’s merchant session, which you pass to session.completeMerchantValidation(...) on the client.
This endpoint is served by the wallet service under
/api/v1/wallets/... — it is not under /domains/{domain}/... like the other express endpoints. The merchant domain is sent in the request body.The request’s
Origin (or Referer) header is sent to Apple as the initiativeContext — the web domain displaying the Apple Pay sheet. That domain must be registered for Apple Pay, so call this endpoint from the page that shows the sheet.Authentication
Request Body
The validation URL provided by Apple in the
ApplePaySession onvalidatemerchant event. Must be an Apple Pay gateway URL (https://apple-pay-gateway*.apple.com/...); any other host is rejected.The merchant name to show in the Apple Pay sheet. Defaults to the merchant domain when omitted.
Response
Returns Apple’s merchant session object verbatim (not wrapped in another object). Treat it as opaque and pass the whole response body unchanged tosession.completeMerchantValidation(). Notable fields:
Code Example
Error Responses
Related Endpoints
- Complete Apple Pay Order - Place the order after the buyer authorizes