Apple Pay integration

Generated on 8/6/2024

1 search

To integrate Apple Pay, especially with the new updates presented at WWDC, you should consider the following steps and updates:

  1. Apple Pay on Non-Safari Browsers:

    • Users on iOS 18 can use Apple Pay on any non-Safari browser by scanning a code with their iPhone.
    • Ensure you import the Apple Pay JavaScript SDK (version 2.0 or higher) in the head tag of your HTML document.
    • Use the JavaScript SDK Apple Pay button instead of the CSS variant to support non-Safari browsers.
    • Refer to the developer documentation for more details on displaying and customizing the Apple Pay button.
  2. Deprecation and New APIs:

    • The canMakePaymentsWithActiveCard is deprecated in favor of the new Apple Pay capabilities API.
    • Use the canMakePayments API or the new payment credential status object from the Apple Pay capabilities API to determine when and where to display the Apple Pay button.
  3. Funds Transfer Capabilities:

    • With iOS 18 and macOS 15, funds transfers are now available on the web.
    • Ensure your payment processor supports disbursements.
    • For instant funds transfer, add supportsInstantFundsOut to your merchant capability list within the payment method data.
  4. Best Practices:

    • Always show the Apple Pay button if canMakePayments returns true.
    • Follow the acceptable use guidelines for Apple Pay on the web or the Human Interface guidelines for more details on when and where to show the Apple Pay button.

For a detailed walkthrough and code examples, you can refer to the session "What’s new in Wallet and Apple Pay" at WWDC 2024.

Relevant Sessions

  1. What’s new in Wallet and Apple Pay

If you need more specific details or timestamps, feel free to ask!