StoreKit

RSS for tag

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

Posts under StoreKit tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

StoreKit payment return error
this error occurred during the StoreKit1 payment process. Could you please tell me the reason? SKErrorDomain Code=0 "发生未知错误\" UserInfo= {NSLocalizedDescription=发生未知错误,NSUnderlyingError=0x17652ee50 {Error Domain=ASDErrorDomain Code=500"(null)\"Userlnfo={NSUnderlyingError=0x17652d530 {Error Domain=AMSErrorDomain Code=203 "(null)" Userlnfo= {NSUnderlyingError=0x17652c3c0 {Error Domain=AMSErrorDomain Code=203"(null)\"UserInfo=0x1663e5940(not displayed)}}}
1
0
16
21h
[StoreKit External Purchase] Testing token retrieval in development environment with React Native
Question on token testing in development: Hello, I'm developing a React Native application using StoreKit External Purchase. I'm having difficulties testing the transaction token retrieval in the development environment. Specific questions: Is it possible to test the transaction token retrieval in development/sandbox environment? Is there a special testing mode for developers that would allow simulating token reception without going through the App Store? Are there specific debugging tools to verify proper token reception? Question on native implementation: Regarding the native implementation of StoreKit External Purchase: Is there detailed documentation on creating native modules for React Native that implement StoreKit External Purchase? Can you confirm if the following approach is correct for native implementation: Using NSClassFromString(@"ExternalPurchase") Calling presentNoticeSheetWithURL:completion: Retrieving the token in the completion block Are there any code examples for complete native implementation? Question on implementation validation: For validating StoreKit External Purchase implementation: How can we verify that our implementation is correct before App Store submission? Are there validation tools or automated tests to check compliance? What are common errors to avoid during implementation? Question on best practices: Regarding implementation best practices: What's the best way to handle potential errors during token retrieval? How to handle cases where the user cancels the transaction? What are the recommended security checks for server-side token validation? Question on documentation: I'm looking for additional resources on StoreKit External Purchase: Is there specific documentation for integration with frameworks like React Native? Are there complete code examples for native implementation? Where can I find information about testing and debugging best practices? Additional technical question: Technical implementation details: What's the correct way to handle the ExternalPurchase class initialization in React Native native modules? Are there specific requirements for the URL passed to presentNoticeSheetWithURL? How should we handle the token in the completion block to ensure it's properly passed back to React Native? Question on testing workflow: Testing workflow questions: What's the recommended testing workflow for External Purchase implementation? How can we verify the token format and validity before production deployment? Are there any tools or methods to simulate the complete purchase flow in development?
0
0
29
1d
In-App Purchase products suddenly not returned by queryProductDetails
Hi, We're currently experiencing an issue with consumable In-App Purchases on our production iOS app. Until the end of May, everything was working as expected, but starting in early June, our app no longer receives any products when calling queryProductDetails() using Flutter’s in_app_purchase plugin (which utilizes StoreKit). Here’s what we’ve confirmed so far: The product IDs are correctly configured in App Store Connect, and all items are marked as “Approved.” No recent changes have been made to the bundle ID or the product IDs. The “Base Territory” setting was updated for each IAP item in early May. After that change, product retrieval and purchases were working normally through the end of May. This issue is happening on real devices in production, and multiple users are affected. The same functionality continues to work correctly on Android. All requested product IDs are being returned in the notFoundIDs list of the queryProductDetails() response. We're quite puzzled by this issue as no clear cause has been identified so far. Any thoughts on this issue would be much appreciated. Thank you!
0
0
35
1d
Price in a Xcode synced StoreKit configuration file is not updated when I change it on App Store Connect and always shows the starting price
Hello, I've noticed the prices of my products in my Xcode synced StoreKit configuration are not updated when I change the price in App Store Connect. I tried to manually sync the file, to remove and add it again to my project but old initial prices are still used. In the screenshot below, the price is currently $2.99 but the file still uses the initial price of $1.99. It makes testing a little bit painful because I'm never sure which product is being shown. Is this a bug? Is there a way to get the live production App Store prices be used instead of the starting prices? I filed a feedback for this: FB17798486 Regards, Axel
0
1
26
3d
Issue that subscription products (monthly subscription and annual subscription) cannot be obtained from App Store Connect
Dear my friends, I have set up two subscriptions (monthly and annual) in App Store Connect. By configuring with StoreKit, I can import the configurations from App Store Connect into the local .storekit file, and the program can run normally. However, when the StoreKit configuration is set to NONE, I am unable to retrieve product information from App Store Connect. The code for fetching the product list is as follows. Could you please provide suggestions on how to proceed? Thank you very much! private let productIds: [String] = ["subscription.year", "subscription.monthly"] subscriptions = try await Product.products(for: productIds)
2
0
61
3d
Specific IAP products returning empty data - Possible StoreKit issue
Hello developers, We're facing a critical issue with our app and need your insights: Since today, 3 specific IAP products return empty data when calling Product.products(for: [productId]). This affects all users, preventing any successful purchases of these items. Other IAP products seem unaffected. let products = try await Product.products(for: [productId]) Key details: Production environment Issue started: 2025.6.17 No recent app updates All products show as "Approved" in App Store Connect Questions: Has anyone experienced similar issues recently? Could this be a StoreKit or App Store system problem? Any suggestions for diagnosing or resolving this, besides contacting Apple Support? Recommendations for temporary workarounds? This is severely impacting our business. Any help is greatly appreciated! Thank you!
7
3
266
3d
A functional link to the Terms of Use (EULA)...
Issue Description The submission did not include all the required information for apps offering auto-renewable subscriptions. The app's metadata is missing the following required information: A functional link to the Terms of Use (EULA). If you are using the standard Apple Terms of Use (EULA), include a link to the Terms of Use in the App Description. If you are using a custom EULA, add it in App Store Connect. Next Steps Update the metadata to include the information specified above. Resources Apps offering auto-renewable subscriptions must include all of the following required information in the binary: Title of auto-renewing subscription (this may be the same as the in-app purchase product name) Length of subscription Price of subscription, and price per unit if appropriate Functional links to the privacy policy and Terms of Use (EULA) The app metadata must also include functional links to the privacy policy in the Privacy Policy field in App Store Connect and the Terms of Use (EULA) in the App Description or EULA field in App Store Connect. Please let me know where I have to add this link (EULA). And by EULA, they mean a simple terms of use link, or is it something else?
0
0
22
3d
Why does a purchase result in success unverified?
A purchase can result in success with verificationResult .unverified. Is there a list of reasons for which the transaction might be unverified and how should i handle it in my app? From my understanding, a successful unverified transaction means the user has already paid for the purchase. So, do i just ignore the unverified transaction or do i provide content to the user anyways?
0
1
19
3d
How to test refunds of consumable purchases?
I have consumable IAPs in my app. Currently there is no way for me to test refunds for them as Xcode testing doesn't allow refunds option for my Purchases. According to this official documentation on Transaction.all , i should be getting my refunded consumables in Transaction's all property. But there is no way for me to know what kind of data is in the refunded transaction object. Will there be a 'revocation date' like in the case of non-consumables?
0
0
11
3d
storekit2_products_error
Cannot retrieve products for iap or subscription on simulator iPhone 16 and real device iPhone XR also. lutter: IAPError(code: storekit2_products_error, source: app_store, message: The operation couldn’t be completed. (NSURLErrorDomain error -1009.), details: The operation couldn’t be completed. (NSURLErrorDomain error -1009.)) flutter: Error fetching IAP products: IAPError(code: storekit2_products_error, source: app_store, message: The operation couldn’t be completed. (NSURLErrorDomain error -1009.), details: The operation couldn’t be completed. (NSURLErrorDomain error -1009.))
1
0
56
3d
Offer Codes and saving the used Offer Code
I have setup offer codes and subscriptions for users to purchase, when a user signs up using an offer code outside of the app the offer code does not save into my database where the subscriptions are saved the transaction is successful and validated by store kit but I cant see that that user used an offer code - an example https://apps.apple.com/redeem/?ctx=offercodes&id=6744338284&code=ASKDOM I then setup an edge function in supabase to retrieve the data that store kit sends back and im not sure where to find the offer code as it still doesnt save is there an internal apple reference that they use as apposed to the users offer code i.e offer code askdomSA = P3050 for example how can Identify if an offer code was used thank you
0
0
13
1w
StoreKit not returning products after IAP localization was re-approved (Adapty: noProductIDsFound)
🔹 Description of the issue: My app uses Adapty to fetch and display in-app subscription products on a paywall. The system has worked perfectly until recently. After I edited the localizations of the subscriptions in App Store Connect, they were temporarily rejected. Since that moment, the products no longer show in the app. Even though I re-submitted the localizations and they were approved, StoreKit still does not return any products, and Adapty returns the error: less CopyEdit AdaptyError(code: 1000, message: "No products were found for provided product ids") 🔹 Error Message: noProductIDsFound — from Adapty SDK when attempting to load paywall products. 🔹 Steps to Reproduce: Open the Aida Nena app (App ID: 6737695739). Sign in with a test account or create a new one. Go to Profile → Subscription. The paywall will show but no products will appear. Logs show Adapty attempting to fetch product IDs but none are found in StoreKit. 🔹 What I’ve Tried: Re-activating the Adapty SDK. Forcing a cache reset via app reinstall. Re-checking App Store Connect: all subscriptions and localizations now show Approved (green). Waiting several hours in case of propagation. Verifying correct product identifiers are in use — they haven’t changed. 🔹 My Hypothesis: The StoreKit product metadata is still not properly refreshed after the rejection and re-approval of the localizations. This is preventing Adapty (and StoreKit) from returning the product data even though the products are live and approved. 🔹 Additional Info: SDK: @adapty/react-native + Adapty iOS SDK under the hood. This seems to be a known edge case among developers after a product's metadata/localization is changed and re-approved. Thanks, I appreciate any help.
1
0
48
3d
WWDC25 Metal & game technologies group lab
Hello, Thank you for attending today’s Metal & game technologies group lab at WWDC25! We were delighted to answer many questions from developers and energized by the community engagement. We hope you enjoyed it and welcome your feedback. We invite you to carry on the conversation here, particularly if your question appeared in Slido and we were unable to answer it during the lab. If your question received feedback let us know if you need clarification. You may want to ask your question again in a different lab e.g. visionOS tomorrow. (We realize that this can be confusing when frameworks interoperate) We have a lot to learn from each other so let’s get to Q&A and make the best of WWDC25! 😃 Looking forward to your questions posted in new threads.
0
0
130
1w
StoreKit 2: Handle unfinished consumables
I have non-consumable and consumable in-app purchases in my app. The tutorial I was following stated Transaction.currentEntitlements includes unfinished consumables, which is incorrect according to the documentation. Is the correct way to handle unfinished consumables (and non-consumables) to implement Transaction.updates and call finish() if it’s verified? The documentation says that listener will receive unfinished transactions once upon app launch, so with that, do I understand correctly you do not need to implement Transaction.unfinished unless you want to look for unfinished transactions manually later on? Otherwise what is the correct and most recommended way to handle unfinished consumables? Is there a way to test that scenario in Xcode?
1
0
87
6d
AppTransactionId support in Get Transaction Info endpoint — documentation change and actual behavior?
Hello, I have a question regarding the App Store Server API's getTransactionInfo endpoint. Previously, the official documentation for getTransactionInfo mentioned that: “This endpoint doesn’t support an app transaction. To get information about an app transaction, decode the signed app transaction received from the device.” However, as of June 2025, I can no longer find this sentence in the current documentation (link). Now, the docs state that all in-app purchase transaction IDs are supported (consumable, non-consumable, auto-renewable subscriptions, etc.). But in practice, when I call getTransactionInfo with an AppTransactionId (extracted from a signed App Transaction JWS), I receive this error: apiErrorCode: 4000048 “Invalid request. App transactions aren’t supported by this endpoint.” Is this endpoint supposed to support AppTransactionId now, or is the restriction still in place (but not mentioned in the docs)? Is there any official statement about when this restriction was added/removed? Can you clarify if only in-app purchase transaction IDs (and not AppTransactionIds) are supported for this endpoint, or has the policy changed recently? Any clarification or historical context would be greatly appreciated. Additionally, I would like to know about the behavior of an App Transaction in the event of a refund. If a user receives a refund for the app itself (not an in-app purchase), how can changes to the AppTransaction be detected? Does the App Store Server Notification v2 provide notifications for app-level refunds, or are such events only visible by decoding the latest App Transaction JWS on the device? Is there any way to receive app-level refund information server-side, or must we always rely on the device to provide the updated signed app transaction? Any clarification on this refund flow and notification coverage would also be appreciated. Thank you!
0
0
70
1w
App Store Receipt Availability After Pre-order Install and Future Deprecation Concerns
Hi Apple Developer Team, I'm looking to confirm some technical details regarding the pre-order flow and App Store receipt handling. Specifically, I have the following questions: Q1: After a user installs an app via pre-order and launches it for the first time, will a valid App Store receipt be available immediately via [[NSBundle mainBundle] appStoreReceiptURL]? Are there any known cases where the receipt might be missing or invalid, requiring a manual refresh (e.g., via SKReceiptRefreshRequest)? Q2: Is the pre-order flow currently supported in the sandbox environment? Specifically, is it possible to simulate pre-ordering an app and installing it in a sandbox or TestFlight environment, in order to test receipt generation and related logic? https://developer.apple.com/documentation/appstorereceipts/responsebody/receipt Q3: The receipt field in the App Store receipt structure is marked as deprecated. Is it still acceptable to use this field for validating receipts? Has Apple announced any timeline or system version in which this field will be fully removed or unsupported?
0
0
43
1w
External Link Account API - ExternalLinkAccount.canOpen() always return false
This is a hybrid app built with JavaScript (Vue) + Capacitor. It is a reader app and has been authorized by Apple to use the External Link Account Entitlement, allowing users to manage their subscriptions outside of the app. I have implemented the External Link Account API. When I click on "Gerenciar Assinatura em...", I use the External Link Account API to check if the modal is available (using ExternalLinkAccount.canOpen()). I always get "false". my plugin in swift: my app: I believe this is due to the fact that I am in a development environment. My project is configured correctly in the following files: info.plist and App.entitlements. I also have the authorization in my profile visible in Xcode. I have attached screenshots for validation. The question is: should the External Link Account API work in a test environment? I am testing the build in Xcode with a physical iPhone with iOS 18. file info.plist: file App.entitlements: xcode with authorization in my profile: If you could let me know if I am doing something wrong, I would greatly appreciate it.
2
0
71
3d
Inconsistent behavior with transactionId and appAccountToken in iOS Sandbox purchases (StoreKit1 & StoreKit2)
Hi, I'm reaching out to report a recurring issue with in-app purchases on iOS that seems to be related to Apple’s transaction handling — not to third-party libraries. In my Flutter application, I use both StoreKit2 and StoreKit1 (for comparison) via different packages, including the official in_app_purchase package. However, in both cases, I’m experiencing unexpected reuse of transactionId and appTransactionId values, even when initiating fresh purchases with unique appAccountToken values. Problem Summary: Purchase Stream Returns Old Purchases When calling buyNonConsumable() with a new product, the purchase stream still returns data for a previously purchased product, despite clearing all Sandbox transactions and using a new applicationUserName for each attempt. Transaction IDs Reused Across Distinct Purchases Even when generating a new UUID for appAccountToken on each purchase, the returned appTransactionId and transactionId are reused — this breaks our server-side logic, which expects these fields to uniquely identify purchases and users. Example Logs: // First purchase { "appAccountToken": "2d5a0880-f68e-44a7-a414-f51204e63904", "appTransactionId": "704464472748013865", "transactionId": "2000000928154716" } // Second purchase (different user context) { "appAccountToken": "2d5a0880-f68e-44a7-a414-f51204e63904", "appTransactionId": "704464472748013865", "transactionId": "2000000928429780" } Even when using a different productId, the appTransactionId stays the same. When using StoreKit1, the productId updates properly, but the transactionId still matches the previous one. This behavior also affects App Store Server Notifications (V2): we have observed notifications tied to appAccountTokens from completely different user accounts (based on internal logs), sometimes delayed by days or weeks. I’ve prepared a reproducible example using the official Flutter in_app_purchase sample with minimal changes — you can find it here: Github gist The code is almost identical to the package example. I only added UUID generation for applicationUserName in _getToken(). In the actual app (not in this example), I retrieve the token from an API. Additional Observations from the Community: We’ve also found similar issues reported in other frameworks and languages. For instance, a developer using react-native-iap observed that App Store Server Notifications in TestFlight were tied to previously deleted users, even after signing up with a new user account and generating a new appAccountToken. Details here: User A deleted → User B signs up → receives upgrade event with User A’s token Notification uses appAccountToken from old account, not the new one This strengthens the suspicion that the issue may be related to how Apple associates transactions with Apple IDs in test environments. Questions: Is it expected for transactionId or appTransactionId to persist across purchases within the same Apple ID, even for different user contexts (e.g., separate logins in the same app)? Is there any official recommendation for avoiding this kind of data reuse in Sandbox or TestFlight environments? Should I expect appAccountToken in server notifications to always match the latest value provided during the purchase? Thank you in advance for your assistance. I would appreciate any clarification or advice regarding this issue, as it impacts production logic that relies on these identifiers being unique and consistent.
0
0
53
1w
Storefront Country Code Inaccuracy on iOS 18
I am currently developing a feature to support global privacy compliance, which relies on accurately obtaining the user’s App Store country/region. Based on this country/region information, out App dynamically display privacy policies that comply with local regulations. To retrieve this information, I use the relevant StoreKit APIs. API usage examples: Objective-C: NSString *countryCode = [SKPaymentQueue defaultQueue].storefront.countryCode; Swift let storefront = await Storefront.current let code = storefront?.countryCode However, during sandbox account testing on iOS 18.0 and above, I noticed that the returned country code does not match the actual country/region configured in the sandbox Apple ID. This issue does not occur on systems below iOS 18.0, where the country code returned by the API matches the account setting. Since this discrepancy can directly affect the accuracy of our compliance logic, I would appreciate your clarification on the following points: Is this a known change in behavior for iOS 18? In production environments, does the country code returned by the above APIs accurately reflect the App Store region of the user’s signed-in Apple ID? Is there a recommended approach to reliably obtain the user’s App Store account country/region?
1
0
38
1w