Enable Apple Pay on the Web Using a LINK Cartridge

If the merchant enables Apple Pay through a LINK cartridge, the merchant must meet minimum requirements.

The merchant must:

Note: B2C Commerce currently supports only version 1 of the Apple Pay JS API that is provided by Apple in Safari.

Salesforce B2C Commerce Extensions

B2C Commerce provides the constant METHOD_DW_APPLE_PAY to the new Apple Pay system Payment Method.

B2C Commerce provides hooks for payment authorization:

Note: Several Apple Pay hooks can optionally trigger a client-side DOM event after executing. Supported hooks are:
  • applepay.prepareBasket
  • applepay.shippingContactSelected
  • applepay.shippingMethodSelected
  • applepay.paymentMethodSelected
  • applepay.cancel
Note: The dw.extensions.applepay.shippingMethodSelected can return a status of INVALID_SHIPPING_ADDRESS. The dw.extension.applepay.paymentAuthorized hook can also return a status of INVALID_SHIPPING_ADDRESS if the street address field is invalid; however, if the name, email, or phone number is invalid, dw.extension.applepay.paymentAuthorized returns INVALID_SHIPPING_CONTACT.
Note: The cartridge that contains the hook must be in the site cartridge path (not the Business Manager cartridge path).

The API class dw.extensions.applepay.ApplePayHookResult indicates error reasons.

The <isapplepay> ISML tag injects a default black Apple Pay button into the HTML page.

You can use the following CSS class names on pages where Apple Pay for the Web is enabled:

Testing Your Apple Pay on the Web Implementation

You use the Apple Pay Sandbox to test integration and payment sheet configuration. For more details, see Apple Pay Sandbox Testing (at https://developer.apple.com/support/apple-pay-sandbox/).

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.