---
title: "paymentAuthorizationController(_:didSelectShippingMethod:handler:)"
framework: passkit
role: symbol
role_heading: Instance Method
path: "passkit/pkpaymentauthorizationcontrollerdelegate/paymentauthorizationcontroller(_:didselectshippingmethod:handler:)"
---

# paymentAuthorizationController(_:didSelectShippingMethod:handler:)

Tells the delegate that the user selected a shipping method.

## Declaration

```swift
@MainActor optional func paymentAuthorizationController(_ controller: PKPaymentAuthorizationController, didSelectShippingMethod shippingMethod: PKShippingMethod, handler completion: @escaping (PKPaymentRequestShippingMethodUpdate) -> Void)
```

```swift
@MainActor optional func paymentAuthorizationController(_ controller: PKPaymentAuthorizationController, didSelectShippingMethod shippingMethod: PKShippingMethod) async -> PKPaymentRequestShippingMethodUpdate
```

## Parameters

- `controller`: The payment authorization controller.
- `shippingMethod`: The selected shipping method. This parameter contains one of the shipping methods included 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, as previously passed to the delegate in the paymentAuthorizationController(_:didSelectShippingContact:handler:) method. If the user didn’t select an address, use the prepopulated address on 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

- [paymentAuthorizationController(_:didSelectShippingContact:handler:)](passkit/pkpaymentauthorizationcontrollerdelegate/paymentauthorizationcontroller(_:didselectshippingcontact:handler:).md)
- [paymentAuthorizationController(_:didSelectShippingContact:completion:)](passkit/pkpaymentauthorizationcontrollerdelegate/paymentauthorizationcontroller(_:didselectshippingcontact:completion:).md)
- [paymentAuthorizationController(_:didSelectShippingMethod:completion:)](passkit/pkpaymentauthorizationcontrollerdelegate/paymentauthorizationcontroller(_:didselectshippingmethod:completion:).md)
