قالب وردپرس درنا توس
Home / Tips and Tricks / How to accept Apple Pay on your website – CloudSavvy IT

How to accept Apple Pay on your website – CloudSavvy IT



Apple pay on iPhone
Shutterstock/LightField Studios

Apple Pay is an expedited checkout option that makes it very easy to purchase products both in person and on the web. It integrates easily on most ecommerce platforms and improves the customer experience in your online store.

How does Apple Pay work?

Apple Pay allows customers to pay using a pre-stored credit or debit card with Touch ID or Face ID. The process is fairly seamless; personally you should wave your phone or watch over the terminal, but online just click the buy button, authenticate with your face and you̵

7;re done.

Apple Pay can be used on any device with Touch ID or Face ID, although it only works in Safari, meaning users of other browsers like Chrome will likely choose a different option when checking out. Since it’s exclusive to Apple devices, you’ll naturally want to offer other options like Google Pay, PayPal, or regular debit cards.

The process of adding Apple Pay to your store depends on the payment provider you already use. In any case, Apple Pay has a few rules that you have to follow:

  • Your entire site must be served over HTTPS with a valid SSL certificate.
  • Your server must support TLS 1.2 or higher.
  • The domain must be verified with Apple using a file hosted on your site.

Really, you should follow the first two rules anyway. The latter can be handled automatically by some services, but if you’re doing things manually (like with the Stripe API), you may need to set this up yourself.

If you don’t want to use a third-party service, you can also set up Apple Pay manually using Apple’s JavaScript APIs. This is quite complicated and since you’ll probably need a third-party service to process credit cards anyway, we highly recommend using a service like Stripe.

Using Shopify

If you’re using Shopify, one of the largest ecommerce providers, setup is very easy and only takes a few buttons to click. In the Settings menu at the bottom left of the Admin console, click Payments:

Next, in the credit card section, click Manage, then enable Apple Pay under “Expedited”
To pay.” Your store should immediately display Apple Pay as an option on supported devices.

Shopify has many more advantages: you can of course use them to accept credit card payments on your website, but they also support payments with Bitcoin or other cryptocurrencies, as well as plenty of other options like ShopPay.

We highly recommend using Shopify if you’re going to be selling things online. Not only are they the biggest platform Amazon isn’t, but the user experience for your end user is better than almost anything else, especially when you combine this with the ease of use of Apple Pay.

Using WooCommerce

Another popular ecommerce solution is WooCommerce, which runs on WordPress. You can add Apple Pay support to it quite easily.

If you are using WooCommerce Payments, all you need to do is enable “Payment Request Buttons” under Payments > Settings. WooCommerce should automatically register your domain with Apple and do all the settings for it to work.

If it doesn’t show up, double check that your site is served over HTTPS and that you have a live WooCommerce Payments account, not one in developer mode.

If you’re using Stripe to checkout with WooCommerce, this should be enabled automatically, but you’ll need to make sure “Payment request buttons” is checked under WooCommerce > Settings > Payments > Stripe.

Set up cash registers with Stripe

Stripe is a payment processing service similar to PayPal, except it has excellent developer support and supports a wide range of payment methods, including Apple Pay.

If you’re using Stripe Checkout, a Stripe-hosted checkout page that handles payment processing automatically, you don’t need to do anything. Apple Pay is supported by default on any device that supports it and appears as the first option on the checkout page.

If you’re using the Stripe API on your own site, you’ll need to do some settings. First, you need to verify your domain with Apple. Download their domain association file and host it at the following location:

https://example.com/.well-known/apple-developer-merchantid-domain-association

Then you need to send a request to the Stripe API to verify. You will find the sk_live_ key on your Stripe dashboard.

curl https://api.stripe.com/v1/apple_pay/domains 
    -u "sk_live_••••••••••••••••••••••••": 
    -d domain_name="example.com"

After verification, you can use the Stripe SDK to create and send payments and payment buttons. This is highly dependent on your frontend setup, so you’ll want to refer to their docs on how to set up payment request buttons.


Source link