supportsVersion
Detects whether a web browser supports a particular Apple Pay version.
Declaration
static boolean supportsVersion();Parameters
- version:
An integer specifying the Apple Pay version number. For the best compatibility with operating systems and browsers, use the lowest possible version number that supports the features required. See Apple Pay On The Web Version History for version numbers and detailed information.
Mentioned in
Return Value
A Boolean value that indicates whether the web browser (Safari) supports a particular Apple Pay version. Returns false if the web browser does not support the specified version.
Discussion
Apple increments the Apple Pay version number when adding new functionality that is not backward compatible with previous versions of Safari. The same Apple Pay version number applies to both Apple Pay JS and Payment Request APIs.
Check version support to ensure new API can run in the user’s browser, and provide fallback to earlier API versions whenever possible for broadest compatibility. See Apple Pay on the Web version history for the version numbers and detailed information.