---
title: "presentOfferCodeRedeemSheet(in:)"
framework: storekit
role: symbol
role_heading: Type Method
path: "storekit/appstore/presentoffercoderedeemsheet(in:)"
---

# presentOfferCodeRedeemSheet(in:)

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

## Declaration

```swift
@MainActor static func presentOfferCodeRedeemSheet(in scene: UIWindowScene) async throws
```

## Parameters

- `scene`: The doc://com.apple.documentation/documentation/UIKit/UIWindowScene that StoreKit uses to display the offer code redemption sheet.

## Mentioned in

Implementing offer codes in your app Supporting offer codes in your app Supporting subscription offer codes in your app Testing purchases made outside your app

## Discussion

Discussion The presentOfferCodeRedeemSheet(in:) method displays a system sheet in the window scene, where customers can enter and redeem offer codes. If you generate offer codes in App Store Connect, call this function to enable customers to redeem the offer. To display the sheet using SwiftUI, see offerCodeRedemption(isPresented:onCompletion:). 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. For more information, see updates. In Mac apps built with Mac Catalyst, this method throws a StoreKitError.unknown error.

## See Also

### Presenting the offer code redemption sheet

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