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

# paymentAuthorizationController(_:didSelectShippingMethod:completion:)

Tells the delegate that the user selected a shipping method.

## Declaration

```swift
optional func paymentAuthorizationController(_ controller: PKPaymentAuthorizationController, didSelectShippingMethod shippingMethod: PKShippingMethod, completion: @escaping @Sendable (PKPaymentAuthorizationStatus, [PKPaymentSummaryItem]) -> Void)
```

```swift
optional func paymentAuthorizationController(_ controller: PKPaymentAuthorizationController, didSelectShippingMethod shippingMethod: PKShippingMethod) async -> (PKPaymentAuthorizationStatus, [PKPaymentSummaryItem])
```

## 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 block to call with the updated payment summary items. This block takes the following parameters:

## Discussion

Discussion Use this method to update shipping costs based on the shipping address selected by the user, as previously passed to the delegate in the paymentAuthorizationController(_:didSelectShippingContact:completion:) method. If no address has been selected, use the prepopulated address on the payment request. When this method is called, 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. note: The delegate receives no further callbacks except paymentAuthorizationControllerDidFinish(_:) until it has invoked the completion block.

## 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:handler:)](passkit/pkpaymentauthorizationcontrollerdelegate/paymentauthorizationcontroller(_:didselectshippingmethod:handler:).md)
