WooCommerce users recently got some long-awaited news: WooCommerce now supports Apple Pay through the free Stripe payment gateway, and they’re planning on adding Apple Pay support to other gateways soon. Why is this a big deal? According to Stripe themselves customers check out 58% faster than with other payment methods, and apps using Apple Pay have seen conversion rates increase by as much as 250%. WooCommerce and Stripe have made enabling Apple Pay as easy as possible, but given the huge variety of WordPress and WooCommerce installations out there you might run into some hiccups. Here’s how to troubleshoot Apple Pay for WooCommerce and get it working on your store.
In theory, all you have to do is:
- Sign up for Stripe if you haven’t already
- Update or Install the Stripe Payment Gateway to version 3.1.4 or higher
- Go to the Stripe section under WooCommerce’s Checkout Settings Tab, and click “Enable Apple Pay:”
You can choose either a black or white Apple Pay button and change the default language to something other than English, but even with those it’s a maximum of 4 clicks, counting the click on “Save Changes”.
Sometimes though you’ll get an error bar at the top of your admin screen saying that something went wrong with the Apple Pay for WooCommerce. Three of the most common errors are:
- “Error: Unable to verify domain – Bad Request”
- “Apple Pay domain verification failed. Please check the log to see the issue.”
- “Error: Unable to copy domain association file to domain root”
If you’re seeing any of those errors, read on to find out how to get Apple Pay for WooCommerce working.
How to Fix Authentication Problems with Apple Pay for WooCommerce
First, log in to your Stripe account and go to the Apple Pay section of your dashboard.
If you don’t see your website URL in the “On the Web Domains” box, you’ll need to click the “View Apple’s Terms of Service” button first and accept the Terms of Service first. Next, click the “Add New Domain” button and this form will pop up:
Type in your domain (leave out the “http://www.” part), click “Download verification file…”, and then click “Add”. Now go back to your WooCommerce settings and try to enable Apple Pay for WooCommerce again.
If it works and you don’t see any errors, you’re done! But if you’re still getting an error, you need to do one more thing.
Remember that Verification File we just downloaded? It’s named “apple-developer-merchantid-domain-association” and will be in your Downloads folder unless you saved it somewhere else on purpose. Well, it needs to get put on your site’s web server in a specific place. You’ll need to use an FTP client, or log in to your hosting company’s CPanel and use the File Manager.
Once you’re connected go to your website root directory (usually called public_html, www-root, www, or something similar). There should be a folder called “.well-known” in there. If you don’t see one, create it—and don’t forget the period at the beginning. Then upload the Verification File into that folder.
Now you should be able to turn on Apple Pay for WooCommerce!
Customizing Apple Pay for WooCommerce on Your Site
At this point you might want to customize the look of the Apple Pay button, or only show it on certain pages. When it comes to customizing the button Apple has some pretty strict guidelines, since they want to make sure that customers always recognize and trust the button.
WooCommerce also recommends that you not use CSS to hide or show the button since it can cause trouble with the code used to detect whether the customer’s web browser supports Apple Pay. Instead, you should add a filter in your functions.php file, as described here.
It’s pretty simple, all-in-all, and once you have things set up the only difference you should notice is higher conversion rates. My recommendation for WooCommerce users is that if you are using another payment gateway and have no plans to switch, sit tight—WooCommerce will be adding Apple Pay support to more payment gateways soon. But if you are already using Stripe or were planning to start, go ahead and enable Apple Pay. There’s nothing but upside.
Links to woocommerce.com are affiliate links.