<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PassKit",
  "identifier" : "/documentation/PassKit/PKPaymentAuthorizationViewControllerDelegate/paymentAuthorizationViewController(_:didChangeCouponCode:handler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PassKit (Apple Pay and Wallet)"
    ],
    "preciseIdentifier" : "c:objc(pl)PKPaymentAuthorizationViewControllerDelegate(im)paymentAuthorizationViewController:didChangeCouponCode:handler:"
  },
  "title" : "paymentAuthorizationViewController(_:didChangeCouponCode:handler:)"
}
-->

# paymentAuthorizationViewController(_:didChangeCouponCode:handler:)

Tells the delegate that the user entered or updated a coupon code.

```
optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didChangeCouponCode couponCode: String, handler completion: @escaping @Sendable (PKPaymentRequestCouponCodeUpdate) -> Void)
```

```
optional func paymentAuthorizationViewController(_ controller: PKPaymentAuthorizationViewController, didChangeCouponCode couponCode: String) async -> PKPaymentRequestCouponCodeUpdate
```

## Parameters

`controller`

The payment authorization view controller.

`couponCode`

The coupon code.

`completion`

The completion handler to call with the updated payment summary items and shipping methods.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)