StoreKit

RSS for tag

Support in-app purchases and interactions with the App Store using StoreKit.

Posts under StoreKit tag

200 Posts

Post

Replies

Boosts

Views

Activity

Multiple IAP products at different price points for same content — compliant with guidelines?
I'm building an app that sells non-consumable in-app purchases. I want to implement a partner/referral discount system using the following approach: Create multiple IAP products in App Store Connect for the same content at different price points (e.g. full price at €10, 10% off at €9, 20% off at €8) When a user enters a partner or referral code in the app, my backend validates the code and returns which product to present The user then completes the purchase through the standard StoreKit IAP flow — Apple processes the transaction normally at the discounted price No purchase is unlocked without going through Apple IAP. No external payment system is involved. The only difference from a standard purchase is which product SKU is shown based on a backend-validated code. My questions: Is this approach compliant with App Store guidelines? Is there any guideline that requires developers to use Apple's native Offer Codes system instead of this approach for discounted purchases? Any guidance would be appreciated before we invest in building this out.
0
0
26
1h
Subscription unavailable
When my app tries to access a subscription, StoreKit's products(for:) always returns zero results. Similarly, SubscriptionStoreView always shows "Subscription Unavailable" followed by "The subscription is unavailable in the current storefront". The app is a watch-only app (no iPhone companion app). The app and the subscription product were each approved in App Store Connect over two weeks ago. The problem occurs when the app is installed from TestFlight, when the app is installed from the App Store (production), and when run in the Xcode debugger. The only time the app successfully accesses the subscription when simulating it in Xcode with a .storekit file. How should my app access the subscription? Repro: App Store bundle ID: com.toolsay.hoopref Phone app target (unused) bundle ID: com.toolsay.hoopref Watch app bundle ID: com.toolsay.hoopref.watchapp Subscription product ID: com.toolsay.hoopref.pro.annual Subscription availability: All countries and regions App Store listing let products = try await Product.products(for: ["com.toolsay.hoopref.pro.annual"]) products.count is 0.
1
0
63
2h
Using StoreKit from an AUv3 plugin that can be loaded in-process
I have a bunch of Audio Unit v3 plugins that are approaching release, and I was considering using subscription-model pricing, as I have done in a soon to be released iOS app. However, whether this is possible or not is not at all obvious. Specifically: The plugin can, depending on the host app, be loaded in-process or out-of-process - yes, I know, Logic Pro and Garage Band will not load a plug-in in-process anymore, but I am not going to rule that out for other audio apps and force on them the overhead of IPC (I spent two solid weeks deciphering the process to actually make it possible for an AUv3 to run in-process - see this - https://github.com/timboudreau/audio_unit_rust_demo - example with notes) Depending on how it is loaded, the value of Bundle.main.bundleIdentifier will vary. If I use the StoreKit API, will that return product results for my bundle identifier when being called as a library from a foreign application? I would expect it would be a major security hole if random apps could query about purchases of other random apps, so I assume not. Even if I restricted the plugins to running out-of-process, I have to set up the in-app purchases on the app store for the App container's ID, not the extension's ID, and the extension is what run - the outer app that is what you purchase is just a toy demo that exists solely to register the audio unit. I have similar questions with regard to MetricKit, which I would similarly like to use, but which may be running inside some random app. If there were some sort of signed token, or similar mechanism, that could be bundled or acquired by the running plugin extension that could be used to ensure both StoreKit and MetricKit operate under the assumption that purchases and metrics should be accessed as if called from the container app, that would be very helpful. This is the difference between having a one-and-done sales model and something that provides ongoing revenue to maintain these products - I am a one-person shop - if I price these products where they would need to be to pay the bills assuming a single sale per customer ever, the price will be too high for anyone to want to try products from a small vendor they've never heard of. So, being able to do a free trial period and then subscription is the difference between this being a viable business or not.
7
0
667
10h
In App Purchase Products
I am working on an application where I want to add InApp Purchase. The application is offering storage to users. The user will be presented with different level of storage. He will be able to buy one level of storage through InApp Purchase. Is it possible to add some restrictions in the Product so that a user can not downgrade from a large Storage to a smaller storage? Because if he does so, then all the datas in the large storage can not be migrated to the smaller storage.
2
0
78
22h
Which Apple subscription offer best fits an in-app coupon-like flow?
Hello, I’m trying to understand which Apple subscription offer best fits a coupon-like flow in our app. Our ideal case is a 1-month Pro benefit that users can trigger inside the app: without entering a code manually possibly more than once over time then continue into a normal paid auto-renewable subscription Ideally, this would work for new, existing, and lapsed users, and if possible, even for users who are already actively subscribed (though that part is not required). From the docs, I understand that: Offer Codes require redemption Promotional Offers are for existing or previously subscribed users Introductory Offers are for new eligible users Win-Back Offers are for lapsed subscribers So my questions are: Is there any Apple-supported way to do this without manual code entry? Can the same user receive this kind of 1-month benefit multiple times over time? Which offer type is the closest fit? Is this use case partly incompatible with Apple’s subscription system? Thanks.
1
0
39
1d
StoreKit / react-native-iap: Payment deducted but transaction not delivered (E_CONNECTION_CLOSED) – India UPI payments
Hello, We are facing an issue with In-App Purchases (subscriptions) in two iOS apps built with React Native + react-native-iap. Issue Some users receive the error: E_CONNECTION_CLOSED during the purchase flow. However: The payment is successfully deducted via the App Store. The subscription appears in the user's Apple ID subscription list. But on our side: The app does not receive the StoreKit transaction callback No receipt or transaction ID is delivered Our backend cannot validate the purchase. Restore Purchases When affected users try Restore Purchases, StoreKit returns: No purchases found even though the subscription is visible in their Apple ID. Most affected users are from India, and many payments are made via UPI through App Store billing. Has anyone experienced a case where: the user is charged the subscription exists in Apple ID but StoreKit never returns the transaction or receipt? Any suggestions on how to recover these transactions would be greatly appreciated. Thanks!
2
0
87
2d
StoreKit: No products returned in Sandbox + "This item is not available" in "initiate transaction"
Hi, my app was rejected because IAP were not present in the app. I followed guidelines more carefully and filled all buisness detail since then. And now I have: StoreKit Configuration in XCode is set to None, Products (subscription + consumable product) are already approved (from the previous review) Paid Apps Agreement - active Bank account - active Tax forms - active Compliance - active Problems: When trying to test it with TestFlight + sandbox account, StoreKit is returning zero products. When trying to check my products by "initiate transaction" from Sandbox App Store manage dashboard I am getting an error "This item is not available" I am totally stuck and don't know what to process next. Unfortunately API.
1
0
56
2d
Different transaction IDs for the same purchase between SKPaymentTransaction and receipt latest_receipt_info
Hello, I am investigating a case where two different transaction IDs appear to refer to the same purchase, and I would like clarification on whether this behavior is expected. Additional context StoreKit version: StoreKit 1 (SKPaymentTransaction) Environment: Production Product type: Auto-renewable subscription Transaction sources The values are obtained from the following APIs: transaction_id from SKPaymentTransaction https://developer.apple.com/documentation/storekit/skpaymentqueue receipt_data from the App Store receipt https://developer.apple.com/documentation/foundation/bundle/appstorereceipturl Observed behavior After an In-App Purchase completes, the app receives: a transaction_id from SKPaymentTransaction the corresponding receipt_data for the purchase When inspecting the receipt, the transaction_id inside latest_receipt_info differs from the transaction_id received directly from the purchase transaction. For clarity: A = transaction_id received from the purchase flow (SKPaymentTransaction) A' = transaction_id found in receipt_data.latest_receipt_info The two values are different, but they differ only by 1. Additional observation The original_transaction_id for A and A' is identical, which suggests that both transaction IDs belong to the same subscription purchase chain. Pattern observation on the ID difference We have observed that the difference between A and A' is consistently exactly 1 (i.e., A' = A + 1) across multiple transactions, not just a single case. This appears to be a reproducible pattern rather than a coincidence. This observation raises an additional question (Question 6 below). API verification When calling: GET /inApps/v1/transactions/{transactionId} Both A and A' return what appears to be the same purchase record. The response data is effectively identical except for the transactionId field. However, when calling: GET /inApps/v2/history/{transactionId} A does not appear in the transaction history only A' appears in the history response Questions If A does not appear in transaction history, where does this transaction ID originate from? Why does Get Transaction Info (/inApps/v1/transactions/{transactionId}) return a valid response for A even though it is not present in the transaction history? Why do A and A' both resolve to what appears to be the same purchase? In this situation, which transaction ID should be treated as the canonical transaction ID for server-side validation? Is this difference related to how StoreKit 1 (SKPaymentTransaction) and the App Store Server API represent transactions? Is the consistent off-by-one difference between the transaction_id from SKPaymentTransaction and the one recorded in latest_receipt_info an intentional behavior of StoreKit 1's internal transaction ID assignment? Specifically, we are wondering whether StoreKit 1 applies some form of internal offset when delivering the transaction ID to the client, while the App Store server records a different (adjacent) ID in the receipt. If so, is this documented anywhere? Note We are currently in the process of migrating to StoreKit 2, but this behavior was observed while investigating our existing StoreKit 1 implementation. Any clarification would help us better understand the correct transaction model during the migration.
0
0
56
2d
Does SubscriptionStoreView .storeButton(for:.policies) work?
I've added .storeButton(.visible, for:.policies) to my SubscriptionStoreView, and the buttons do appear, but when I tap on them I get a sheet that just says "Terms of Service Unavailable / Somethng went wrong. Try Again.". (similar for Privacy Policy). Is this expected in development? Will these start working correctly in production? (and, more importantly, in App Review?) The docs say that these use the values (i.e. URLs) set in App Store Connect, but that I can override those. This is a new app. Is that wrong, do I need to set the URLs explicitly? Edited to add: the console reports: Failed to fetch terms of service and privacy policy: Error Domain=NSURLErrorDomain Code=-1011 "(null)"
7
1
1.1k
2d
.storeButton(.visible, for: .policies) shows “Terms of Service Unavailable” — how does it work?
Hi everyone, I’m using StoreKit 2 with .storeButton(.visible, for: .policies) inside my SubscriptionStoreView. The buttons appear correctly, but when tapped, a sheet opens that says “Terms of Service Unavailable” or “Something went wrong. Try again.” I’ve already added the required URLs (Privacy Policy and Terms of Use) in App Store Connect under App Information, but they still don’t show in the sheet. Does anyone know how this is supposed to work? • Are the URLs pulled directly from App Store Connect? • Do they only appear correctly in production? • Or do we need to manually set them in code for testing/TestFlight? Any insight would be greatly appreciated — just want to make sure everything is in place before submitting for review. Thanks!
1
1
113
4d
Unable to enable eligibility for External Purchase Link APIs — seeking clarification
Hello, I am currently implementing External Purchase Link and External Purchase Custom Link and am encountering an issue where both ExternalPurchaseLink.canOpen and ExternalPurchaseCustomLink.isEligible always return false under all test conditions. I would like to confirm whether my setup is missing any required steps or whether this behavior is expected. Below are the details of my current environment and configuration: 🔧 1. Development Environment Xcode: 16.3, 16.4, 26.0 beta 4 Devices: iPhone running iOS 26.2 beta iPhone running iOS 16.7.12 macOS 15.5 (real device testing) Simulator iOS 18.0 Build Type: Local development build using a Developer Provisioning Profile Sandbox account signed in during testing 🔑 2. Entitlements (Developer site & Xcode) In Certificates → Identifiers → App ID, both capabilities are enabled: StoreKit External Purchase StoreKit External Purchase Link The .entitlements file in Xcode includes: com.apple.developer.storekit.external-purchase = YES com.apple.developer.storekit.external-purchase-link = YES The Provisioning Profile also contains both entitlements (confirmed via codesign -d --entitlements :-). 📄 3. Info.plist Configuration Both keys are configured with correct region codes according to documentation: SKExternalPurchase SKExternalPurchaseCustomLinkRegions 🌍 4. Test Storefront Device storefront verified as United States (US) or Portugal (PT) (US = target region for External Purchase Link, PT = EU region) But despite all the above configuration, both API calls consistently return false: ExternalPurchaseLink.canOpen // false ExternalPurchaseCustomLink.isEligible // false So I cannot proceed to testing the remaining flow (token retrieval, link opening, etc.) ------ Questions ------ ❓ Q1) Local Development Build Limitation Is it expected behavior that Developer-signed local builds always return canOpen = false / isEligible = false for External Purchase Link & Custom Link? Is there a technical or policy restriction that prevents eligibility in local dev builds? ❓ Q2) App Store Connect Configuration Requirement Are there mandatory App Store Connect settings (such as external purchase URLs, support URL, disclosures, or country configuration) that must be enabled before eligibility becomes true? Currently, no External Purchase Link or Custom Link menu is visible in my App Store Connect app settings. Is this menu only available after certain approvals or under specific conditions? ❓ Q3) TestFlight Requirement Do External Purchase Link and Custom Link only return eligibility = true on: TestFlight builds, or Distribution-signed builds? Or should eligibility also work on developer builds? Formal confirmation would be helpful. ❓ Q4) Developer Account Type Limitation We are using an Individual Developer Account (not Organization). Can Individual accounts fully request, test, and ship apps using: External Purchase Link External Purchase Custom Link Or are there limitations on account type? 🙏 Request We have completed all documented setup steps (Entitlements → Provisioning → Info.plist), but eligibility remains false, blocking feature validation. Please clarify which of the following is the cause: Local development builds do not support eligibility Missing App Store Connect configuration (not visible to us) Account type restriction Region rollout or entitlement approval requirement Any additional setup not documented publicly Thank you for your assistance.
2
1
219
5d
StoreKit / react-native-iap – Payment deducted but no transaction returned (India UPI users)
Hello, We are facing an issue with In-App Purchases (subscriptions) in two iOS apps built with React Native + react-native-iap. Issue Some users receive the error: E_CONNECTION_CLOSED during the purchase flow. However: The payment is successfully deducted via the App Store. The subscription appears in the user's Apple ID subscription list. But on our side: The app does not receive the StoreKit transaction callback No receipt or transaction ID is delivered Our backend cannot validate the purchase. Restore Purchases When affected users try Restore Purchases, StoreKit returns: No purchases found even though the subscription is visible in their Apple ID. Most affected users are from India, and many payments are made via UPI through App Store billing. Has anyone experienced a case where: *the user is charged *the subscription exists in Apple ID *but StoreKit never returns the transaction or receipt? Any suggestions on how to recover these transactions would be greatly appreciated. Thanks!
0
0
33
5d
In-App Purchases not loading in production / TestFlight — Previously missing Paid Apps Agreement — App rejected under Guideline 3.1.2
Hello, My app was rejected on iPad (iPad Air 11-inch M3, iPadOS 26.2.1) with two related issues: Guideline 2.1 – Performance – App Completeness “The app exhibited one or more bugs that would negatively impact users. Bug description: the premium subscription cannot be loaded properly.” Guideline 3.1.2 – Business – Payments – Subscriptions “The submission did not include all the required information for apps offering auto-renewable subscriptions.” I am using StoreKit 2 with SubscriptionStoreView to present the auto-renewable subscription. During development: Subscriptions load correctly in the simulator (sandbox). On real devices, I test without a local StoreKit configuration file to fetch products from App Store Connect. The subscription UI (title, duration, price) displays correctly when products are returned. At the time of review, the Paid Apps Agreement was not active. I suspect this may have caused the subscription products to fail loading on the review device. Since then: Paid Apps Agreement is now Active. SubscriptionStoreView should automatically show required metadata. Because the subscription failed to load on iPad during review, the required information (title, price, duration) was not visible, which likely triggered the 3.1.2 rejection. Additionally, in TestFlight I sometimes see inconsistent behavior where the app appears but cannot be installed (“App Not Available”). Also, my app was rejected, but the subscription is still waiting for review. I would really appreciate guidance on the following: Am I potentially missing any required configuration that could prevent products from loading in production? Is there any propagation delay after activating the Paid Apps Agreement that could affect product availability? If I am overlooking something in configuration or testing, please let me know what I should specifically verify before resubmitting. Thank you very much for your help.
1
1
201
1w
Questions on Promo/Offer Code Validation and Functionality for In-App Purchases
We are implementing promo/offer codes for our iOS app’s subscription in-app purchases and have several technical questions regarding validation, receipt data, and integration. Could you please provide guidance on the following points? Testing/Validating Custom Codes Without Production Release: How can we validate custom promo/offer codes in a non-production environment? Current documentation indicates promo codes only work in production, requiring app submission and future release date setup for testing. Receipt Data for Redeemed Codes: The receipt currently includes only offer_code_ref_name, not the exact redeemed code (e.g., “ABC123”) entered by the user. Is there a way to retrieve the specific offer code used via receipts, App Store Server API, or other endpoints? Server-Side Validation Best Practices: What are the recommended best practices for server-side validation of offer codes, including using App Store Server API for transaction verification? Passing appAccountToken for Coupons: How can we pass an appAccountToken when users redeem coupon/offer codes (e.g., via presentOfferCodeRedeemSheet or redemption flows)? StoreKit purchase options support it for regular purchases but not redemption sheets. Callbacks on Coupon Redemption: Is there a client-side callback or notification (e.g., via updatedTransactions or StoreKit observers) when a user successfully redeems a coupon code in the app? Server notifications are received, but app-side feedback appears unreliable.
1
0
136
1w
Double-counted consumable in StoreKit unfinished and updates workflow
In Getting started with In-App Purchase using StoreKit views and the corresponding sample project, Store simultaneously enumerates Transaction.unfinished and Transaction.updates. Since, "if your app has unfinished transactions, the updates listener receives them once, immediately after the app launches," it appears that Transaction.unfinished would also receive the same unfinished transactions causing handle(updatedTransaction:) to be called for twice for each transaction, causing consumables to be double-counted. Is this a bug in the sample? Is there more information on concurrent execution of unfinished and updates?
1
1
196
1w
SubscriptionStoreView crashes on macOS Catalyst
I have an iOS and iPadOS app that also runs on macOS Catalyst. The user is able to view their subscription using the SubscriptionStoreView with two SubscriptionOptionGroups. The documentation does not mention these are supported on macOS Catalyst and the app crashes when attempting to show the SubscriptionStoreView on macOS Catalyst. If not supported, how can the user manage their subscription on macOS?
1
0
145
1w
RequestReview API does not trigger the review sheet in Xcode testing iPadOS 26.4 beta 3
Hello DTS team, the request review from StoreKit is not working in iOS 26.4 beta 3. I have filed a feedback (FB22157147). Sample code: import SwiftUI import StoreKit struct ContentView: View { @Environment(\.requestReview) private var requestReview @State private var count = 0 var body: some View { VStack { Button("Increase Count") { count += 1 } Text(count, format: .number) .font(.largeTitle) } .onChange(of: count) { if count == 3 { Task { try await Task.sleep(for: .seconds(2)) requestReview() print("Request Review triggered!") // On iPadOS 26.4 beta 2 & 3, requestReview() does not trigger any review system sheet when testing in Xcode 26.3 // Works on iOS 26.3.1 } } } } }
0
2
140
1w
In-App Subscription Works in Xcode Sandbox but Not Appearing for App Review Testers
Hello, I’m having an issue with my first subscription for my app WealthSlices, where the subscription appears correctly when testing locally from Xcode, but App Store reviewers appear unable to retrieve the product. Symptoms When I run the app from Xcode on my iPhone using the Sandbox environment: The subscription loads successfully. The purchase sheet appears. I can complete a sandbox purchase. However, when App Review tests the app, the paywall fails to load products and the app shows the following message: "No Products found. Purchases are temporarily unavailable on this device." Environment App: WealthSlices Platform: iOS Testing locally via Xcode → Sandbox Apple ID Subscription type: Auto-renewable subscription Product: WealthSlices Basic ($9.99/month) StoreKit: StoreKit 2 Current build: 1.0.7 (Build 32) What works locally When running via Xcode: StoreKit successfully fetches products. The subscription sheet appears with the correct pricing. Sandbox purchase flow completes normally. What appears to happen during App Review It appears that Product.products(for:) returns an empty list when the reviewers test the app. Things I have already verified The subscription is created in App Store Connect. It is attached to the current app version under In-App Purchases and Subscriptions. The subscription has pricing and localization configured. The subscription is in Ready to Submit status. The bundle ID and product ID match the code. Paid Apps Agreement is active. I uploaded a new build after creating the subscription. Question Is there something specific required for first-time subscription submissions that might cause the product not to appear during App Review but still work in local sandbox testing? Is there a known delay or propagation requirement for subscriptions before they can be fetched by Product.products(for:) in TestFlight/App Review environments? Any guidance would be greatly appreciated. also there doesn't seem to be an option to select the subscription over at https://appstoreconnect.apple.com/apps/6754225986/distribution/ios/version/inflight but there is no option to add it Thank you!
2
0
111
1w