---
title: "paymentAuthorizationViewController(_:didSelectShippingContact:completion:)"
framework: passkit
role: symbol
role_heading: Instance Method
path: "passkit/pkpaymentauthorizationviewcontrollerdelegate/paymentauthorizationviewcontroller(_:didselectshippingcontact:completion:)"
---

# paymentAuthorizationViewController(_:didSelectShippingContact:completion:)

Tells the delegate that the user selected a shipping address, and asks for an updated payment request.

## Declaration

```swift
optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didSelectShippingContact contact: PKContact, completion: @escaping @Sendable (PKPaymentAuthorizationStatus, [PKShippingMethod], [PKPaymentSummaryItem]) -> Void)
```

```swift
optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didSelectShippingContact contact: PKContact) async -> (PKPaymentAuthorizationStatus, [PKShippingMethod], [PKPaymentSummaryItem])
```

## Parameters

- `controller`: The payment authorization view controller.
- `contact`: A contact object representing the new shipping address. To maintain privacy, the shipping information is anonymized. For example, in the United States it only includes the city, state, and zip code. This provides enough information to calculate shipping costs, without revealing sensitive information until the user actually approves the purchase.
- `completion`: The completion block to call with the updated payment summary items and shipping methods. This block takes the following parameters:

## Discussion

Discussion Use this method to update the available shipping methods and, if a shipping method has been selected, the current shipping cost. When this method is called, you create a new array of valid PKShippingMethod objects for the specified address. You also create an array of PKPaymentSummaryItem objects that represent the updated cost. The summary items should include the shipping cost if a valid shipping method has been selected. For more information on updating these values, see the PKPaymentRequest class’s shippingMethods and paymentSummaryItems properties.

## See Also

### Handling shipping information

- [paymentAuthorizationViewController(_:didSelectShippingContact:handler:)](passkit/pkpaymentauthorizationviewcontrollerdelegate/paymentauthorizationviewcontroller(_:didselectshippingcontact:handler:).md)
- [paymentAuthorizationViewController(_:didSelect:handler:)](passkit/pkpaymentauthorizationviewcontrollerdelegate/paymentauthorizationviewcontroller(_:didselect:handler:)-5r0i7.md)
- [paymentAuthorizationViewController(_:didSelect:completion:)](passkit/pkpaymentauthorizationviewcontrollerdelegate/paymentauthorizationviewcontroller(_:didselect:completion:)-9otrj.md)
