Skip to main content

Apple Pay

Payment Product ID: 302

Apple Pay enables customers to pay securely using Touch ID or Face ID on their iOS devices. Card data is tokenized and stored securely in the Apple Pay wallet, providing enhanced security and a frictionless checkout experience.

Benefits

  • Seamless Authentication - Native Touch ID/Face ID for quick checkout
  • Enhanced Security - Tokenized card data with Device PAN (DPAN)
  • Higher Conversion - Reduced friction for mobile transactions
  • Wide Device Support - iPhone, iPad, Apple Watch, Mac

Supported Card Brands

  • Visa
  • Mastercard
  • American Express
  • Cartes Bancaires

Device Requirements

DeviceRequirements
iPhoneFace ID or Touch ID (iPhone 6 and later)
iPadiPad Pro, Air, standard, or mini with Touch ID
Apple WatchSeries 1 and later
MacTouch ID or paired Apple Watch

Integration Methods

Hosted Checkout Page

The simplest integration method. Apple Pay automatically appears for customers using Safari on supported Apple devices.

{
"order": {
"amountOfMoney": {
"currencyCode": "EUR",
"amount": 2980
}
},
"hostedCheckoutSpecificInput": {
"locale": "en_GB",
"returnUrl": "https://yoursite.com/return"
},
"mobilePaymentMethodSpecificInput": {
"authorizationMode": "FINAL_AUTHORIZATION",
"paymentProductId": 302
}
}

Cross-Device Flow

Customers on desktop can scan a QR code to complete payment on their Apple device:

  1. Customer initiates checkout on desktop
  2. Apple Pay QR code is displayed
  3. Customer scans QR code with iPhone
  4. Apple Pay sheet opens on iPhone
  5. Customer authenticates with Face ID/Touch ID
  6. Desktop receives confirmation

Mobile SDK Integration

For native iOS apps, choose between platform-handled or merchant-handled decryption.

Worldline handles decryption of the Apple Pay token. Simplest approach with lowest PCI scope.

{
"mobilePaymentMethodSpecificInput": {
"paymentProductId": 302,
"authorizationMode": "FINAL_AUTHORIZATION",
"encryptedPaymentData": "eyJ2ZXJzaW9uIjoiRUNfdjEiLCJkYX...",
"ephemeralKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj...",
"publicKeyHash": "uUhU0fJoEJNk11gR8Ptd5Uw+jAnudz..."
},
"order": {
"amountOfMoney": {
"amount": 2980,
"currencyCode": "EUR"
}
}
}

Merchant-Handled Decryption

You decrypt the Apple Pay token before sending to Worldline. Provides more control but increases PCI scope.

{
"mobilePaymentMethodSpecificInput": {
"paymentProductId": 302,
"authorizationMode": "FINAL_AUTHORIZATION",
"decryptedPaymentData": {
"dpan": "4761120010000492",
"expiryDate": "1225",
"cryptogram": "jiSRYgf6G2rjYwAAC0GPAHQAAAA=",
"eci": "7",
"cardholderName": "John Doe"
}
},
"order": {
"amountOfMoney": {
"amount": 2980,
"currencyCode": "EUR"
}
}
}

Onboarding Setup

Step 1: Apple Developer Account

  1. Enroll in the Apple Developer Program
  2. Create an Apple Merchant ID
  3. Accept Apple Pay terms and conditions

Step 2: Certificate Configuration

For platform-handled decryption:

  1. Go to Merchant Portal > Business > Payment Methods > Apple Pay
  2. Download the Certificate Signing Request (CSR)
  3. In Apple Developer Portal, create an Apple Pay certificate using the CSR
  4. Upload the generated certificate to Merchant Portal
Certificate Expiry

Certificates expire after two years. You'll receive email notifications before expiration. Create separate certificates for test and production environments.

Step 3: Enable Apple Pay

  1. In Merchant Portal, go to Business > Payment Methods
  2. Enable Apple Pay (Payment Product 302)
  3. Test in sandbox environment

Recurring Payments

Apple Pay supports recurring payments (Card on File):

Initial Payment

{
"mobilePaymentMethodSpecificInput": {
"paymentProductId": 302,
"encryptedPaymentData": "xxx",
"ephemeralKey": "xxx",
"publicKeyHash": "xxx",
"paymentProduct302SpecificInput": {
"isRecurring": true,
"tokenize": true,
"recurring": {
"recurringPaymentSequenceIndicator": "first"
}
}
},
"order": {
"amountOfMoney": {
"currencyCode": "EUR",
"amount": 1000
}
}
}

Subsequent Payments

Use the stored token for subsequent charges:

{
"subsequentCardPaymentMethodSpecificInput": {
"subsequentType": "recurring"
},
"order": {
"amountOfMoney": {
"amount": 1000,
"currencyCode": "EUR"
}
}
}

Subscription Configuration

Configure recurring billing details:

{
"mobilePaymentMethodSpecificInput": {
"paymentProduct302SpecificInput": {
"applePayRecurringPaymentRequest": {
"paymentDescription": "Monthly Subscription",
"regularBilling": {
"label": "Premium Plan",
"amount": "9.99",
"type": "final",
"paymentTiming": "recurring",
"recurringPaymentIntervalUnit": "month",
"recurringPaymentIntervalCount": 1
},
"managementURL": "https://yoursite.com/manage-subscription"
}
}
}
}

PKPayment Mapping

Map Apple's PKPayment object to the API request:

PKPayment PropertyAPI Property
token.data.applicationPrimaryAccountNumberdpan
token.data.applicationExpirationDateexpiryDate
token.data.paymentData.onlinePaymentCryptogramcryptogram
token.data.paymentData.eciIndicatoreci
billingContact.emailAddresscontactDetails.emailAddress
billingContact.phoneNumbercontactDetails.phoneNumber
billingContact.namepersonalInformation.name
billingContact.postalAddressbillingAddress

Testing

Use the Apple Pay sandbox environment for testing:

  1. Create a sandbox Apple ID in App Store Connect
  2. Add test cards to the sandbox wallet
  3. Use the Worldline test environment endpoint
Test Cards

Apple provides test cards specifically for sandbox testing. See Apple's documentation for available test card numbers.

Country & Currency Support

Supported Countries: 40+ including Australia, Belgium, Canada, France, Germany, Japan, Netherlands, UK, US

Supported Currencies: 150+ including EUR, USD, GBP, JPY, CAD, AUD

Security

Apple Pay provides multiple security layers:

  • Tokenization - Card numbers are never stored or transmitted
  • Device PAN (DPAN) - Unique device-specific token
  • Biometric Authentication - Face ID or Touch ID required
  • Dynamic Security Code - Generated for each transaction

Best Practices

  1. Display Apple Pay prominently - Use Apple's official button guidelines
  2. Pre-fill customer data - Request shipping/billing from Apple Pay
  3. Handle errors gracefully - Provide clear feedback on failures
  4. Test on real devices - Simulator has limitations
  5. Keep certificates current - Monitor expiration dates

SDKs

PlatformSDK
iOS (Swift/Obj-C)GitHub
AndroidGitHub
JavaScriptGitHub
Flutterpub.dev
React Nativenpm

Next Steps