StoreKit Test

RSS for tag

Create and automate tests in Xcode for your app's submission and in-app purchase transactions.

Posts under StoreKit Test tag

103 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

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
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
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 2 Product.products returns empty - Is Paid Apps Agreement required for sandbox testing?
Hi, I'm integrating in-app subscriptions using StoreKit 2 in my iOS app, and I've run into an issue where I'm unable to fetch any subscription products via: let products = try await Product.products(for: productIDs) This consistently returns an empty result (products.count == 0) when running on a real device using a sandbox account. Here's some relevant context of my current setup: This is the first version of the app adding in-app purchase subscriptions. In-App Purchase products are configured in App Store Connect, and marked as "Ready to Submit". The products are attached to the app version, and fully saved. A sandbox account is logged in on the test device. StoreKit Configuration local debug works fine — I can simulate purchases locally from Xcode. However, in the real sandbox environment, any attempt to fetch products returns no results. In App Store Connect > Agreements, Tax, and Banking, I currently see: Paid Application Agreement: Status = "Waiting for User Info" Banking Info: “In Progress” Tax Info: Not yet submitted ❓❓❓ My key question is: Does the "Paid Applications Agreement" need to be fully active (including bank + tax info complete) before in-app purchase products can be fetched in the sandbox environment? If so, it seems that this may be blocking my ability to: Test real subscription flows with sandbox accounts Pass App Store Review (since products cannot be loaded) Any clarification would be greatly appreciated! Thanks in advance.
1
0
46
1w
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
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
Unable to test in-app purchase integration
We are trying to implement / test in-app purchase for our subscription purchase in the app. We have done all the steps listed in the documentation on apple's website; and Our subscription plan is sitting in 'Ready to Submit' state. However, we are getting an empty response from, final response = await _iap.queryProductDetails({'com.company.xyz.basic1m'}); debugPrint(" Check: ${response.toString()}"); debugPrint("❌ Responses: ${response.productDetails.map((ProductDetailsResponse)=>ProductDetailsResponse.toString()).toList()}"); debugPrint("❌ Responses: ${response.productDetails.length}"); if (response.notFoundIDs.isNotEmpty) { debugPrint("❌ Not found: ${response.notFoundIDs}"); } else if (response.productDetails.isNotEmpty) { debugPrint("✅ Product loaded: ${response.productDetails.first.title}"); } The response we get is, flutter: Check: Instance of 'ProductDetailsResponse' flutter: ❌ Responses: [] flutter: ❌ Responses: 0 flutter: ❌ Not found: [com.company.xyz.basic1m] Note: We are testing with a real device iphone 13 mini via Xcode. We tried to test using, ''com.apple.test.Subscription1.monthly'', as instructed but we have not been successful with that. And seems like (based on online search), it doesn't work all the time. We also searched online for a solution, and some of the forums suggest that we have to submit the app for review when adding subscription for the first time. It doesn't mention the same that in the apple documentation. It confusing. Help and guidance in this regard would be really appreciated.
1
0
91
1w
In App Purchase
I’m facing an issue with In-App Purchases. I’ve completed the setup successfully. I logged in with User A's Apple account on an iPhone and completed a purchase. After that, I logged in with User B's account on the same iPhone. When I try to make the same purchase, I get the following error: “Purchase is a duplicate and will not be reported.” Because the purchase was already made using User A’s Apple ID, I’m unable to make the same purchase again using User B’s account on the same device. Could you please guide me on how to handle this situation?
5
0
97
2w
Failed to get productIdentifier from StoreKit
I am currently developing an auto-renewal subscription in-app purchase for my app. Currently, the subscription items have already been approved in appStoreConnect, and the .store file is synced with appStoreConnect, so the subscription items are displayed well and the test is also progressing well. However, when I build without using the .store file to perform sandbox testing, the subscription items do not appear and response.invalidProductIdentifiers appears. Is there anything I need to do additionally so that the subscription items can appear in response.products? ps. The bank account item in the contract is in 'processing' status, and the paid app contract status is 'waiting for user information'.
1
0
82
2w
Subscription Cancellation
Hi Team, I’ve successfully implemented the subscription flow for my app. However, I’m currently facing challenges related to testing the cancellation behavior for auto-renewable subscriptions. Specifically: I’m unable to locate the correct payload structure for the following test endpoint: https://api.storekit-sandbox.itunes.apple.com/inApps/v1/notifications/test I’m also unclear on how to simulate or complete the full lifecycle of a subscription (including cancellation) using Apple’s sandbox environment or APIs. Could you please guide me on how to: Retrieve or construct the proper payload for the test notification API? Simulate a cancellation flow end-to-end in the sandbox for auto-renewable subscriptions?
0
0
40
May ’25
In-app purchase for auto-renewals subscription for sandbox
Dear Apple Support Team, We are currently implementing auto-renewable subscriptions in our iOS app and are testing the integration using the sandbox environment. On the iOS app side, the in-app purchase flow completes successfully and displays a "Purchase Successful" message. However, we are not receiving any server notification callbacks on our configured App Store Server Notifications (Sandbox) webhook URL. For your reference, the webhook URL we have set in App Store Connect (Sandbox) is: https://9c0f-182-79-123-254.ngrok-free.app/ios/webhook Despite successfully completing a subscription purchase in the sandbox, there is no evidence that the webhook is being triggered. We would appreciate your guidance in resolving this issue or confirming if there are any additional configurations or steps required on our end.
3
1
124
May ’25
Unable to get product from storekit in productRequest method.
We’re encountering a problem with StoreKit in the sandbox environment. During an SKProductsRequest, some or all of the product identifiers provided are being returned in the invalidProductIdentifiers array of the SKProductsResponse, despite being valid and already approved. This behavior began occurring since last 2 days only and appears to be intermittent—in some cases, a product identifier that initially fails will succeed after one or two retries, without any changes on our end. What we've verified: All product identifiers are correctly configured and approved in App Store Connect. No recent changes have been made to our product configuration. The same product identifiers have previously worked without issue. We would appreciate any assistance in identifying the root cause of this behavior. Please also let us know if there is a known issue currently affecting StoreKit sandbox services. Thank you for your support.
1
10
261
May ’25
Facing the same error
We were facing the same error yesterday and tried many different solutions, but none of them worked. However, today the issue resolved itself and everything is working properly now. The issue we were facing was: #1. not getting any product in didReceive method of storekit. #2. it was working sometimes (i.e. if we try 3 times then 1 time we were getting the product
2
3
104
May ’25
TestFlight Subscription Upgrade Handling
Looking for assistance in managing subscription upgrades for TestFlight users. I have a few monthly subscriptions, 30days, each with a different set of available features, 1 with all, and 1 with fewer. (All are in proper order and grouped in App Store connection subscriptions) subscribing seems to be working fine, and purchasing an upgrade is going ok. what is not: reflecting the upgraded plan in app (currently reflects it will start in 30days when current subscription expires) I’m lead to believe this will be resolved with a live app in App Store, that will then handle prorating, terminate the old plan and immediately start the new one. looking for help getting TestFlight to show immediate upgrades.
0
0
56
May ’25
Unable to process your request. Please try again later
I'm trying to test my IAP in sandbox to ensure that it's functioning, but a few hours ago, I started getting the message, "Unable to process your request. Please try again later" in sandbox. Is anyone else getting this error? Below is the error in the console: Purchase did not return a transaction: Error Domain=SKServerErrorDomain Code=0 "(null)" UserInfo={developerErrorMessage=An unknown error occurred., developerErrorCode=5000000} Note: My App ID and Product ID are correct, the IAP is live on the App Store, and the product is recognized in sandbox. I'm trying to push an update tonight, but won't be able to unless this is resolved.
2
3
254
May ’25
StoreKit 2 Fails to Load Subscription Products
We are experiencing a critical issue where StoreKit 2 is returning empty products when using Product.products(for:), specifically on devices running iOS 18.4.

 This issue does not occur on iOS 18.3 or earlier.

 Steps:

 Created a subscription product (e.g. "upm1") in App Store Connect
 Confirmed the product is active, localised, and part of a valid subscription group
 Call the following Swift code using StoreKit 2:
 Task { do { let products = try await Product.products(for: ["upm1"]) print(products) } catch { print("Error: (error)") } } 4. Result: products is an empty list.

 This regression is blocking subscription testing on iOS 18.4. 

 Kindly someone please advise on a potential fix or workaround.
1
1
161
Apr ’25
Testing In-App Purchases
Hi, I have a couple of questions in regards to testing in-app purchases. I tested the subscription on a device but I'm not sure how to reset so I can test again. I didn't see the subscription in device settings or in Debug -> StoreKit -> Manage Subscriptions window. Additionally, I was wondering if there was a way to detect the subscription being made. I implemented this, but I'm not sure if that will work: .onChange(of: Product.SubscriptionInfo.RenewalState.subscribed) { if Product.SubscriptionInfo.RenewalState.subscribed == .subscribed { } }
8
0
122
1w