Instance Property

onvalidatemerchant

An event handler that is called when the payment sheet is displayed.

Declaration

attribute EventHandler onvalidatemerchant;

Discussion

Use this attribute to request and return a merchant session. This attribute must be set to the following function: session.onvalidatemerchant = function(event) {}

The process to complete the merchant validation is as follows:

  1. Your onvalidatemerchant function calls your server, passing it the URL from the event’s validationURL attribute.

  2. Your server uses the validation URL to request a session from the Apple Pay server, as described in Requesting an Apple Pay Payment Session.

  3. In response, your server receives an opaque merchant session object, MerchantSession.

  4. You pass the merchant session object to the completion method, completeMerchantValidation.

The payment sheet is enabled.

See Also

Getting Merchant Validation

begin

Begins the merchant validation process.

completeMerchantValidation

Completes the validation for a merchant session.

ApplePayValidateMerchantEvent

An event object that contains the validation URL.