🆕 Apple Pay Payments



Apple Pay Definition

Apple Pay is a secure digital wallet that tokenises card information, allowing seamless online transactions without sharing card details with merchants. It facilitates communication between the user, the issuing bank, and the payment gateway to authorise and complete transactions efficiently.


How to implement Apple Pay on your Platform with Lemonway

Lemonway offer 2 options to implement Apple pay:

  • Web only
  • Quick and simplified Process
  • No Apple account subscripion
  • Lemonway handles registration via the Apple Pay Web Marketplace API

👍

Note

To implement option 2 contact your Account Manager or a member of our support team as there are specific requirements. They will be able to help you setup the required perquisites, and advise you on the best options.

Benefits

  • Enhanced User Experience: One-click checkout reduces cart abandonment.
  • Security & Trust: Advanced security features (tokenisation, biometric authentication) increase customer confidence.
  • Competitive Edge: Modern and widely adopted payment solution.
  • Speed & Efficiency: Faster transactions, improving shopping experiences during peak times.

📘

Note

Apple Pay transactions do not require 3DS redirection. Apple Pay handles SCA-compliant authentication directly through the user's device (iPhone or Mac). As a result, payment data from Apple Pay is already authenticated, eliminating the need for 3DS redirection

Prerequisites for Option 2

Apple Payment Processing Certificate: Required for partners using their own Apple account. Your certificate must be renewed every 25 months.

📘

Note

For additional requirements: Contact your account manager.

Available Features

  • Web Browser (using QR Code redirection)
  • Mobile App

Lemonway x Apple Payment Flow

  1. Display Apple Pay Button - Your platform integrates the Apple Pay button using Apple Libraries.
    The button is integrated on your platform checkout page using PassKit (Apple Pay and Wallet) and Apple Pay on the Web.

  2. Initiate Money-In to Lemonway - Your Platform initiates a Money-in with Card request.

  3. Token Generation from Apple Pay - Your platform must request the payment to Apple Pay.
    If you use the Lemonway’s Apple Account (option 1), you need to create a payment session through the Lemonway API dedicated endpoint.

    POST /xpay/apple/session

    {
     // [WebkitToken retrieved from CardMoneyInWebInit request]
      "webkitToken": "XXXXXXXXXXXXXXXXXXXXXXXX",
      // [A string of 64 or fewer UTF-8 characters containing the canonical name for your store, suitable for display. A good display name remains a consistent value for the store and doesn't contain dynamic values such as incrementing order numbers. Don’t localize the name. Use only characters from the supported character sets in the fonts listed in the table below.]
      "displayName": "A APP",
      // [For the domainName parameter, provide your fully qualified domain name associated with your Apple Pay Merchant Identity Certificate. It should be the domain name of the checkout url where the apple pay button is displayed.]
      "domainName": "A.com"
    }

    Apple Pay returns encrypted data specific to the payment

  4. Request the Apple Pay Payment to Lemonway Your Platform sends the Apple Pay payment request through the dedicated endpoint, including the PaymentData as received from Apple Pay. The amount of your Money-In request must match your Apple Pay request. Note, it is possible to send encrypted or decrypted data.

    POST /direct-payments/xpay/apple/

    {
      // [WebkitToken retrieved from CardMoneyInWebInit request]
      "webkitToken": "string",
      // Full Merchant Checkout Url page (where the Apple Pay button was displayed)
      "merchantCheckoutUrl": "string",
      // Holder Name
      "payerName": "string",
      // Raw payment response object from Apple
      "rawPaymentResponse": "string",
      // OPTIONAL: Decrypted Payment Data object
      "partnerDecryptedPaymentData": "string"
    }
  5. Lemonway processes payment request.

  6. Lemonway returns the transaction result and the Payer is redirected.

How does it work?

We can imagine that a user is on a merchant site ready to complete a purchase.

  1. In your Lemonway dashboard, under the Transactions tab, you’ll see that the payment is marked as pending because the payer has not yet selected a payment method.

    Lemonway Dashboard displays pending payment until payer decides to select a payment

  2. The payer has already confirmed that they want to buy the service or product, they have checked shipping details are correct and are now ready to pay. The payment page displays the payment choices, and you payer decides to use Apple pay to complete their purchase.

    Payer decides to pay with Apple Pay

  3. If payment is made from a Desktop a QR code will appear asking the payer to scan the code to continue with the purchase.

    Payer scans Apple QR code to continue payment on iPhone

  4. Once the QR code is scan a payment summary will appear on the payer's phone and they can confirm the payment using the phone's side button. Depending on the iPhone model, the payer can confirm with passcode, finger id or face id.

    Payer is required to confirm payment on phone

  5. Upon payment completion the payer is directed to the correct url (success or failure).

  6. After a payment is successfully completed, the status Completed will appear in the transaction history under the Transactions tab of your Lemonway Dashboard.

Payment completed in Dashboard display


API Endpoints

1) Web Money-In Initiation

POST /moneyins/card/webinit

Parameters: Contextual transaction data

2. Apple Pay Session Creation (Option 1 Only)

POST /xpay/apple/session

Parameters:

  • webkitToken (from Money-In initiation)
  • displayName
  • domainName

3. Apple Pay Payment Request

POST /direct-payments/xpay/apple/

Parameters:

  • webkitToken
  • merchantCheckoutUrl
  • payerName
  • rawPaymentResponse
  • partnerDecryptedPaymentData (if applicable)

Sequence Diagram

See: Apple Pay

Apple Resources

Apple Pay API Documentation: Apple Developer