---
title: "paymentAuthorizationViewController(_:didSelect:handler:)"
framework: passkit
role: symbol
role_heading: Instance Method
path: "passkit/pkpaymentauthorizationviewcontrollerdelegate/paymentauthorizationviewcontroller(_:didselect:handler:)-5r0i7"
---

# paymentAuthorizationViewController(_:didSelect:handler:)

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

## Declaration

```swift
optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didSelect shippingMethod: PKShippingMethod, handler completion: @escaping @Sendable (PKPaymentRequestShippingMethodUpdate) -> Void)
```

```swift
optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didSelect shippingMethod: PKShippingMethod) async -> PKPaymentRequestShippingMethodUpdate
```

## Parameters

- `controller`: The payment authorization view controller.
- `shippingMethod`: The selected shipping method. This parameter contains one of the shipping methods specified in the payment request.
- `completion`: The completion handler to call with the updated payment summary items.

## Discussion

Discussion Use this method to update shipping costs based on the shipping address the user selected in a call to paymentAuthorizationViewController(_:didSelectShippingContact:handler:). If the user didn’t select an address, use the prepopulated address of the payment request. When the system calls this method, you create a new array of PKPaymentSummaryItem objects that represent the updated cost including shipping. For more information on creating summary items, see the PKPaymentRequest class’s paymentSummaryItems property.

## See Also

### Handling shipping information

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