Apple Pay

Apple Pay provides an easy and secure way to make payments for users with supported iOS and macOS devices. Customers no longer need to spend time searching for their wallet to find the right card. Within apps or websites your customers can check out with a single touch.

By using Face ID, Touch ID, or double-clicking Apple Watch, users can quickly and securely provide their payment, shipping, and contact information to check out. Apple Pay is also designed to protect your personal information. Apple doesn’t store or have access to the original credit, debit, or prepaid card numbers that you use with Apple Pay.

Source for Apple Pay-specific content on this page is from https://www.apple.com/apple-pay/

Apple Pay Branding

Apps that accept Apple Pay display an Apple Pay mark wherever available payment options are shown and an Apple Pay button that customers tap to bring up a payment sheet.

Websites that accept Apple Pay incorporate it into the purchasing flow. An Apple Pay mark should be shown wherever available payment options are shown and an Apple Pay button can be clicked to bring up a payment sheet. All websites that offer Apple Pay must include a privacy statement and adhere to Apple Pay’s Web Acceptable Use Guidelines. For a hands-on demo of Apple Pay on the web, see Apple Pay on the Web Demo

Compatibility

Card Types: Currently, Visa, MasterCard, Discover, and American Express are accepted, in addition to several international brands.

*For processing Account Funding Transfers (pull) and Original Credit Transfers (push), only Visa, MasterCard, and Discover are accepted

*For processing Account Funding Transfers (pull) and Original Credit Transfers (push) with TabaPay, countries must be set to the US. TabaPay supports USD txns in the US.

Transaction Flow

631631
  1. The merchant application communicates with the merchant backend(server) to create a transaction ID

  2. Application gets the encrypted transaction payload from Apple's Pass Kit Framework

  3. The merchant application decrypts the transaction payload and sends to TabaPay

  4. TabaPay receives the payload and processes the transaction

  5. TabaPay API responds back to the Merchant app with either an approval or decline

TabaPay Apple Pay – Integration

Our API allows your mobile app and online store to accept payments using Apple Watch, iPhone, iPad, or Safari.

TabaPay offers a Direct API Integration for Apple Pay providing merchants complete control over how they integrate Apple Pay into their website or app. Merchant is responsible for the interactions with the Apple Pay APIs. Once the merchant completes this stage, TabaPay consumes the payment data.

On-boarding

When setting up Apple Pay in an app or on the web, merchants must register a merchant identifier and set up cryptographic keys. Apple Pay uses encryption to ensure the secure and private transit of payment information. This payment information then needs to be decrypted before it can be processed. The Merchant manages this decryption and then passes the data to TabaPay.

For full details of how a merchant sets up Apple Pay please see here for app and here for web. You can also look at our guide to become an Apple Pay Merchant

Here are the steps:
1. Set up the Apple Merchant ID

Create an Apple Merchant ID through Apple’s developer portal.

2. Create an Apple Pay certificate for your app to encrypt payment data.

A certificate associated with your merchant ID, used to secure transaction data. Apple Pay servers use the certificate’s public key to encrypt payment data. You, or your payment service provider, use the private key to decrypt data to process payments. See Create a payment processing certificate for the setup steps

Alternatively, you can use Xcode to enable the Apple Pay capability and create a merchant identifier. Then you can create a payment processing certificate.

3. Enabling Apple Pay

iOS

Enable the Apple Pay in Xcode

Enable the Apple Pay capability in your Xcode project. See Enable Apple Pay for the setup steps

Web

Create Merchant Identity certificate

A Transport Layer Security (TLS) certificate associated with your merchant ID, used to authenticate your sessions with the Apple Pay servers. The merchant identity certificate is only required for Apple Pay on the web; it isn’t needed for apps. See Create a merchant identity certificate for the setup steps

Note: merchant ID never expires, the payment processing certificate, merchant identity certificate, and domain verification do expire. See Maintaining Your Environment for more information.

Register your domain with Apple

You must register and verify all top-level domains and subdomains where you will display the Apple Pay button. Domains are associated with your Apple Developer Team ID. To register and verify your domain, log in to your Apple Developer account as an Account Holder or Admin. See Register a merchant domain and Verify a merchant domain for the setup steps

4. Presenting the Apple Pay Button

Within apps, PassKit provides the APIs that an app will use to determine if it is running on

an Apple Pay capable device and if the device has been provisioned with payment cards

that are supported.

For the web, Apple Pay JS provides APIs that allow a website on Safari to check if the user has an Apple Pay capable device and if Apple Pay is set up.

5. Presenting the Payment Sheet

When a user selects goods or services to buy or an amount to donate, and selects Apple Pay as the payment method, a merchant creates a payment request and asks PassKit (for apps) or Safari (for websites) to present the payment sheet to the user.

For details on integrating the Apple Pay button and customizing the Apple Pay payment sheet for apps, see Apple Pay in the Human Interface Guidelines

6. Receive the Payment Token

Once authorized by the user, the app or website receives a payment object, which contains an encrypted payment token from PassKit or Apple Pay JS. The payment token encapsulates the information needed to complete a payment transaction, including the device-specific account number (DPAN), the amount, and a unique, one-time-use cryptogram. The encrypted payment token must be decrypted by the merchant with the certificate private key

632632

7. Processing the Payment

Pre-requisite: The Merchant must be registered with Tabapay and Apple Pay.

When you've generated a decrypted payload received from Apple, and have passed this to your server, extract the payload data received, and submit a CreateTransaction API request to TabaPay providing:

640640

Request

{ "referenceID": "1", "type": "push", "accounts": { "sourceAccount": { "card":MobilePay { "accountNumber": "9999999999999999", "expirationDate": "202012", "cryptogram": "", "transactionID": "32b...4f3", "ecilndicator": " ", "network": "Visa", "type": "debit", }, "owner": { "name": { "first": "John", "last": "Benson" }, "address": { "line1": "465 Fairchild Drive", "line2": "Suite #222", "city": "Mouontain View", "state": "CA", "zipcode": "94043" }, } }, "destinationAccountID": "Tabapay_AccountID_22-c" }, "amount": "0.10" }

Response

{ "SC": 200, "EC": "0", "transactionID": "TabaPay_TransactionID_", "network": "Visa", "networkRC": "00", "status": "COMPLETED", "approvalCode": "000000" }

Apple PayError Codes:

https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api/apple_pay_status_codes/

https://developer.apple.com/design/human-interface-guidelines/apple-pay/overview/handling-errors/

References:

Human interface Guidelines
https://developer.apple.com/design/human-interface-guidelines/apple-pay/overview/introduction/

Apple Pay Programming Guide
https://developer.apple.com/library/archive/ApplePay_Guide/index.html#//apple_ref/doc/uid/TP40014764-CH1-SW1

Apple Pay on Web
https://developer.apple.com/documentation/apple_pay_on_the_web/configuring_your_environment

iOS Apple Pay PassKit
https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay


What’s Next