Hello, I'm currently experiencing issues with IAP subscription setup.
The following error appears:
"Billing Problem, There was a problem with your subscription renewal. To resolve, turn on Allow Purchases & Renewals, or leave off to test failed in-app purchase attempts and subscription renewals."
I'm testing with a sandbox account, and automatic subscription renewal is turned on in the sandbox settings.
A notification screen appears at the OS level, and consequently, a DID_FAIL_TO_RENEW error occurs on our payment server.
I cannot determine the cause at all, so I would appreciate your assistance in checking this issue.
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
Regarding App Store Server Notifications V2,we are currently using Notifications V2 in a production environment.
It is set up so that if the server receives the notification successfully, it returns 200 after about 30 seconds, and if an error occurs, it returns 400 or 500.
However, the notification is being resent multiple times from Apple's server, at 1 hour, 12 hours, and 24 hours.
Is it necessary to return the notification using Apple's API?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
App Store Server Notifications
App Store Server API
I just converted my App to Freemium, but the method is used to give user, that bought the App before it was free, access to the paid futures seems not to be working.
I am getting the original Purchase Date from the AppTransaction (https://developer.apple.com/documentation/storekit/apptransaction/originalpurchasedate) and comparing that to a set date where the App Model changed. In Test Flight this is working without any Problems but on the Live System, users that have purchased the App do not get access!
let shared = try await AppTransaction.refresh()
if case .verified(let appTransaction) = shared {
result(appTransaction.originalPurchaseDate.ISO8601Format()).
}
I am using flutter to develop the App and the result()... send the string back to the flutter side.
Here is the code of the Flutter side:
Future<void> restorePurchases() async {
SubscriptionProvider().updatePayment(PurchaseStatus.pending);
await InAppPurchase.instance.restorePurchases();
if (Platform.isIOS) {
DateTime changedToFreemium = DateTime.utc(2025, 4, 7, 11, 0, 0);
String? purchaseDateRaw = await IosFlutterChannel().getOriginalPurchaseDate();
if (kDebugMode) {
print("Purchase Date Raw: $purchaseDateRaw");
}
if (purchaseDateRaw != null) {
DateTime purchaseDate = DateTime.parse(purchaseDateRaw);
if (purchaseDate.isBefore(changedToFreemium)) {
if (kDebugMode) {
print("Restoring legacy purchases");
}
SubscriptionProvider().update(true, SubscriptionStatus.active, SubscriptionType.fs_lifetime);
} else {
if (kDebugMode) {
print("Not restoring legacy purchases");
}
}
}
}
SubscriptionProvider().updatePayment(PurchaseStatus.purchased);
}
Console Log when running in Test Environment:
flutter: Purchase Date Raw: 2013-08-01T07:00:00Z
flutter: Restoring legacy purchases
Thanks!
I am unable to sign in to a Sandbox Apple Account, where this issue occurs only via Simulator.
Under Settings > Developer, I tap "Sign In" under Sandbox Apple Account. I enter my account credentials, and after bringing me back to the Developer page, the Sign In button briefly appears as disabled, before being re-enabled, without signing in to the account. (The account credentials are also recognized as correct, as I will receive an alert popup if incorrect.) See screenshots below:
After signing in, Sign In button appears disabled...
... then is re-enabled without actually signing in to the account.
I have now tried setting up multiple sandbox accounts via App Store Connect with various permutations (no confirmation of Apple Account email, confirming Apple Account email, logging in to iCloud and accepting terms of service), running different device simulators, running simulators on different Mac computers... none of which yield a different result.
By contrast, I can sign in to the Sandbox Apple Account without issue on a physical device. The problem occurs only via Simulator.
Hi
To test SkAdNetwork, I installed the profile from the documentation (https://developer.apple.com/documentation/storekit/testing-ad-attributions-with-a-downloaded-profile) on my ios device.
and turned off and on Allow Apps to Request to Track to change the idfa value.
In this state, I installed the app (bundle id: id436731843) using SKAdNetwork with the following values at April 8th AM 01 (UTC)
SkAdnetwork version: 3.0
fidelity
fidelity=0, nonce=b3346a51-f7b5-42a2-a508-775a62317c83, timestamp=1744076349671, signature=...
fidelity=1, nonce=b3346a51-f7b5-42a2-a508-775a62317c83, timestamp=1744076349672, signature=...
itunesitem=436731843
network=87u5trcl3r.skadnetwork
sourceapp=1220307907
I was hoping to get a postback after , but after a day, the postback is still not delivered.
Any idea why the postback is not delivered?
Thank you
Topic:
App & System Services
SubTopic:
StoreKit
We sell magazines through a third party app platform called Pocketmags and our website. The magazines have Print, Digital and Combo options available for purchase. Also, this third party app provides the platform to read the digital version of the magazines.
Once a user buys a subscription on the website, he/she receives the email with the login information on PocketMags, where he registers his login details and can start reading his subscription. With us, the customer shares his billing/shipping address along with their email id while they make payment.
Now we have our own app where through which we want to sell these magazines and have to integrate In-App purchase for selling these digital subscriptions. How do we send the 3rd party subscription access details on email to the user if they do in app purchase?
I get crash reports which I can't reproduce when trying to present an SKStoreProductViewController :
Fatal Exception: UIApplicationInvalidInterfaceOrientation
Supported orientations has no common orientation with the application, and [SKStoreProductViewController shouldAutorotate] is returning YES
No matter what app Deployment info orientation I try I can't get my SKStoreProductViewController shouldAutorotate property to return YES. It is always false.
Does anyone knows why or how to get an SKStoreProductViewController to return shouldAutorotate YES?
Topic:
App & System Services
SubTopic:
StoreKit
My server's access to Apple's payment interface (buy. itunes. apple. com/verifiyReceipt) has been unresponsive since the end of March, and I have been searching for a long time without finding any issues. Normally, even if the data is incorrect, there is still a {"status": 21000} response. We are using Alibaba Cloud's virtual servers here. I don't know if Apple has made any adjustments to the interface. If anyone has encountered this problem, please kindly help to answer it. Thank you all.
Topic:
App & System Services
SubTopic:
StoreKit
Hi,
Currently, instead of using a real device and test account for in-app purchase testing, we are using Products.storekit with the Simulator.
Our app offers a subscription plan with a 3-day free trial.
We would like to simulate the following test scenarios:
User cancels the subscription within the 3-day free trial period.
User cancels the subscription after the 3-day free trial period.
However, in Xcode, under Debug > StoreKit > Manage Transactions..., we couldn’t find an option to simulate a subscription cancellation.
There is an option to refund the purchase, but we believe this is not the same as a cancellation.
Do you have any idea how we can simulate these two cases using Products.storekit and the Simulator?
Thanks in advance!
Hello,
Having bad times with Development Postback copies receival on our custom server.
Current setup:
App is configured to be advertised (https://developer.apple.com/documentation/adattributionkit/configuring-an-advertised-app)
AdAttributionKit - Opt in for Reengagement Postback Copies ✅
AdAttributionKit - Postback Copy URL ✅
AdAttributionKit - Ad Network Identifiers ✅
Configured backend https://{name}.com/.well-known/appattribution/report-attribution/ (POST) ✅
Devices with iOS 18.4 (with Postaback Development tool and AdAttribution developer mode Enabled)
Tried different Postback setup combinations, with different app builds (debug, release installed from xcode/testflight) and with AdAttribution developer mode Enabled/Disabled - doesn't make any difference.
Console log:
Found 0 postbacks eligible for transmission for environments:
Any advise is very much appreciated
I don't know why the subscription doesn't work in production, the message Subscription Unavailable appears. The subscription is approved in appstoreconnect.
Works normally using storekit in xcode, both signing and using subscriber features.
According to apple's guidance, first I do the test to validate https://buy.itunes.apple.com/verifyReceipt and then https://sandbox.itunes.apple.com/verifyReceipt.
Plus I create the app-specific shared secret and put it in the code to validate the receipts.
I have looked for several topics and I can not solve this problem. What do I need to do to make it work in production? I believe I did what's in the official documentation.
I would like to know whether and how people are getting the sandbox account > manage > clear purchase history feature to work. I clear purchase history (either on my device or at app store connect), and I delete my app from my device. I then run my app from Xcode on my device, and it detects at launch the existence of the purchase, and so I cannot test my purchase user interface. Does this thing actually work as advertised?
Dear community,
Context
My company operates in the European Union, where not so long ago there appeared the possibility to accept an ["Alternative Terms Addendum for Apps in the EU"] (https://developer.apple.com/contact/request/download/alternate_eu_terms_addendum.pdf), which, among others, gives us the possibility to use an alternative payment provider, other than Apple's In App Purchase PSP system (ref: Apple docs). My company did accept it and was granted the StoreKit External Purchase Entitlement (com.apple.developer.storekit.external-purchase) entitlement, with which we integrated a different PSP, so now we want to incorporate the reporting to Apple's External Purchase Server API. We are currently integrating with the External Purchase Server API and have encountered a couple of issues I would appreciate clarification on:
Question 1
Is there a way to retrieve an overview or summary of the current subscription states on Apple’s servers as a result of the submitted reports to External Purchase Server API? Specifically, I would like to verify the expected outcomes before the monthly invoice is issued by Apple and to understand the subscription states for the test users I used during this process and for future reference as well.
Question 2
In one scenario, I initiated a one-year subscription, and in the middle of its period, I submitted a RENEWAL for one month with a higher price.
I expected the request to fail due to overlapping periods and/or pricing conflicts, but both submissions were accepted without error.
Do you have an idea about:
What happens at the end of the renewed month?
Will the subscription continue with the renewed (higher) amount, revert to the original (lower) annual rate, or be canceled?
Where can I view the final state and billing plan for that subscription?
Thank you for your assistance, we are looking forward for any kind of help or information regarding this topic.
Hello,
I hope to find out more about how AppTransaction works on macOS, specifically about its internet connection requirements: if I use this to validate that the app is a legit purchase from the Mac App Store, I would not want it to have an always-on requirement just to validate.
Does AppTransaction require the user to always be online for AppTransaction.shared ?
When an app is downloaded from the Mac App Store, is the data needed for AppTransaction automatically embedded during that download, or is that data downloaded upon first launch of the app, therefore requiring an internet connection at launch time?
Once the data/receipt has been downloaded by AppTransaction, is it cached until the app's next update, or is it cleared at some time during the version's life and needs to be re-downloaded, therefore requiring an internet connection at launch?
Where is that receipt/data stored?
Also, if you don't mind me sneaking in this non-related but sort of related question, in terms of receipt validation:
Does macOS Sequoia's MAC address rotation feature affect receipt validation in any way when using IOKit?
Thank you kindly,
– Matthias
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
macOS
StoreKit
App Store Receipts
Mac App Store
I'm using Swift to verify receipts in myObjective C Mac Application using the following code:
@objc
class MyAppTransaction: NSObject{
@objc
class func checkReceipt() async -> String {
do {
let verificationResult = try await AppTransaction.shared
switch verificationResult {
case .verified(_):
return "VERIFIED"
case .unverified(_, _):
return "NO RECEIPT"
}
} catch {
return "ERROR" //(StoreKit.StoreKitError) unknown
}
}
}
Starting today with my upgrade to Sequoia 15.4 and XCode 16.3 receipt validation is broken. The function is going to the catch and returning "ERROR" I can't set a break point in the do {} but if I set one at the return "ERROR", in the debugger error = (StoreKit.StoreKitError) unknown. the Compiler logs an error:Failed to parse AppTransaction: missingValue(for: [StoreKit.AppTransaction.Key.appTransactionID], expected: StoreKit.BackingValue). Reading the developer documentation I can't find anything about these struct members.
I tried to use refresh() to get a receipt like I used to with exit(173) but the compiler says refresh () not found.
This is extremely troubling because I can't debug my receipt validation code and I don't know if this will happen to my users.
Do I just have to trust Apple that my users will have an application with a receipt attached?
What can I do?
Dear Apple Support Team,
Hello!
I am currently developing the in-app subscription functionality using Apple IAP API and have encountered a serious technical issue while processing subscription data. I would like to report this issue to you.
Issue Description:
When calling the subscription API endpoint, the same OriginalTransactionId returns inconsistent results. Specifically, a particular transaction ID (let's call it TransactionId_A) should belong to the subscription order with OriginalTransactionId_A, but it is currently incorrectly associated with OriginalTransactionId_B. This issue severely affects our ability to accurately manage and process subscription data.
Here are the relevant log details for your reference:
API Endpoint Requested:
https://api.storekit.itunes.apple.com/inApps/v1/subscriptions/{TransactionId_A}
(Note: The link is a placeholder for the actual API endpoint.)
Log Information on February 21, 2025, at 09:40:09:
{
"AppAccountToken": "{AppAccountToken}",
"BundleId": "{BundleId}",
"Currency": "CNY",
"Environment": "Production",
"ExpiresDate": {ExpiresDate},
"InAppOwnershipType": "PURCHASED",
"IsUpgraded": false,
"OfferDiscountType": "",
"OfferIdentifier": "",
"OfferType": 0,
"OriginalPurchaseDate": {OriginalPurchaseDate},
"OriginalTransactionId": "{OriginalTransactionId_A}",
"Price": {Price},
"ProductId": "{ProductId}",
"PurchaseDate": {PurchaseDate},
"Quantity": 1,
"RevocationDate": 0,
"RevocationReason": 0,
"SignedDate": {SignedDate},
"Storefront": "CHN",
"StorefrontId": {StorefrontId},
"SubscriptionGroupIdentifier": "{SubscriptionGroupIdentifier}",
"TransactionId": "{TransactionId_A}",
"TransactionReason": "PURCHASE",
"Type": "Auto-Renewable Subscription",
"WebOrderLineItemId": "{WebOrderLineItemId}"
}
Log Information on March 21, 2025, at 09:38:49:
{
"AppAccountToken": "{AppAccountToken}",
"BundleId": "{BundleId}",
"Currency": "CNY",
"Environment": "Production",
"ExpiresDate": {ExpiresDate},
"InAppOwnershipType": "PURCHASED",
"IsUpgraded": false,
"OfferDiscountType": "",
"OfferIdentifier": "",
"OfferType": 0,
"OriginalPurchaseDate": {OriginalPurchaseDate},
"OriginalTransactionId": "{OriginalTransactionId_B}",
"Price": {Price},
"ProductId": "{ProductId}",
"PurchaseDate": {PurchaseDate},
"Quantity": 1,
"RevocationDate": 0,
"RevocationReason": 0,
"SignedDate": {SignedDate},
"Storefront": "CHN",
"StorefrontId": {StorefrontId},
"SubscriptionGroupIdentifier": "{SubscriptionGroupIdentifier}",
"TransactionId": "{TransactionId_A}",
"TransactionReason": "PURCHASE",
"Type": "Auto-Renewable Subscription",
"WebOrderLineItemId": "{WebOrderLineItemId}"
}
From the above logs, it is evident that the same transaction (TransactionId_A) returns different OriginalTransactionId values at different times, which is clearly not expected and severely impacts our ability to correctly process and manage subscription data.
I hope you can address and investigate this issue as soon as possible. If you need any further information or assistance, please feel free to contact me. Thank you for your support!
Best regards!
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
In-App Purchase
App Store Server Notifications
App Store Server API
Strange issue with currency display in subscription products
Hi everyone,
I'm facing a strange issue in my app where I use a subscription-based in-app purchase model.
The products I created in App Store Connect are all in "Approved" status.
I've tested with both RevenueCat and StoreKit, but the result is the same.
Here are the products being loaded:
Product loaded: weekly_product_id
Display name: Weekly Pro
Description: Weekly Pro Subscription
Price: ₺229,99
Product loaded: annual_product_id
Display name: Annual Pro
Description: Annual Pro Subscription
Price: ₺1.799,99
Even though I can see the correct prices and currency (Turkish Lira) in the Xcode debug console, on my real device the currency appears as Philippine Peso, as shown in the attached screenshot.
Interestingly, in the iOS simulator, it's displayed in USD.
I've double-checked and my device's region settings are set to Turkey.
Any ideas on what could be causing this? And more importantly, how can I fix it?
Thanks in advance!
Hi everyone,
I’m facing a recurring issue with my macOS app being rejected during App Store review, and I’d really appreciate any guidance.
The subscription flow in my app is implemented using StoreKit, and everything works perfectly in our development environment using a StoreKit configuration file. It also behaves as expected in Sandbox testing and TestFlight — I even had few beta testers confirm that the subscription information is displayed correctly and the purchase flow completes without issues.
All required subscription details are configured in App Store Connect:
• Subscription duration and the description of the services offered
• Price and price per unit where applicable
• Paid apps agreement and related forms are correctly filled
However, when the app is submitted for review, the subscription screen fails to display the expected information. From what I can tell, the product information fails to load from the App Store in the review environment — even though everything is working fine on our side.
We’ve already submitted a video to Apple showing the subscription UI working in the Sandbox environment, but the app continues to be rejected under guideline 3.1.2 due to missing subscription info in the binary.
Is anyone else experiencing similar behavior during review? Could there be a caching issue or delay in StoreKit syncing for newly configured products?
Any help or suggestions are very welcome. Thanks in advance!
I am using StoreKit 2 for my products and noticed that users from Ukraine (for example) receive a wrong Product.displayPrice.
The App Store works with USD but shows the local currency UAH.
Any chance to display the correct currency (USD)?
Topic:
App & System Services
SubTopic:
StoreKit
Hi there,
We have an app targeted for children and we want to use the SkAdNetwork to track installs for campaigns.
We don't want to track further in-app events (purchase etc.), just the install event.
We added the SDK to our Unity app, listed the network identifiers in the plist file, configured the external campaign according to their instructions, but struggle to see any events for several weeks now.
We see the following logs in the app:
Registering install attribution pingback.
Failed to migrate Install Attribution database schema from 17001 => 17400.
SkAdNetwork: No pingbacks found while attempting to register/update.
Error setting install attribution pingback registered for app: 1509727806, error: Error Domain=ASDErrorDomain code=1208
How can we debug this further? What does the error mean?
Thank you very much!
(I hope I posted in the correct forum topic. Apologies if not)
Topic:
App & System Services
SubTopic:
StoreKit