Blog / Tech / ios app development

How to Integrate Apple Pay into Your App and Website

  • Rating — 4.8 (73 votes)
  • by Ivanna Denys
  • Updated on June 26, 2020
  • Read —
    8-9 minutes
apple pay logo

In today’s fast-paced world, people want to reduce time spent on routine tasks as much as possible. We all expect online purchases to be easy and convenient. And this, basically, means that we want to buy things with just one click without wasting our precious minutes on entering billing, shipping and contact information each time at the checkout.

Apple Pay service was introduced in 2014 and it has more than 441 million users worldwide today. Why did it become so popular in such a short time-span? The main reason is that Apple Pay allowed iPhone, Apple Watch, iPad and Mac owners to get rid of their physical wallets and make secure payments in stores, in iOS apps and on the web with the help of their Apple devices.

According to statistics, 35 percent of online merchants globally accepted Apple Pay.  Want to join them? In this article, we’ll try to explain how to add Apple Pay to your website or app.

  1. Is Apple Pay a good fit for your business?
  2. Preparation stage
  3. Implementation stage

Is Apple Pay a good fit for your business?

iPhone, IPad, MacBook with Apple Pay

We already mentioned that users just love Apple Pay because it’s an easy and convenient way to make purchases. So the advantages for buyers are pretty much obvious. But what about the selling side? Let’s look into this.

Apple Pay covers a wide range of transactions and allows online merchants to sell almost anything:

  • physical goods (for example, clothes, groceries, books etc.)
  • services (for example, club membership)
  • bookings (for example, hotel reservations)
  • tickets

However, some reasonable exceptions still exist. For example, it’s not allowed to use Apple Pay for selling such goods as cigarettes, tobacco products, weapons, pornography etc. You may find the full list of prohibited uses here.

If your business activity doesn’t fall within the above exceptions, there should be no doubts:  integration of Apple Pay into your website or app is the right decision.

Note: Apple Pay does not replace In-App Purchase. You still need the later to sell virtual goods, for example, premium content and subscriptions within your iOS application.

Have an app but still haven't integrated Apple Pay option?

Preparation stage

This stage does not require any coding, you just need to create the environment for Apple Pay integration.

First of all, you need to find a payment provider that supports Apple Pay in your region. To do this, see this list on the Apple Pay page. This is the optional but highly recommended step because if you don’t have the established system in place, handling card payments can be quite challenging.

Also, make sure that Apple Pay is available in your country (see the full list of countries and regions here).

For Apple Pay on the web, web pages that incorporate Apple Pay must be served over HTTPS and support TLS 1.2 protocol.

Now, you have to set up Apple Pay Requirements.

1. Create a Merchant ID

Merchant ID is needed to identify your business as a merchant that can accept Apple Pay payments on your website or mobile app. That’s easy. Just log in to your developer account here and go to Certificates, Identifiers & Profiles.

Apple Pay integration screenshot

 

After that, choose iOS, tvOS, watchOS (from the pop-up menu).

Then, choose App ID in the Identifiers section.

Apple Pay integration screenshot

Click add button “+

Apple Pay integration screenshot

Enter your name in the Name field.

Apple Pay integration screenshot

After that, enter Bundle ID as instructed.

Apple Pay integration screenshot

Check Apple Pay Payment Processing box in the Apple Services section and click Continue -> Submit.

Feel that this procedure is too complicated for you and already want to delegate it to a professional?

Apple Pay integration screenshot

Then, find Merchant ID in the left column.

Apple Pay integration screenshot

Click add button “+” in the upper right corner.

Apple Pay integration screenshot

You’ll see this page:

Apple Pay integration screenshot

Add a description (it can be just the name of your app or website) and identifier name in the following format: merchant.com.YourAppName. After that, click Continue.

Review the Settings and click Register -> Done.

Now, navigate to App ID (which we’ve just created). Check Apple Pay Payment Processing box and click Edit.

Apple Pay integration screenshot

After that, select your merchant ID and check the box.

Apple Pay integration screenshot

Now, your App ID should look like this:

Apple Pay integration screenshot

2. Create Payment Processing Certificate

Payment Processing Certificate is needed to encrypt and secure outgoing payment data. How to set up it? Follow the steps below.

Navigate to Certificates, Identifiers & Profiles -> Identifiers -> Merchant IDs.

After that, select your merchant ID on the right and click Edit.

You’ll see Payment Processing Certificate section. Click Create Certificate.

Apple Pay integration screenshot

Apple Pay integration can be performed in no time if you hire professional developers. Still looking for a reliable team?

Certificate signing request

 

If you don’t have a certificate signing request (CSR), you need to create it to create. To do this, launch Keychain Access that is Mac OS system utility. It’s located in /Applications/Utilities on your Mac.

 

Then, choose Certificate Assistant -> Request a Certificate from a Certificate Authority.

 

Enter necessary information: your email address in the User Email Address field and a name for the key in the Common Name field. The third field, CA Email Address, should be left empty.

 

Click Save to disk -> Continue.

 

Check out this Apple help page to make sure that you didn’t miss anything.

 

To proceed with Payment Processing Certificate creation, click Choose file. Then select CSR file (it has .certSigningRequest extension) and click Choose – > Continue -> Download.

The downloaded certificate file will have .cer extension. Click Done.

Note: you need to recreate your Payment Processing Certificate every 25 months.

3. Create Merchant Identity Certificate (for websites only)

This certificate is needed to authenticate communication with the Apple Pay servers. To create it, follow the steps below.

Navigate to Certificates, Identifiers & Profiles -> Identifiers -> Merchant IDs. Select your merchant ID on the right and click Edit.

Under Merchant Identity Certificate Section, click Create Certificate.

Apple Pay integration screenshot

After that, click Choose file and choose your CSR to upload.

Click Choose – > Continue -> Download.

Apple Pay integration screenshot

The downloaded certificate file will have .cer extension. Click Done.

Note: you need to recreate your Merchant Identity Certificate every 25 months.

4. Register and verify your domain (for websites only)

To register a domain, navigate to Certificates, Identifiers & Profiles -> Identifiers -> Merchant IDs. Select your merchant ID on the right and click Edit.

Under Merchant Domains Section, click Add domain.

Apple Pay integration screenshot

After that, enter your domain name and click Continue -> Download.

Place the file in the specified location and click Verify. After the verification is completed, click Done.

Note: you’ll need to verify a domain every time its SSL certificate expires.

Watch this video to make sure that you didn’t miss anything.

5. Enable Apple Pay in Xcode (for apps only)

Go to XCode and click the file icon in the upper left corner.

Select the target project and you’ll see the project editor on the right. Choose Capabilities.

You’ll see Apple Pay section. Turn it ON.

Apple Pay integration screenshot

Refresh the page — you’ll see your Merchant ID in the Merchant IDs field.

Finally, make sure that all Steps are checked.

Implementation stage

This is the part where coding starts. If you have some basic programming knowledge, you can do it yourself.  Alternatively, if you don’t feel confident about writing a code and want to do things right, reach out to your developer or contact us. We are ready to help!

1. Support Apple Pay on your app or website

First of all, you need APIs that will allow you to determine if a user has the Apple Pay capable device and if Apple Pay is set up on it. To check Apple Pay availability:

  • for app, use PassKit framework. You can find detailed instructions on how to do this here.
  • for website (on Safari only), use JavaScript-based APIs. You can find detailed instructions on how to do this here.

2. Create an Apple Pay button and mark

ApplePay payment sheet

All websites and apps that accept Apple Pay must display Apple Pay mark and Apple Pay button whenever payment options are shown.

  • download Apple Pay mark and see its usage guidelines here.
  • choose your button style here.
  • refer to Apple Pay on Web pages for detailed programming guidelines.

3. Customize a payment sheet

Tapping the Apple Pay button should lead to a payment sheet (see on the right). Such payment sheet must contain information that is required to complete the purchase, for example, payment card details, shipping options, contact information etc. It’s up to you to decide what information to present on a payment sheet, but you cannot request data that is not related to the transaction.

For detailed instruction on customizing Apple Pay payment sheet, see Human Interface Guidelines.

Congratulations! You’ve just implemented Apple Pay in your app/website!

Apple Pay provides simpler payment envronment for your clients. Moreover Apple Pay is much safer than usual payment gateways like PayPal because it does not store personal information like billing address or credit card number. Clients are more likely to buy something if they can do it in a simple and safer way. So with Apple Pay you can increase your customer loyalty and business revenue.
Yes, Apple does not charge any fees if you use Apple Pay in your store or restaurant. All transactions no matter credit or debit ones, will be handled and processes by your payment networks.

Final thoughts

Integration of Apple Pay into the app or website is one of the easiest and cheapest ways for merchants to improve customer experience. We all want to be cared for and we really appreciate if a company not just tries to sell us stuff, but also makes our life easier. Follow the steps in this article to implement Apple Pay yourself.

If you need any assistance, our iOS developers are ready to help.

Ivanna Denys Ivanna is a Content Marketing Manager of GBKSOFT passionate about tech advancements, marketing, and startups. Her dream is to make the virtual world a better place with the help of a written word.

Leave a comment
Close

Leave a Reply

Related services

Categories

All articles Business Company News Marketing Tips StartUp App Ideas Tech UI and Design

People are talking about

You've got
a project in mind

What's next?

Send us a message with a brief description of your project.
Our expert team will review it and get back to you within one business day with free consultation and next steps.

Testimonials

Nothing can be better than getting a review from our happy clients
who recommend us and trust us their business.

Gireesh, USA
One word...EXCELLENT.
Very well thought out and articulate communication. Clear milestones, deadlines and fast work.Patience. Infinite patience. No shortcuts. Even if the client is being careless (me). The best part...always solving problems with great original ideas, especially with this strange project where we are making up new words every day!
Excellent
Jonathan
More good work from team GBKSOFT. All well executed. The support within GBKSOFT is excellent. Communication is good too, spoken English as well as written. Support
Aaron
I’ve been using GBK Soft for the past 3 years and they have been great. Communication is unparalleled to other app development companies. I’ve continued to return to them to improve my iOS app countless times and I will continue to do so in the future. I highly recommend this company! Improve
Tao
GBKSOFT did a good job to manage the project. They put in a good effort to communicate with us and make it easier for us to communicate with developers. Good Job
Dave
GBKSOFT’s performance has been very strong. We've referred them twice, which says all anyone needs to know about them. A referral is the ultimate signal we can give that these guys are great. Strong
Devan
They write clean code, adhere to deadlines, and communicate extremely well. I strongly recommend anyone from the GBKSOFT agency and hope to work with them again myself. Clean Code
Raphael
My Project with GBKSOFT gave me the ability to develop my software while keeping a busy schedule. Ana, who was my project manager, was very professional and was always understanding of my vision and what I wanted. I would recommend GBKSOFT again to any other company or person who has a vision for their web application. Thank you GBKSOFT! Recommend
Garrett
They proved to be very good and they’re very reliable as well. They are quite conscientious. They will go the extra yard to make sure we're happy. Reliable
Andy
I think they do great work. I haven’t yet given them something that they were unable to do. Great
19
spinner