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

# paymentAuthorizationController(_:didSelectPaymentMethod:completion:)

Tells the delegate that the user changed the payment method, and asks for an updated payment request.

## Declaration

```swift
optional func paymentAuthorizationController(_ controller: PKPaymentAuthorizationController, didSelectPaymentMethod paymentMethod: PKPaymentMethod, completion: @escaping @Sendable ([PKPaymentSummaryItem]) -> Void)
```

```swift
optional func paymentAuthorizationController(_ controller: PKPaymentAuthorizationController, didSelectPaymentMethod paymentMethod: PKPaymentMethod) async -> [PKPaymentSummaryItem]
```

## Parameters

- `controller`: The payment authorization controller.
- `paymentMethod`: The new payment method.
- `completion`: The completion block to call with the updated payment summary items. This block takes the following parameters:

## Discussion

Discussion This method is called when the user has selected a new payment card.  Use this delegate callback to update the summary items in response to the card type changing (for example, applying credit card surcharges), and then call the callback with the updated summary items. note: The delegate receives no further callbacks except paymentAuthorizationControllerDidFinish(_:) until it has invoked the completion block.

## See Also

### Handling user’s payment method selection

- [paymentAuthorizationController(_:didSelectPaymentMethod:handler:)](passkit/pkpaymentauthorizationcontrollerdelegate/paymentauthorizationcontroller(_:didselectpaymentmethod:handler:).md)
