<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PassKit",
  "identifier" : "/documentation/PassKit/PKPaymentErrorKey/contactFieldUserInfoKey",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "PassKit (Apple Pay and Wallet)",
      "PassKit"
    ],
    "preciseIdentifier" : "c:@PKPaymentErrorContactFieldUserInfoKey"
  },
  "title" : "contactFieldUserInfoKey"
}
-->

# contactFieldUserInfoKey

Payment error key that indicates errors with the contact information.

```
static let contactFieldUserInfoKey: PKPaymentErrorKey
```

## Discussion

See [`PKContactField`](/documentation/PassKit/PKContactField) for the values to use with this key.

Use this key with the error code [`PKPaymentError.Code.shippingContactInvalidError`](/documentation/PassKit/PKPaymentError/Code/shippingContactInvalidError) to indicate an error in the name, email address, phone number, or the shipping address as a whole.

Use this key with the error code [`billingContactInvalidError`](/documentation/PassKit/PKPaymentError/billingContactInvalidError)  to indicate an error with the billing address as a whole, or billing name.

The example code in [Listing 1](https://developer.apple.com/library/archive/qa/qa1639/_index.html#//apple_ref/doc/uid/DTS40008751-CH1-SOURCECODE2) shows the [`contactFieldUserInfoKey`](/documentation/PassKit/PKPaymentErrorKey/contactFieldUserInfoKey) used to indicate a phone number error.

The following example shows an error indicating a problem with the shipping contact’s phone number.

```swift
let phoneError = NSError.init(domain: PKPaymentErrorDomain,
                               code: PKPaymentError.shippingContactInvalidError.rawValue,
                               userInfo: [NSLocalizedDescriptionKey:"Phone number is invalid",
                               PKPaymentErrorKey.contactFieldUserInfoKey:PKContactField.phoneNumber])
```

---

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)