An event handler that is called when the payment sheet is displayed.
- Safari Desktop 10.0+
- Safari Mobile 10.0+
- Apple Pay JS
Use this attribute to request and return a merchant session. This attribute must be set to the following function:
Pay Validate Merchant Event
The process to complete the merchant validation is as follows:
onvalidatemerchantfunction calls your server, passing it the URL from the event’s
Your server uses the validation URL to request a session from the Apple Pay server, as described in Requesting an Apple Pay Payment Session.
In response, your server receives an opaque merchant session object, MerchantSession.
You pass the merchant session object to the completion method,
The payment sheet is enabled.