How to setup Apple Pay on WooCommerce?

WooCommerce
How to setup Apple Pay on WooCommerce?

In this guide, learn how to enable Apple Pay on your WooCommerce store.

How do you properly setup Apple Pay in WooCommerce?

In this example we will be using the WooCommerce Stripe plugin to help setup Apple Pay.

Ensure this plugin is installed, active, and setup correctly!

If you have never setup Stripe on your WooCommerce store, see my tutorial on how to setup Stripe.

Also keep in mind that Apple Pay can only work when using the Safari browser!

If you are more of a visual learner, see the video tutorial below.

Let’s get started.

1. Enable payment request buttons

First, login to your WooCommerce dashboard.

Next, go to your WooCommerce Settings > Payments.

Then, click Manage on Stripe.

Finally, click the checkbox to enable Enable Payment Request Buttons.

Click Save.

WooCommerce Apple Pay

WooCommerce Apple Pay

Setup Apple Pay on your WooCommerce store.

Get the plugin

2. Add your domain to Apple Pay in Stripe

Next, login to your Stripe dashboard.

Then, click Settings > Payment Methods > Apple Pay.

Next, click “add domain” and enter your domain.

Finally, download the verification file to your computer.

3. Upload verification file to document root

Next, connect to your server via SFTP or SSH using a tool such as FileZilla.

Then, upload the apple-developer-merchantid-domain-association file to the .well-known folder in your document root.

Pro Tip: you may have to create the “.well-known” folder on your server by creating a new directory.

To make sure you followed this step correctly, navigate to https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association.

You should see a string of many randomly generated numbers.

WooCommerce Apple Pay

WooCommerce Apple Pay

Setup Apple Pay on your WooCommerce store.

Get the plugin

4. Test that Apple Pay is working

Open up a Safari browser on your phone or computer.

Go to your website and add one of your products to Cart.

You should see the option to pay with Apple Pay.

If you do not see this option, make sure that you are using the Safari browser. You may also have to clear your cache.

Go through the Checkout process.

Pro tip: Update 1 product in your store to be $1. Then do a real transaction using Apple Pay to make sure everything is working!

Code Customizations

How to hide Apple Pay on your Product page?

// Hide Apple Pay on Product page
add_filter('wc_stripe_hide_payment_request_on_product_page', '__return_true');

How to add Apple Pay on your Checkout page?

// Adds Payment Request button (Apple Pay) on the Checkout page
add_filter('wc_stripe_show_payment_request_on_checkout', '__return_true');

Comments

  1. Anjali April 21, 2020 | 11:42 pm

    Hello I have clear cache of safari browser still apply pay is not showing please help

  2. Julia August 24, 2020 | 8:45 am

    Hey! I can’t get the Apple Pay button to show up on the checkout. I already cleaned caches after adding the button, tried on different iOS devices… What gives?

    • Simon Gondeck August 24, 2020 | 11:43 am

      Hey Julia, are you able to see the Apple Pay button on the Cart page? Is the Checkout page the only place you cannot see the Apple Pay button or are you not seeing this anywhere on your site? Please provide a url or else I cannot see 🙂

  3. Eiroll August 24, 2020 | 10:48 pm
    // Adds Payment Request button (Apple Pay) on the Checkout page
    add_filter('wc_stripe_show_payment_request_on_checkout', '__return_true');

    Hello sir, where i can insert this snippet code?
    I am using woocommerce wordpress. Thanks Mate!

    • Simon Gondeck August 25, 2020 | 5:22 pm

      Hey Eiroll, you have to add this to you theme’s functions.php file. What hosting are you currently using? They should provide instructions on how to connect to your site via SFTP. Then after connecting to your site via SFTP or SSH, go to /wp-content/themes/your-theme-name/. Next, edit the functions.php file and add this to the bottom of the file and save.

  4. umer shahzad September 17, 2020 | 7:06 am

    hello sir apple pay button is not showing ,i have taken all steps ….using same stripe gateway…credit and debit card works fine…but the issue is only that apple pay not showing on anywhere on site!
    kindly guide me about this…i have followed your documentation completely

    • Simon Gondeck September 17, 2020 | 1:30 pm

      I cannot try to help if you do not provide a link to your site. Overall, if Apple Pay is not showing up on your Cart or Checkout page, make sure you are using an Apple product (i.e. iPhone, iPad, MacBook, etc.) and Safari browser. If you are still having issues clear your cache and try on both your 🖥 desktop and 📱mobile phone. Also make sure you have a SSL certificate on your site and HTTPS is used instead of HTTP. Another issue I see is that users do not have Apple Pay setup on their phone. Double check this by enabling “Allow payments on Mac” in your iPhone settings. On your iPhone > go to Settings > click Wallet > scroll down to bottom to enable.

      • umer shahzad September 17, 2020 | 11:50 pm

        oh! thank you for your guiding…i have applied all methods but issuue has remain…here is my website url : https://kasabeeston.com/ …one thing is that i am not using live stripe api client secret and client id…i have generated test api on stripe account to check…stripe credit/debit card payment methods works fine …but the only issue is that not showing apple pay button .

        • Simon Gondeck September 17, 2020 | 11:58 pm

          Hey Umer, it looks like you do not have Apple Pay enabled in Safari if using desktop or your iPhone if using mobile. Are you using an Apple product? Are you also using the Safari browser? When I go to your site the Apple Pay button shows up for me. For reference, see the screenshot below:

          Apple Pay on Safari browser

          • umer shahzad September 18, 2020 | 12:51 am

            oh thank you very much dear ! actually i am using apple pay payment method for first time…so i have some questions…is it only show on iphone devices like mac or phone or it can show on any device and anybrowser ? second thing is ince we need to enablle apple pay on safari manually by customer then it will display?

          • Simon Gondeck September 21, 2020 | 2:04 pm

            Apple Pay can only show if using a Apple device and also using the Safari browser. The user also needs to enable Apple Pay on their iPhone or their MacBook as well.

  5. Dergido Alen September 29, 2020 | 11:37 am

    Hi Simon,

    Although I tried everything, I could not. Your help will be very valuable to me. Do you have any different suggestions? site address: melissalinen.com

    • Simon Gondeck September 29, 2020 | 7:04 pm

      Hey Dergido, can you confirm that you have Apple Pay setup on your Mac or iPhone? Are you also using the Safari browser? I would test this on your phone that Apple Pay is setup. Double check this by enabling “Allow payments on Mac” in your iPhone settings. On your iPhone > go to Settings > click Wallet > scroll down to bottom to enable. Then visit your site’s url in the Safari browser on your phone. I was able to see Apple Pay show up (see screenshot below):

      Apple Pay iPhone - Safari browser

      • Dergido Alen October 4, 2020 | 8:41 am

        Hi Simon,

        After I wrote to you, I deleted and reinstalled my woocommerce theme. However, after doing that, Apple Pay was visible. Thanks for your help.

  6. Dergido Alen October 4, 2020 | 1:44 pm

    Hi Simon,
    How can i move Apple Pay button to after the customer details in checkout page? or below other payment methods?

  7. Mike November 13, 2020 | 1:56 pm

    Hello, Simon

    Do I need to register my domain with a stripe and put the apple verification file on the server?
    Customers can’t see the Apple Pay button if the hosting service doesn’t register their domain with Apple?

    • Simon Gondeck November 13, 2020 | 9:04 pm

      That is what I would recommend. What is your product page url? Do you have Apple Pay enabled on your mobile phone? Are you using the Safari browser?

Leave a reply for Simon Gondeck

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted. Your email address will not be published. Required fields are marked*

FAQ

Why is WooCommerce Apple Pay not showing up?

If Apple Pay is not showing up on your Cart or Checkout page, make sure you are using an Apple product (i.e. iPhone, iPad, MacBook, etc.) and Safari browser. If you are still having issues clear your cache and try on both your 🖥 desktop and 📱mobile phone.

Also make sure you have SSL certificate on your site and HTTPS is used instead of HTTP.

Another issue I see is that users do not have Apple Pay setup on their phone. Double check this by enabling “Allow payments on Mac” in your iPhone settings. On your iPhone > go to Settings > click Wallet > scroll down to bottom to enable.

How to hide Apple Pay on your WooCommerce product page?
// Hide Apple Pay on Product page
add_filter('wc_stripe_hide_payment_request_on_product_page', '__return_true');
How to add Apple Pay on WooCommerce checkout page?
// Adds Payment Request button (Apple Pay) on the Checkout page
add_filter('wc_stripe_show_payment_request_on_checkout', '__return_true');