<!--
{
  "availability" : [
    "macOS: 15.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/AppStore/presentOfferCodeRedeemSheet(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "s:8StoreKit03AppA0O27presentOfferCodeRedeemSheet4fromySo16NSViewControllerC_tYaKFZ"
  },
  "title" : "presentOfferCodeRedeemSheet(from:)"
}
-->

# presentOfferCodeRedeemSheet(from:)

Displays a sheet in the view that enables customers to redeem an offer code that you configure in App Store Connect.

```
@MainActor static func presentOfferCodeRedeemSheet(from controller: NSViewController) async throws
```

## Parameters

`controller`

An <doc://com.apple.documentation/documentation/AppKit/NSViewController> that StoreKit uses to display the offer code redemption sheet.

## Discussion

## Discussion

This method displays a system sheet in the view, where customers can enter and redeem offer codes. Use this method if you generate offer codes in App Store Connect and your app uses AppKit.

> Important:
> Set up offer codes in App Store Connect before calling this API. Customers can only redeem these offers in your app through the redemption sheet; don’t use a custom UI.

For more information on offer codes, see [Supporting offer codes in your app](/documentation/StoreKit/supporting-offer-codes-in-your-app).

When customers redeem an offer code, StoreKit emits the resulting transaction in [`updates`](/documentation/StoreKit/Transaction/updates). Set up a transaction listener as soon as your app launches to receive new transactions while the app is running.

---

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)