I would like to inquire about the originalTransactionId of StoreKit2.
Users who purchase auto-renewal subscription products
To re-purchase the same subscription item after cancellation and prior to refund
If you receive a refund after cancellation and re-purchase the same subscription item
If you do not renew immediately after expiration and re-purchase the same subscription after a long period of time
I would like to ask if 1, 2, and 3 all use the same value as the original Transaction Id at the initial subscription.
In the case of 3, if you re-purchase more than a few days after the last subscription purchase, please let me know if there are any detailed conditions such as the original Transaction Id not maintained.
StoreKit
RSS for tagSupport in-app purchases and interactions with the App Store using StoreKit.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
We previously had a non-renewing subscription. I think we remove it. However, the subscription is still listed on the app's page in the App Store. How can I remove this mention?
The availability is still checked for all countries.
Thanks,
Cody.
I try to access the AppDistributor.current (using try await) and the property never seem to return nor throw.
The code I'm using looks like this:
do {
print("accessing current")
let current = try await AppDistributor.current
print("current obtained")
switch(current) {
case .appStore:
return "AppStore"
default:
return "Unknown"
}
} catch {
return "Exception: \(error)"
}
But the log only shows the accessing current and never the current obtained. Trying to step in the property starts with some assembly, but at some point, the debugger just never returned. I join a full Swift file of a sample test I'm using:
SwiftMarketplaceTests.swift
Topic:
App & System Services
SubTopic:
StoreKit
I'm using code similar to the following to conditionally show the SubscriptionStoreView and the .storeButton(.visible, for: .restorePurchases) modifier is used to allow the user to restore an existing subscription.
How can I listen for events that would allow me to close this view once the subscription is restored?
The .onInAppPurchaseCompletion closure does not handle this and it also appears that listening for results in Transaction.currentEntitlements also doesn't handle the fact that a subscription is restored.
Any guidance on how to determine if the subscription has been restored would be greatly appreciated.
Finally, how can this be tested effectively in both TestFlight and in Xcode with the simulator.
if subscriptionManager.subscription == .none {
SubscriptionStoreView(groupID: "1234567") {
SubscriptionMarketingView(transparency: false)
.containerBackground(for: .subscriptionStoreFullHeight) {
GradientBackground()
}
}
.backgroundStyle(.clear)
.storeButton(.visible, for: .restorePurchases)
.storeButton(.visible, for: .redeemCode)
.onInAppPurchaseCompletion { product, result in
Task {
await subscriptionManager.entitlements()
}
}
}
Hello,
I noticed the Product.SubscriptionInfo subscriptionPeriod (of type Product.SubscriptionPeriod) is different for the same product between StoreKit Testing in Xcode and the sandbox/App Store (production) environment.
For a “1 week” auto-renewable subscription, we get the following:
StoreKit Testing in Xcode: 1 week gives a subscriptionPeriod with value of 1 and a unit of Product.SubscriptionPeriod.Unit.week
Sandbox/App Store: 1 week gives a subscriptionPeriod with value of 7 and a unit of Product.SubscriptionPeriod.Unit.day
This created issues in my app because I used the localizedDescription of a Product.SubscriptionPeriod to display a text similar to “$4.99 per week”. This is what I obtain with the StoreKit Testing in Xcode, but in the Sandbox/App Store environment, it displays “$4.99 per day” (because the subscriptionPeriod is “7 Days” and the unit is then .day). Obviously, this is not what I wanted to display.
Other periods like “1 month”, “2 months”, “3 months”, “6 months, and “1 year”, the period provided by both StoreKit Testing and Sandbox/App Store correspond to the period unit specified in App Store Connect.
In addition, I want to report that for a weekly subscription/offer or a 2 weeks offer, Product.SubscriptionInfo.subscriptionPeriod or Product.SubscriptionOffer.period == .weekly or .everyTwoWeeks is always false.
We observe the following:
With Sandbox or App Store live production:
1 week, Product.SubscriptionInfo.subscriptionPeriod == .weekly is false (because it’s “7 days”)
1 week, Product.SubscriptionOffer.period == .weekly is false (because it’s “7 days”)
2 weeks (offer), Product.SubscriptionInfo.subscriptionPeriod == .everyTwoWeeks is false (because it’s “14 days”)
2 weeks (offer), Product.SubscriptionOffer.period == .everyTwoWeeks is false (because it’s “14 days”)
But with an Xcode StoreKit configuration file:
1 week, Product.SubscriptionInfo.subscriptionPeriod == .weekly is true (because it’s “1 week”)
1 week, Product.SubscriptionOffer.period == .weekly is true (because it’s “1 week”)
2 weeks, Product.SubscriptionInfo.subscriptionPeriod == . everyTwoWeeks is true (because it’s “2 weeks”)
2 weeks, Product.SubscriptionOffer.period == . everyTwoWeeks is true (because it’s “2 weeks”)
So in sandbox and production, .weekly and .everyTwoWeeks is never possible.
If someone from Apple could check the feedback FB19605865 🙂
Thank you
Regards,
Axel, @alpennec
Code:
do {
let productIDs: [String] = ["revenueSocks_weekly_trial"]
let products: [StoreKit.Product] = try await Product.products (for: productIDs)
let weeklySubscription: StoreKit.Product = products.first!
let displayPrice: String = weeklySubscription.displayPrice
// For a weekly subscription in App Store Connect
// With an Xcode StoreKit configuration file: subscriptionPeriod unit is Week (week), value is 1 → "1 Week"
// With the Sandbox + App Store: subscriptionPeriod unit is Day (.day), value is 7 → "7 Days"
let unitString: String = weeklySubscription.subscription!.subscriptionPeriod.unit.localizedDescription
print("\(displayPrice) per \(unitString.localizedLowercase)")
// StoreKit configuration file → "$4.99 per week"
// Sandbox + App Store → "$4.99 per day"
} catch {
print(error)
}
We have a user that has an active subscription according to the appstore in our product but it is registering as expired. Hitting the subscribe button in the SwiftUI SK2 dialog does nothing, meaning, nothing happens.
Any ideas?
Topic:
App & System Services
SubTopic:
StoreKit
Hi everyone,
I’m implementing subscriptions using StoreKit v2, and I’ve noticed a behavior change starting with iOS 26.1.
I’d like to ask if anyone else has experienced the same issue.
■ Issue
Immediately after purchasing a new subscription,
the value of auto_renew_status (or autoRenewStatus) returned in the receipt is 0 (auto-renew OFF).
This issue occurs on iOS 26.1.
On iOS 26.0 and earlier, the same parameter returned 1 (auto-renew ON) right after purchase.
Sometimes, after executing a “restore” operation, the value changes to 1 later.
Since we’ve been using this parameter to determine whether a user’s subscription is active or not,
the current behavior is causing some difficulties on our end.
■ Questions
Has anyone else observed this issue (where autoRenewStatus is 0 immediately after purchase on iOS 26.1 or later)?
How are you handling or working around this behavior in your implementation?
If autoRenewStatus is unreliable, we’re considering determining the subscription state based on receipt fields instead.
Would this approach be reasonable?
"status" is 1 (indicates active subscription)
"expire_time" is in the future
"deleted_at" is null
If anyone has encountered the same behavior or knows of any Apple-recommended implementation approach,
I’d really appreciate your insights.
Thank you! 🙏
Is the following subscription cancellation flow possible for an iOS in-app subscription?
(Note: This is during the feature planning stage, not actual app deployment.)
Planned user flow:
User taps the “Cancel Subscription” button
Display a “Wait a moment!” screen showing how much the user has enjoyed BFLIX content (to encourage retention)
User taps “Proceed to Cancel”
Collect cancellation reason from the user
Redirect the user to the Apple subscription management page to complete cancellation
Can this flow be implemented under Apple’s current in-app purchase and App Store Review guidelines?
Topic:
App & System Services
SubTopic:
StoreKit
💬 Post Content
Hello everyone,
I’m currently testing In-App Purchases (auto-renewable subscriptions) for my iOS app,
and I’m experiencing an issue where the product information cannot be fetched from StoreKit.
❓ Questions
For sandbox testing, is it absolutely necessary to submit a new app version for review (with the in-app purchase included)? Or can I test subscriptions without submitting a new build to App Review?
Under what conditions does the error
IAPError(code: storekit_no_response,
source: app_store,
message: StoreKit: Failed to get response from platform.)
🧪 What I’ve Tried
• Confirmed that the bundle identifier matches the App Store Connect record
• Verified that In-App Purchase capability is enabled in Xcode
• Ensured the sandbox tester account is logged in (Settings → App Store)
• Removed the StoreKit configuration file to use the sandbox environment
• Tried both real device and simulator (same error)
• Accepted the Paid Apps Agreement in App Store Connect
• Products are created but currently not yet submitted for review
🔍 Environment
• App type: iOS app built with Flutter (using in_app_purchase plugin)
• Build type: Archive build installed via Xcode (Run on device) and testFlight
• StoreKit Configuration File: Currently removed (for sandbox test);
• Status: Ready to submit in App Store Connect
Topic:
App & System Services
SubTopic:
StoreKit
While testing an inapp purchase, if you purchase the same product twice from an account that does not have testflight permissions for the project and only has sandbox permissions, the second payment will receive the same transactionId as the first.
Why is that so? I know transactionID is unique.
Our app server has subscription feature and processes purchase life cycles based on App Store Server Notification v1.
Last year, when users purchased subscriptions during the following timeframe, we received "INITIAL_BUY" notifications with "unified_receipt.Latest_receipt_info.purchase_date" set to future date(approx. 1 hour after the actual purchase).
2024-11-03 08:00:00 - 2024-11-03 09:00:00 Etc/GMT (UTC)
For example, we received the following v1 notification at 2024-11-03 08:36:33 Etc/GMT.
"notification_type": "INITIAL_BUY"
"unified_receipt.latest_receipt_info[].purchase_date": "2024-11-03 09:36:02 Etc/GMT"
Our server grants subscription entitlement based on "purchase_date" so the users had to wait 1 hour before the subscription features became available.
The timeframe coincided with the end of daylight saving time in the U.S., so we assume that it affected the behavior, but our country doesn't adopt daylight saving time.
We have some questions regarding this behavior.
In countries without daylight saving time, how should we handle such notifications with future purchase date in order to properly grant subscription entitlement?
In App Store Server Notification v2, could purchase date be set to future date at the end of daylight saving time in the U.S., just as in v1 notifications?
JWSTransactionDecodedPayload.purchaseDate
When I test subscibe in sandbox,IOS says this transaction need to request parent’s approval。But this is a sandbox account,it don't have any family members
My app offers auto renewable subscriptions,
I have couple of questions regarding how to model the subscriptions at server side,
Is originalTransactionId will ever change for a subscription? Will it stay same in case of subscription upgrade/downgrade/crossgrade? If it changes on product change then how do i keep track that the subscription was a continuous subscription and not a new one?
Is the webhook payload contains any identifier of which apple account purchase the subscription?
I am having issues maintaining sync between the app account's current subscription and the local apple account's subscription, is there any doc regarding this? Will be really helpful
When simulating a Storekit error like an invalid device verification or others of that type, should we finish a failed transaction? When I test with a Storekit configuration file, all failed transactions persist after every restart. The Apple-provided sample code for Storekit 2 has transactions finished only when they are successful.
Hello,
I’m facing an issue with auto-renewable subscriptions in my React Native iOS app using react-native-iap.
Before App Store approval, everything worked perfectly — I could test in-app purchases and subscriptions locally on my iPhone through Xcode using a development build and sandbox tester.
After the app was approved and released on the App Store, I needed to make some updates. Now, when I build and run the same project again through Xcode (Debug, development-signed) on my iPhone, the subscriptions no longer load.
The same product IDs are approved and live in App Store Connect.
The live version on the App Store works fine (subscriptions load and process successfully).
But on the local Xcode build, getSubscriptions() returns invalid product identifiers or an empty list.
No changes were made to the bundle ID or product IDs
The build is signed with an Apple Development certificate and uses the same team and bundle identifier as the published app.
“In-App Purchase” capability is enabled.
I’ve also tried deleting the app, rebooting the device, and re-logging into a sandbox tester account, but the issue persists.
It looks like the sandbox environment no longer works for the app after its first App Store release.
Has anyone experienced this issue where the same approved app’s IAPs work in production but fail to load in sandbox/dev builds through Xcode after release?
Any guidance on re-enabling sandbox testing for updates would be greatly appreciated.
Environment:
Xcode 26.0.1
React Native with react-native-iap
Auto-renewable subscriptions (3 SKUs)
Thank you!
hI, I’m looking for some clarity on the rules around in app purchasing, so I play a game with in app purchases that you have random odds of getting items out of loot boxes, they split the loot into sections, so featured, mega rare, rare and common. for each of these sections they give a % chance that they show of what chance you have to get an item out of that section, I.e featured is 1.24% and common is 74% ect.
my question is should they then have to display the odds of what each item has in those sections as well or is it good enough just to have the sections with % chance? So each section could have 10 items in, should those items have a % next to as well?
any advice you can give with this would be appreciated, if needs be I can send picture examples of what I’m explaining
We've been approved for the Advanced Commerce API. After receiving the approval, we completed the initial setup requirements (submitted a generic product ID and shared our subscriptions page deep link).
When testing the Migrate Subscription to Advanced Commerce endpoint in the sandbox, we receive a 5000000 error.
What could be the reason/s for it? There is no information, and the API call we make includes all required parameters. Could it be related to the fact that our new generic product ID status is "Missing Metadata"? Is there a way to understand what the issue is on Apple's side?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
In-App Purchase
App Store Server API
Advanced Commerce API
In all the illustrations of win-back offers, I see an example of "Get 3 months off, then $X/month", as seen below.
First, I'm not exactly clear how each configuration translates into an actual offer in practice:
If I want to offer 3 months off on an annual subscription, ie. only if the user pays for the annual offer (basically a 25% discount), is that possible?
If I set a "Free" type, of 3 months, I guess that would allow the user to cancel before paying for the annual, correct?
If I set a "Pay up front" type, with a 25% discount, how would that show up to the user on the App Store?
Secondly, is eligibility to an offer determined by the user elapsing on the same subscription or any subscription in the same subscription group?
Thank you
Hello!
The localization isn't working when using SubscriptionStoreView. The app hasn't been published yet. The subscription has been created and localization strings have been added. Status - ready to submit.
Testing environment: Sandbox
When calling SubscriptionStoreView, the debug console shows this error:
GenerativeModelsAvailability.Parameters: Initialized with invalid language code: ru-RU. Expected to receive two-letter ISO 639 code. e.g. 'zh' or 'en'. Falling back to: ru
Despite this, the subscription interface appears in English when Russian is expected.
I don't use any locale setting for ru-RU anywhere in my code. The test device's region is set to Russia, and the language is Russian.
Any help would be appreciated.
Hi! I’m new in programming apps for Apple Store and I’m creating my first app. I already send my for review but I get an answer of problems with the subs flow. If there’s anyone who can help me fix this problem and implement my subscriptions in my app and test it out I would be thankful, I want the flow work like in the image!