Apple Pay and Google Pay Integration for WordPress: 5 Simple Steps7 min read13/11/2019
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.
- 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.
- To create an account, go to stripe.com and click on the Start Now button.
- Enter your full name, email, and password.
- Then click on Create your Stripe account.
- Once created, your account still needs activating. So sign in to it and go to the dashboard.
- Click on Activate your account on the left side menu.
- Select your country, describe your business, and enter your website URL.
- 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)
- Verify your identity by connecting to your social network profiles as well as entering your legal name, date of birth, and social security number.
- Enter your credit card statements details and bank information
- 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
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.
- Click Add New.
- Enter “WooCommerce Stripe Payment Gateway” and press Enter.
- Install this plugin branded with a purple logo by clicking on the Install Now button.
- 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
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.
- Go to Woocommerce – Settings on the WordPress admin page.
- Click on Payments.
- Toggle on the Stripe payment method shown as “Stripe – Credit Card (Stripe)”
- Enter your live Secret and Publishable Key that can be found in the API section of the left side menu in your Stripe Account.
- Select the following checkboxes: Capture charge immediately, Enable Stripe Checkout, and Enable Appe Pay.
- Click on the Manage button to the right of the Stripe payment method
- Enable Google Pay for WordPress by selecting the checkbox called Payment Request Buttons.
- 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.
- Go to your Stripe account dashboard
- Click on Settings on the left side menu
- 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.
- Click on Add new domain.
- In the popup form, enter your WordPress website domain
- 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.
- 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.
- Create a folder in your website root folder and name the new folder “.well-known” with a period and without quotes.
- 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.
- 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
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.