<!--
{
  "documentType" : "article",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/storekit-views",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "StoreKit views"
}
-->

# StoreKit views

Display a customizable In-App Purchase store using StoreKit views for SwiftUI.

## Discussion

The StoreKit views APIs provide UI to help you build a store for your In-App Purchases, and provide a way for customers to complete the purchase. The views support localization, so your customers see the product names, descriptions, and prices appropriate to their App Store storefront.

> Related session from WWDC23:
> Session 10013: [Meet StoreKit for SwiftUI](https://developer.apple.com/videos/play/wwdc2023/10013)

StoreKit manages the layouts across all platforms, so the views look great on any device. You can use SwiftUI APIs to customize how the views integrate with your app.

To use StoreKit views, configure your In-App Purchase metadata in App Store Connect, or in a StoreKit configuration file in Xcode if you’re testing your app. Next, create the views using [`StoreView`](/documentation/StoreKit/StoreView), [`ProductView`](/documentation/StoreKit/ProductView), or [`SubscriptionStoreView`](/documentation/StoreKit/SubscriptionStoreView). Finally, customize the default views to match your app by using your own icons, backgrounds, and other styling. Use <doc://com.apple.documentation/documentation/SwiftUI/Previews-in-Xcode> to see your progress as you iterate on your design.

For more information on configuring your In-App Purchase metadata, see [Manage In-App Purchases](https://help.apple.com/app-store-connect/#/devae49fb316). For more information on StoreKit configuration files in Xcode, see <doc://com.apple.documentation/documentation/Xcode/setting-up-storekit-testing-in-xcode>.

## Topics

### Merchandising In-App Purchases, subscriptions, and offers

[`ProductView`](/documentation/StoreKit/ProductView)

A view that merchandises an individual In-App Purchase product.

[`StoreView`](/documentation/StoreKit/StoreView)

A view that merchandises a collection of In-App Purchase products.

[`SubscriptionStoreView`](/documentation/StoreKit/SubscriptionStoreView)

A view that merchandises a collection of auto-renewable subscription options that belong to the same subscription group.

[`SubscriptionOfferView`](/documentation/StoreKit/SubscriptionOfferView)

  <doc://com.apple.documentation/documentation/SwiftUI/Backyard-birds-sample>

### Styling product views

  <doc://com.apple.documentation/documentation/SwiftUI/View/productViewStyle(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/productIconBorder()>

[`ProductViewStyle`](/documentation/StoreKit/ProductViewStyle)

A type that specifies the appearance and interaction of In-App Purchase products within the view hierarchy.

[`ProductViewStyleConfiguration`](/documentation/StoreKit/ProductViewStyleConfiguration)

The properties of an In-App Purchase product for use by custom product view styles.

### Styling subscription store controls

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreControlStyle(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreControlStyle(_:placement:)>

[`SubscriptionStoreControlStyle`](/documentation/StoreKit/SubscriptionStoreControlStyle)

A type that specifies the appearance and interaction of controls in the subscription store view instances within the view hierarchy.

[`SubscriptionStoreControlStyleConfiguration`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration)

The properties of a subscription store control that includes the list of auto-renewable subscriptions to merchandise.

[`SubscriptionStoreControlPlacement`](/documentation/StoreKit/SubscriptionStoreControlPlacement)

A type that specifies the placement of a subscription control in a subscription store view.

### Styling subscription offer views

[`AutomaticSubscriptionOfferViewStyle`](/documentation/StoreKit/AutomaticSubscriptionOfferViewStyle)

[`CompactSubscriptionOfferViewStyle`](/documentation/StoreKit/CompactSubscriptionOfferViewStyle)

[`SubscriptionOfferViewStyleConfiguration`](/documentation/StoreKit/SubscriptionOfferViewStyleConfiguration)

[`SubscriptionOfferViewStyle`](/documentation/StoreKit/SubscriptionOfferViewStyle)

### Configuring subscription store controls

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreControlIcon(icon:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePickerItemBackground(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePickerItemBackground(_:in:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreButtonLabel(_:)>

[`SubscriptionStoreButtonLabel`](/documentation/StoreKit/SubscriptionStoreButtonLabel)

The label of the subscribe button that a subscription store view uses.

### Creating custom subscription store control styles

[`SubscriptionStoreButton`](/documentation/StoreKit/SubscriptionStoreButton)

A button for subscribing to an in-app subscription with a localized label and optional caption.

[`SubscriptionStorePicker`](/documentation/StoreKit/SubscriptionStorePicker)

A composite control with a picker for selecting a subscription option and a button for confirming the subscription.

[`SubscriptionStorePickerOption`](/documentation/StoreKit/SubscriptionStorePickerOption)

A subscription option within a subscription picker control.

### Declaring the structure of a subscription store

[`SubscriptionOptionGroup`](/documentation/StoreKit/SubscriptionOptionGroup)

A group of subscription options that includes optional views for labels and marketing content.

[`SubscriptionOptionGroupSet`](/documentation/StoreKit/SubscriptionOptionGroupSet)

A set of groups of subscription options that include optional views for labels and marketing content.

[`SubscriptionPeriodGroupSet`](/documentation/StoreKit/SubscriptionPeriodGroupSet)

[`SubscriptionOptionSection`](/documentation/StoreKit/SubscriptionOptionSection)

[`StoreContent`](/documentation/StoreKit/StoreContent)

A type that represents the content of a store.

[`StoreContentBuilder`](/documentation/StoreKit/StoreContentBuilder)

A result builder that creates store content from closures that you provide.

### Styling subscription option groups

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreOptionGroupStyle(_:)>

[`subscriptionStoreOptionGroupStyle(_:)`](/documentation/StoreKit/StoreContent/subscriptionStoreOptionGroupStyle(_:))

[`SubscriptionOptionGroupStyle`](/documentation/StoreKit/SubscriptionOptionGroupStyle)

### Adding backgrounds to subscription stores

  <doc://com.apple.documentation/documentation/SwiftUI/View/containerBackground(_:for:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/containerBackground(for:alignment:content:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreControlBackground(_:)-7jxa9>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreControlBackground(_:)-7ev89>

  <doc://com.apple.documentation/documentation/SwiftUI/ContainerBackgroundPlacement/subscriptionStore>

  <doc://com.apple.documentation/documentation/SwiftUI/ContainerBackgroundPlacement/subscriptionStoreHeader>

  <doc://com.apple.documentation/documentation/SwiftUI/ContainerBackgroundPlacement/subscriptionStoreFullHeight>

[`SubscriptionStoreControlBackground`](/documentation/StoreKit/SubscriptionStoreControlBackground)

### Configuring accessory buttons

  <doc://com.apple.documentation/documentation/SwiftUI/View/storeButton(_:for:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreSignInAction(_:)>

[`StoreButtonKind`](/documentation/StoreKit/StoreButtonKind)

A button to display in a store view or subscription store view.

[`SubscriptionOfferViewButtonKind`](/documentation/StoreKit/SubscriptionOfferViewButtonKind)

### Configuring the subscription store policies

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePolicyDestination(for:destination:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePolicyDestination(url:for:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePolicyForegroundStyle(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePolicyForegroundStyle(_:_:)>

[`SubscriptionStorePolicyKind`](/documentation/StoreKit/SubscriptionStorePolicyKind)

The type of policy, such as the terms of service or privacy policies.

### Selecting subscription offers

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionPromotionalOffer(offer:signature:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/preferredSubscriptionOffer(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/offerCodeRedemption(isPresented:onCompletion:)>

### Configuring purchase options and product descriptions

  <doc://com.apple.documentation/documentation/SwiftUI/View/inAppPurchaseOptions(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/productDescription(_:)>

### Responding to store events

  <doc://com.apple.documentation/documentation/SwiftUI/View/onInAppPurchaseStart(perform:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/onInAppPurchaseCompletion(perform:)>

### Loading StoreKit data

  <doc://com.apple.documentation/documentation/SwiftUI/View/storeProductTask(for:priority:action:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/storeProductsTask(for:priority:action:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/currentEntitlementTask(for:priority:action:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStatusTask(for:priority:action:)>

[`Product.CollectionTaskState`](/documentation/StoreKit/Product/CollectionTaskState)

The state of a task that loads a collection of products in the background.

[`Product.TaskState`](/documentation/StoreKit/Product/TaskState)

The state of a task that loads a product in the background.

[`EntitlementTaskState`](/documentation/StoreKit/EntitlementTaskState)

The state of an entitlement task.

### Requesting a refund

  <doc://com.apple.documentation/documentation/SwiftUI/View/refundRequestSheet(for:isPresented:onDismiss:)>



---

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)