Apple Pay Integration

Apple Pay simplifies the checkout experience by allowing users to make payments quickly and securely using their iPhone, iPad, or Mac. It eliminates the need to manually enter credit card details by leveraging device-based authentication and encrypted tokenization.

There are two integration scenarios with Payarc for Apple Pay. In both cases, Payarc handles the decryption of the Apple Pay encrypted payment data and processes the transaction securely. This benefits both customers and merchants: customers enjoy a faster and more secure checkout experience, while merchants can trust that Apple has authenticated the cardholder before payment is initiated.

  • Apple Pay Button Integration: The merchant hosts the Apple Pay button directly on their site or app and sends encrypted payment data to Payarc for processing.
  • Hosted Checkout: Payarc provides a hosted checkout page that supports Apple Pay, simplifying implementation for merchants.

Transaction Process Using Apple Pay’s Digital Wallet

For support related to Apple, please contact Apple Support. For questions related to Payarc, please reach out to Payarc Support.

Merchant is hosting Apple Pay button

In this scenario, you will host the Apple Pay button on your site, provided it aligns with your needs and complies with Apple’s guidelines. Please refer to the Apple Pay brand guidelines to ensure compliance.

Prerequisites

Before proceeding, please familiarize yourself with the Setting Up Apple Pay and review our Apple Pay API reference.


Integration Steps

  1. Integrate the Apple Pay Button Implement the Apple Pay button following Apple’s developer documentation. You must configure your site to support Apple Pay on the Web, including domain verification and JavaScript API integration.
  2. Capture Apple Pay Payment Token When the user confirms payment, Apple Pay will return a payment token containing encrypted card data.
  3. Send Encrypted Data to Payarc Use the Payarc tokenization endpoint to securely transmit the Apple Pay encrypted data for decryption and transaction processing.

Performing Transactions

To register a transaction with Payarc, follow these steps:

  1. Collect the Encrypted Payment Token - After the user authorizes the Apple Pay payment (via Face ID, Touch ID, or passcode), your frontend will receive an encrypted payment token from Apple Pay. You must capture this token and pass it to Payarc for decryption and processing.

  2. Send the Token to Payarc - Submit the encrypted token to Payarc using the following API request

    Example API Request:

    1. curl --request POST \
            --url https://testapi.payarc.net/v1/tokens/apple-pay \
            --header 'Accept: application/json' \
            --header 'Authorization: Bearer YourAPIBearerKey' \
            --header 'Content-Type: application/json' \
            --data '
       {
         "apple_encrypted_data": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9c...."
       }
       '

    🔐 The apple_encrypted_data field must include the full encrypted payment token you received from Apple Pay.

  3. Process the TransactionPayarc will:

    • Decrypt the Apple Pay token
    • Return a usable payment token in response You can then use this token to complete the payment using Payarc’s standard transaction APIs.