<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "ApplePayontheWeb",
  "identifier" : "/documentation/ApplePayontheWeb/ApplePaySession/canMakePaymentsWithActiveCard",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Apple Pay on the Web"
    ],
    "preciseIdentifier" : "clm/ApplePaySession/canMakePaymentsWithActiveCard"
  },
  "title" : "canMakePaymentsWithActiveCard"
}
-->

# canMakePaymentsWithActiveCard

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

```
static Promise <boolean> canMakePaymentsWithActiveCard(
	DOMString merchantIdentifier
);
```

## Parameters

`merchantIdentifier`

The merchant ID created when the merchant enrolled in Apple Pay.

## Return Value

`true` if the device supports Apple Pay and there is at least one active card in Wallet that is qualified for payments on the web; otherwise, `false`.

## Discussion

This method asynchronously contacts the Apple Pay servers as part of the verification process.

Per the [Apple Pay on the Web Acceptable Use Guidelines](https://developer.apple.com/go/?id=apple-pay-guidelines), if you invoke the [`canMakePaymentsWithActiveCard`](/documentation/ApplePayontheWeb/ApplePaySession/canMakePaymentsWithActiveCard) API and determine that a user has an active card provisioned into Wallet, then Apple Pay must automatically be set as the default or sole payment option on any webpage where payments are accepted, such as the checkout page or product detail page. In all other situations, use [`canMakePayments`](/documentation/ApplePayontheWeb/ApplePaySession/canMakePayments) instead.

Note that some cards, such as transit cards, are only enabled for POS payments and therefore won’t qualify for payments on the web.

The following code is an example of calling this method before displaying an Apple Pay button.

Determining whether to display an Apple Pay button

```javascript
if (window.ApplePaySession) {
   var merchantIdentifier = 'example.com.store';
   var promise = ApplePaySession.canMakePaymentsWithActiveCard(merchantIdentifier);
   promise.then(function (canMakePayments) {
      if (canMakePayments)
         // Display Apple Pay Buttons here…
}); }
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)