Apple Pay and Google Pay Integration for WordPress: 5 Simple Steps6 min read

Apple Pay and Google Pay Integration for WordPress: 5 Simple Steps6 min read

13/11/2019 0 By Vasyl Tsyktor

Google Pay and Apple Pay along with other online payment systems like Samsung Pay become even more popular than bank mobile and merchant’s wallets. According to Accenture, digital wallet platforms have penetration at the level of 49% compared to only 28% for mobile banking apps and 39% for merchant’s wallets. This stats shows that using a simplified checkout on your WordPress website may be a suitable method of making purchases for your customers. 

In addition, Google Pay and Apple Pay are secure enough to protect user payment data. Unlike a typical checkout process requiring customers to enter their credit card details, these online payment systems store all payment data on the user smartphone. Those visitors aware of basic cybersecurity measures and numerous attacks on websites based on the WordPress content management systems may prefer online stores that allow them to pay with their digital wallets. How to add a Google Pay button in a Woocommerce mini cart?

Step #1: Create a Stripe account

Since G-Pay and Apple Pay are a way of the payment data interchange, you need a payment gateway that would process a transaction by charging a customer and sending funds to your account. As of now, the only widely available payment gateway, which can make Apple Pay and Google Pay integration with WordPress possible is Stripe. That’s why you have to create a Stripe account first.

Stripe pricing:

  • Local payments – 2.9%+$0.30 per transaction
  • International payments – 3.9%+$0.30
  • Chargeback protection – 0.4% per transaction

You will receive a payment on your Stripe account balance each time a customer makes a purchase on your site using Google Pay or Apple Pay.

  1. To create an account, go to stripe.com and click on the Start Now button. 
  2. Enter your full name, email, and password. 
  3. Then click on Create your Stripe account. 
  4. Once created, your account still needs activating. So sign in to it and go to the dashboard.
  5. Click on Activate your account on the left side menu.
  6. Select your country, describe your business, and enter your website URL.
  7. Select your account type, enter your Tax ID, and type in your business address (just copy your home address of you don’t have one)
  8. Verify your identity by connecting to your social network profiles as well as entering your legal name, date of birth, and social security number.
  9. Enter your credit card statements details and bank information
  10. Click on Activate your account.

When you click on that button, your account will be instantly activated. Despite the account activation page requires entering many details, the procedure is much easier than it seems. It hardly differs from any other registration process.

Step #2: Install the Stripe plugin

Google Pay WordPress plugin

Now you need to install the specific Apple Pay and Google Pay WordPress plugin to connect your Stripe account with your website. To do it, go to the Plugins menu option on your WordPress admin page.

  1. Click Add New.
  2. Enter “WooCommerce Stripe Payment Gateway” and press Enter.
  3. Install this plugin branded with a purple logo by clicking on the Install Now button.
  4. Activate the plugin by clicking on Activate.

It’s an official free Google Pay and Apple Pay WordPress plugin created by Automattic, the main WordPress contributor team, and a group of other developers. That’s why you can be sure it’s compatible with Woocommerce.

Step #3: Enable the Stripe payment method

Stripe Apple Pay WordPress

In fact, WooCommerce Stripe Payment Gateway simply enhances the Woocommerce plugin often used for online stores based on WordPress. The add-on creates an additional payment method for Woocommerce. So you need to activate it in the settings section of the Woocommerce plugin.

How to setup Stripe for WordPress
  1. Go to Woocommerce – Settings on the WordPress admin page.
  2. Click on Payments.
  3. Toggle on the Stripe payment method shown as “Stripe – Credit Card (Stripe)”
  4. Enter your live Secret and Publishable Key that can be found in the API section of the left side menu in your Stripe Account.
  5. Select the following checkboxes: Capture charge immediately, Enable Stripe Checkout, and Enable Appe Pay.
  6. Click on the Manage button to the right of the Stripe payment method
  7. Enable Google Pay for WordPress by selecting the checkbox called Payment Request Buttons.
  8. Save your changes.

Now your customers can make purchases in your WordPress online store with Google Pay by clicking on the Buy button. It’s worth noting that the Payment Request Buttons.checkbox may have been selected by default. In this case, you can skip the last three steps in this ordered list. 

Step #4: Verify your domain

Despite the Payment Request Buttons checkbox has a description that contains Apple Pay consent warning, you still need to activate this feature.

Apple Pay WordPress integration
  1. Go to your Stripe account dashboard
  2. Click on Settings on the left side menu
  3. Select Apple Pay in the Payments and Payouts column on the Business Settings page. You also can find this menu option using the search. Enter “Apple Pay” in the search line of your Stripe account. As soon as you see a suggested search result “Settings > Apple Pay”, click on it.
  4. Click on Add new domain.
  5. In the popup form, enter your WordPress website domain
  6. Make sure you have the .well-known folder in your website root folder (typically public_html) with the apple-developer-merchantid-domain-association file in it and proceed to the step 10 in this list. The WooCommerce Stripe Payment Gateway plugin is supposed to automatically add this file according to the reply by the plugin’s customer support. Otherwise, download the verification file by clicking on the corresponding button and go to the next step.
  7. Without closing the popup page, go to your website file system using your hosting provider account or file transfer protocol (FTP) software, for example, Filezilla.
  8. Create a folder in your website root folder and name the new folder “.well-known” with a period and without quotes.
  9. Upload the verification file to the new folder. Therefore, the full route to the file should look like this: https://yoursite.com/.well-known/apple-developer-merchantid-domain-association where yoursite.com is your website domain.
  10. Go back to your Stripe account and click on the Add button in the popup form.

Now you know how to enable Apple Pay for WordPress with the Woocommerce plugin.

Step #5: Test your new button

Woocommerce Apple pay button
This how the Apple Pay button will look like on your WordPress website

You can make sure that you have activated both Apple Pay and Google Pay purple buttons on your WordPress website. Each of them will be displayed as a Stripe branded Buy button. Keep in mind that these payment options will become available for those customers who visit your site using their mobile devices with their payment card added to the corresponding mobile app.