Skip to main content
POST
Validate Apple Pay Merchant

Overview

Apple Pay requires merchant validation before the payment sheet can be shown. When the client’s ApplePaySession 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

string
required
Device authentication token from Browser Session

Request Body

string
required
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.
string
required
The merchant domain (e.g., “merchant.example.com”).
string
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 to session.completeMerchantValidation(). Notable fields:
string
Apple’s identifier for this merchant session
string
The merchant identifier the session was issued for
string
The web domain the session is valid for
string
The merchant name shown in the Apple Pay sheet
number
Session expiry as epoch milliseconds
string
Apple’s signature over the session. Do not modify.

Code Example

Error Responses