Type Method

supportsVersion

Detects whether a web browser supports a particular Apple Pay version.

Declaration

static boolean supportsVersion(unsigned long version);

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 detailed version information.

Return Value

A Boolean value indicating 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.

Apple Pay version

macOS version where first available

iOS version where first available

1

10.12

10.0

2

10.12.1

10.1

3

10.13

11.0

4

10.14.1

12.1

5

10.14.2

12.1.1

6

10.14.4

12.2

See Apple Pay on the Web Version History for detailed version information.

See Also

Determining Support for API and Payments

canMakePayments

Indicates whether the device supports Apple Pay.

canMakePaymentsWithActiveCard

Indicates whether the device supports Apple Pay and whether the user has an active card in Wallet.