<!--
{
  "availability" : [
    "iOS: 9.0.0 - 27.0.0",
    "iPadOS: 9.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.12.0 -",
    "visionOS: 1.0.0 - 27.0.0",
    "watchOS: 2.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "PassKit",
  "identifier" : "/documentation/PassKit/PKPassLibrary/canAddPaymentPass(withPrimaryAccountIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PassKit (Apple Pay and Wallet)"
    ],
    "preciseIdentifier" : "c:objc(cs)PKPassLibrary(im)canAddPaymentPassWithPrimaryAccountIdentifier:"
  },
  "title" : "canAddPaymentPass(withPrimaryAccountIdentifier:)"
}
-->

# canAddPaymentPass(withPrimaryAccountIdentifier:)

A Boolean value that indicates whether the app can add a card to Apple Pay for the provided primary account identifier.

```
func canAddPaymentPass(withPrimaryAccountIdentifier primaryAccountIdentifier: String) -> Bool
```

## Parameters

`primaryAccountIdentifier`

A unique identifier for the underlying funding primary account number (PAN). This isn’t the PAN itself.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if PassKit can add the pass.

## Discussion

Adding payment passes requires a special entitlement from Apple. If the entitlement isn’t present, this method returns <doc://com.apple.documentation/documentation/Swift/false>.  For more information about requesting this entitlement, see [developer.apple.com/apple-pay/](https://developer.apple.com/apple-pay/).

---

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)