Apple Pay logo

Getting Started with Apple Pay

Overview

Apple Pay provides an easy and secure way for users to buy goods and services in your iOS app, watchOS app, or on your website. And now, qualified nonprofits can easily and securely receive donations within their apps and websites with Apple Pay.

Customers prefer using Apple Pay as they can make purchases without having to enter their billing, shipping, and contact details. And customers and developers like the peace of mind that comes with the increased security and privacy of Apple Pay. Apple does not store or share a customer’s actual credit and debit card numbers, reducing the risk for merchants and app developers to manage and secure actual credit and debit card numbers. Learn more about Apple Pay security and privacy.

Developers that have implemented Apple Pay best practices have doubled their checkout conversion rates, substantially reduced checkout time, increased customer loyalty, and increased purchase frequency.

Within your app or website, users can authorize payments using Touch ID or by double-clicking the side button of Apple Watch, releasing tokenized credit and debit card payment credentials that are securely stored on iPhone, iPad, Apple Watch or MacBook Pro with Touch ID. Additionally, users can store their billing, shipping and contact information within Wallet, which can be provided along with payment credentials when the user authorizes the purchase within your app or website.

Apple Pay is currently available in the following countries and regions.

Apple Pay or In-App Purchase

For app developers interested in Apple Pay, it is important to understand the difference between Apple Pay and in-app purchase. Use Apple Pay within apps to sell physical goods such as groceries, clothing, and appliances. Use Apple Pay for services such as club memberships, hotel reservations, and tickets for events. Also approved nonprofits can use Apple Pay within an app or website to collect donations. On the other hand, use in-app purchase in apps to sell virtual goods such as premium content for your app and subscriptions for digital content.

The Apple Pay Programming Guide provides details on how to use the PassKit framework to integrate Apple Pay. The In-App Purchase Programming Guide provides details on how to use the StoreKit framework to integrate in-app purchases.

Supported Transaction Types and business models

Apple Pay supports most eCommerce transaction types and offers the flexibility to accommodate simple to complex business models. Your payment service provider can help you define the best Apple Pay implementation to support your business model. The type of transaction flow you implement will impact your customer experience and key business metrics such as conversion rate and risk exposure.

Here are some example of transaction types supported by Apple Pay:

Transaction type

Description

Example

Authorization & capture

Reserve funds on a customer’s account and transfer money to your bank account

Online shopping where merchandise is readily available for shipping

Authorization & delayed capture

Reserve funds on a customer’s account and transfer money to your bank later

Pre-order, delivery service with tip, order online pick up in store

Authorization & capture with different amount

Reserve funds on a customer’s account and transfer money to your bank account once an order is successfully completed for an amount higher or lower than authorized

Groceries delivery service where some items are priced by actual weight

Authorization unknown amount & capture

Authorize a transaction with unknown amount, and charge the amount for the service later

Taxi ride

Partial shipment

Divide a purchase into multiple payments for goods that are not shipped together (Not available in China)

Multi item purchase, with more than one deliveries

Fixed Subscription

Handle repeating payments at a regular frequency and with a fixed amount (not available in China)

Gym monthly membership

Flexible Frequency Subscription

Handle payments for services where frequency is inconsistent or user has choice to reduce frequency (not available in China)

Meal subscriptions, where user can skip deliveries, reschedule delivery dates, change frequency of deliveries

Flexible Amount Subscription

Handle payments for services where amount varies base on your consumption (not available in China)

Utility bill, subscription with a promotion on the first month

Managed Subscription

Handle payments for services where user can vary frequency and amount of services received (not available in China).

Meal delivery service with high flexibility

Canceled transactions

Reverse money for canceled, reimbursed or disputed transactions

Chargeback, voided transaction, refund

Setup

  • Comply with the requirements specified in Section 29 of the App Review Guidelines or Apple Pay Acceptable Use Guidelines for websites
  • Set up an account with a payment processor or gateway, if you don’t already have one. You can find a list on the Apple Developer website
  • Register a Merchant ID
  • Generate a Payment Processing Certificate used to encrypt and decrypt payment tokens.
  • Register and validate your website domain (if supporting Apple Pay on your website)
  • Generate a Merchant Identity Certificate used to start an Apple Pay session and connect with Apple servers (if supporting Apple Pay on your website)

Note: Nonprofit organizations that would like to accept donations in their app or website must be approved. Learn how to get started.

Payment Providers

You can find a list of platform or payment providers who support Apple Pay with their SDKs on the Apple Developer website. Using one of these SDKs or hosted solutions is highly recommended. Contact your platform or payment provider for more information.

The alternative is to provide your own server-side solution to receive payments from your app or website, decrypt payment tokens and interface with the payment provider to process the authorization. Handling credit and debit card payments can be complicated and unless you already have the expertise and systems in place, an Apple Pay SDK or JS API from a payment provider is the quickest and most reliable way to support Apple Pay in your app or website. 

Presenting the Apple Pay button

Within apps, PassKit provides the APIs that your app will use to determine if it is running on a device with a Secure Element and if the device has been provisioned with payment cards that you support. For the web, Safari provides APIs that allow your website to check if the user has an Apple Pay capable device and if Apple Pay is set up.

If the device is Apple Pay capable, you should present the Buy with Apple Pay button using the APIs supplied within PassKit (for apps) and Safari (for websites) In addition, if the device is Apple Pay capable, but Apple Pay isn’t set up, present the Set up Apple Pay button in place of the Buy with Apple Pay button, which allows the user to easily set up Apple Pay.

Placing the Apple Pay button in your app or website must be done in accordance with the Apple Pay Identity Guidelines.

Presenting the Payment Sheet

When your user selects goods or services to buy or amount to donate, and selects Apple Pay as the payment method, you create a payment request and ask PassKit in apps or Safari on your website to present the payment sheet to the user. See Figure 1. The payment sheet must immediately follow the user tapping the Apple Pay button, without any interim screens or pop-ups except to prompt for necessary product details, such as size or quantity.

Your app specifies the contents of the payment sheet but it does not control the user’s interaction with the sheet. You must decide if it makes sense to present shipping and billing information, shipping method, and other line items to the user. You should only request the information necessary to process the transaction.

For details on integrating the Apple Pay button and customizing the Apple Pay payment sheet for your app, refer to the iOS Human Interface Guidelines.

Payment Sheet
Figure 1: Payment Sheet

The Payment Token

Once authorized by the user, your app or website receives a payment object, which contains an encrypted payment token from PassKit. The payment token encapsulates the information needed to complete a payment transaction, including the device-specific account number, the amount, and a unique, one-time-use cryptogram. The encrypted payment token can be decrypted by the merchant with the certificate private key or by the payment processor on behalf of the merchant.

In some cases, a developer may not be set up as the merchant of record; in this case, the developer can decrypt the payment token and pass the decrypted token downstream to the appropriate merchant for processing with its respective processor. The app or website must make it clear that they are an intermediary party. For more details, refer to the iOS Human Interface Guidelines.

Figure 2 illustrates a typical payment flow for an app. First the app checks that it can offer Apple Pay as a payment method. In this example, the app needs the postal code from the selected shipping address to calculate shipping cost and update the total amount due. When the user authorizes payment, the app receives a payment token from the Secure Element, via PassKit.

Finally the app calls appropriate APIs in the payment processor SDK to pass the payment information to the payment processor for processing.

Payment Flow
Figure 2: Payment Flow

Best Practices

Review and follow guidance from the iOS Human Interface Guidelines, Web Human Interface Guidelines and the WWDC session video Apple Pay Within Apps.

Do not require registration before the purchase.
Apple Pay provides an excellent opportunity to offer Guest Checkout to your users. Customers are less likely to abandon the purchase experience when there is as little friction as possible. After completing the purchase, you can make it easy for the customer to create an account by pre-populating a registration form with the information you received from the payment.

Add the Apple Pay button to your product detail page and cart checkout.
In addition to your ‘Add to Cart’ button, place an Apple Pay button on your product detail pages so your customers can find what they want to buy and check out immediately. Make sure to also add Apple Pay as a payment option with your cart checkout.

Display the Apple Pay button prominently or set the default payment method to Apple Pay.
For customers that already have Apple Pay set up on their iOS device, provide Apple Pay as the primary payment option.

Do not ask for additional information outside of the Apple Pay payment sheet.
The Apple Pay payment sheet provides shipping address, billing address, phone number, email, and name. The customer can also choose their shipping method from within the sheet. Requesting additional fields outside of the sheet adds friction that may cause purchase abandonment.

Offer the user to Set Up Apple Pay if on a compatible device.
If you determine that the user is on an Apple Pay capable device, but has not yet set up Apple Pay, replace your Buy with Apple Pay button with a Set Up Apple Pay button. Apple Pay is easier to set up than adding payment and shipping information on your website, and you and your customers will experience the security and privacy benefits of Apple Pay as well.

Common Questions and Answers

Which Payment Providers and eCommerce platforms support this service?
For a list of payment providers and eCommerce platforms, see the Apple Pay for Developers page.

Which countries and payment networks are supported?
View current supported counties and banks.

Are there additional fees to accept Apple Pay?
Apple does not charge users, merchants or developers to use Apple Pay for payments.

Can I integrate Apple Pay into my app that has a web checkout experience?
Apple Pay works with both native and hybrid apps. For those merchants leveraging a web- based checkout experience inside their apps, follow these steps.

Can my nonprofit accept donations with Apple Pay?
Yes, if your nonprofit is U.S.-based and approved by Apple, they can accept donations using Apple Pay in their iOS apps and websites on Safari. Learn how to get started.

What happens if my iOS app displays third-party web content that has integrated Apple Pay?
If your app uses Safari View Controller to display third-party web content that has already integrated Apple Pay, the end user will have an opportunity to use Apple Pay, just as if the same content was viewed with the Safari browser.

Can I make an Apple Pay purchase without knowing the final amount?
For customers with iOS 9 and later you can set the amount to “Pending”. For iOS versions prior to 9, you should charge a base amount and note within the PAY line of the Apple Pay payment sheet that the final amount is pending.

Please contact your PSP to confirm any additional transaction requirements applicable to your region.

If I've implemented Apple Pay within my app, can I reuse the same Merchant ID and certificate for my website?
Yes. Apple recommends that the same Merchant ID and certificate be used to support Apple Pay on your app and website.

Please contact your PSP to confirm any additional transaction requirements applicable to your region.

Where do I go if I have additional questions?
Contact Apple support if you have additional questions.