---
title: "presentOfferCodeRedeemSheet(from:)"
framework: storekit
role: symbol
role_heading: Type Method
path: "storekit/appstore/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.

## Declaration

```swift
@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.

## Mentioned in

Supporting offer codes in your app Supporting subscription offer codes in your app

## 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. When customers redeem an offer code, StoreKit emits the resulting transaction in updates. Set up a transaction listener as soon as your app launches to receive new transactions while the app is running.

## See Also

### Presenting the offer code redemption sheet

- [Supporting offer codes in your app](storekit/supporting-offer-codes-in-your-app.md)
- [presentOfferCodeRedeemSheet(in:)](storekit/appstore/presentoffercoderedeemsheet(in:).md)
- [offerCodeRedemption(isPresented:onCompletion:)](swiftui/view/offercoderedemption(ispresented:oncompletion:).md)
