<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "PassKit",
  "identifier" : "/documentation/PassKit/PKPaymentErrorKey",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "PassKit (Apple Pay and Wallet)"
    ],
    "preciseIdentifier" : "c:@T@PKPaymentErrorKey"
  },
  "title" : "PKPaymentErrorKey"
}
-->

# PKPaymentErrorKey

Additional details about an error on the Apple Pay sheet.

```
struct PKPaymentErrorKey
```

## Discussion

Use payment error keys if you are creating a payment error without using one of the convenience methods in [`PKPaymentRequest`](/documentation/PassKit/PKPaymentRequest) (such as [`paymentBillingAddressInvalidError(withKey:localizedDescription:)`](/documentation/PassKit/PKPaymentRequest/paymentBillingAddressInvalidError(withKey:localizedDescription:)) or others).

The payment error keys indicate a specific field that has an error, for example, the street field of an address.

## Topics

### Initializing a payment error key

[`init(rawValue: String)`](/documentation/PassKit/PKPaymentErrorKey/init(rawValue:))

Create an error key given the raw value.

### Error keys

[`static let postalAddressUserInfoKey: PKPaymentErrorKey`](/documentation/PassKit/PKPaymentErrorKey/postalAddressUserInfoKey)

Payment error key that indicates errors with the postal address.

[`static let contactFieldUserInfoKey: PKPaymentErrorKey`](/documentation/PassKit/PKPaymentErrorKey/contactFieldUserInfoKey)

Payment error key that indicates errors with the contact information.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

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)