Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
207 lines (157 sloc) 7.48 KB

Apple Pay

Apple Pay is a digital wallet service by Apple Inc. that allows shoppers to make purchases with credit or debit cards stored on their Apple devices.

Note

Apple Pay is only available in a limited number of countries. This limitation applies to the shopper's country and not the merchant's.

Accepting Apple Pay via Mollie

In order to accept Apple Pay via Mollie, you need:

  1. The payment method credit card must be enabled on your website profile;
  2. You must enable Apple Pay on your website profile in the Dashboard.

Shoppers using an Apple device with Apple Pay configured will automatically be offered Apple Pay in the :doc:`Mollie Checkout </guides/checkout>`. Additionally, limited support for integrating Apple Pay in your own checkout is available.

Using the Mollie Checkout

If you are using the Mollie Checkout and the :doc:`Create Payment API </reference/v2/payments-api/create-payment>` without the method parameter, the Apple Pay button will be shown in the checkout during method selection:

images/checkout-with-apple-pay@2x.jpg

Adding Apple Pay to the method selection

At the moment, only limited support for integrating Apple Pay in your own checkout is available. You can not yet add the "Checkout with Pay" button to your own checkout, but you can add Apple Pay to the method selection. The "Checkout with Pay" button will then be shown in the Mollie Checkout.

First, you must indicate to the :doc:`List Methods API </reference/v2/methods-api/list-methods>` which wallets you support in your checkout by adding the includeWallets=applepay parameter.

If Apple Pay is enabled on the website profile, a method with the id applepay will be returned in the list of payment methods. Apple Pay can be enabled in the Dashboard.

Then, during checkout, you should check if the Apple Pay method is available on the shopper's device by using the canMakePayments method on the window.ApplePaySession object. Apple requires you that you only show the Apple Pay option when it is actually supported by the device. For more details, see the article by Apple.

Finally, when the shopper selects Apple Pay from your method selection, you should use the Create Payment API to create a payment with the method parameter set to applepay and redirect the shopper to the _links.checkout URL returned.

When the shopper authorizes the payment, Mollie will create a payment with the method creditcard. We will then call your :doc:`webhook </guides/webhooks>` and redirect the shopper back to your website as normal.

Examples

Option 1. Adding Apple Pay client-side with JavaScript

When using a <select> dropdown or equivalent, we recommend handling adding Apple Pay to your checkout entirely with JavaScript. This prevents you from having to edit your HTML or CSS.

If you need a more control or have complex HTML, see :ref:`Adding Apple Pay server-side <adding-apple-pay-server-side>`.

For more details on detecting the support of Apple Pay on a device, see Apple’s documentation.

Option 2. Adding Apple Pay server-side

If you use a more complex HTML structure, or you need data which is only available server-side, your best option is to add Apple Pay to the DOM and hide it both visually as well as from screen-readers.

For more details on detecting the support of Apple Pay on a device, see Apple’s documentation.

Direct integration of Apple Pay

Integrating Apple Pay in your own checkout is available. See our :doc:`full guide </guides/applepay-direct-integration>`.

You can’t perform that action at this time.