---
title: PKPaymentAuthorizationResult
framework: passkit
role: symbol
role_heading: Class
path: passkit/pkpaymentauthorizationresult
---

# PKPaymentAuthorizationResult

An object that reports the status code and errors for a payment authorization request.

## Declaration

```swift
class PKPaymentAuthorizationResult
```

## Overview

Overview If the Apple Pay sheet contains errors, you provide a PKPaymentAuthorizationStatus.failure status to PKPaymentAuthorizationResult, and include the errors in the errors array. If there are no errors, you provide a PKPaymentAuthorizationStatus.success status and leave the error array empty. The following code example shows a failure result with two errors in the postal code and street fields. A result that reports two errors: // Error in postal code field. let shippingInvalidZip = PKPaymentRequest.paymentShippingAddressInvalidError(withKey:CNPostalAddressPostalCodeKey,                                                     localizedDescription: "Invalid ZIP code") // Error in street address field. let shippingInvalidStreet = PKPaymentRequest.paymentShippingAddressInvalidError(withKey:CNPostalAddressStreetKey,                                                     localizedDescription: "Missing street name") // Result with failure status and errors. let result = PKPaymentAuthorizationResult(status: .failure,                                            errors: [shippingInvalidZip, shippingInvalidStreet])

## Topics

### Initializing a payment authorization result

- [init(status:errors:)](passkit/pkpaymentauthorizationresult/init(status:errors:).md)

### Setting order details

- [orderDetails](passkit/pkpaymentauthorizationresult/orderdetails.md)
- [PKPaymentOrderDetails](passkit/pkpaymentorderdetails.md)

### Setting payment authorization status and errors

- [errors](passkit/pkpaymentauthorizationresult/errors.md)
- [status](passkit/pkpaymentauthorizationresult/status.md)
- [PKPaymentAuthorizationStatus](passkit/pkpaymentauthorizationstatus.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Payment sheet interactions and authorization

- [PKPaymentOrderDetails](passkit/pkpaymentorderdetails.md)
- [PKPaymentAuthorizationController](passkit/pkpaymentauthorizationcontroller.md)
- [PKPaymentAuthorizationViewController](passkit/pkpaymentauthorizationviewcontroller.md)
- [PKPayment](passkit/pkpayment.md)
