The documentation states canMakePaymentsWithActiveCard is deprecated but will continue to work on Safari browsers.
The suggested method to use applePayCapabilities is in Beta.
This is confusing for a developer! which method should be used. I do not want to use a 'Beta' version in a Production environment. On the other hand, I also don't want to use a method which is deprecated.
Any help or guidance would be welcome.
Thank you
Hi @Raj_Jayaraj23,
The applePayCapabilities API is the preferred method. It has the beta flag because its implementation details are subject to change between now and the public release of iOS 18 and Safari 18. For more information on its expected usage during the beta period, please see Using the Apple Pay JS SDK for iOS 18.
Because getting developer feedback during the beta period is crucial to resolve unexpected issues in the future, please consider the following:
- Use the beta URL to test the new methods and their implementation against your test environments. This also provides the benefit of testing against third-party web browsers as well.
- If you're content with your existing implementation in production, and want to support Apple Pay on third-party web browsers when iOS 18 is publicly released, use the new methods to your production environments, and use the production URL. This will continue to work only in Safari, but will support third-party web browsers at a later date.
- If you aren't comfortable deploying the implementation to your production environments until the iOS 18 public release, feel free to continue to use canMakePaymentsWithActiveCard for now.
Cheers,
Paris