I’m updating an old app which uses StoreKit and hosted in-app purchases (multimedia add-ons).
The original .pkgs are missing and the only known place they exist intact is on Apple’s servers.
The app is able to download and install the IAPs. Is there anyway to save them to the local device?
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
My server receives App Store Server Notification v2 notifications. Recently, it has been receiving notifications for offer codes under offers that have been deactivated. The custom code value may be the same in the active offer as the deactivated offer.
When a user redeems the custom offer code for a deactivated offer, the notification payload's offerIdentifier value now contains the UUID associated with that offer in the URL in App Store Connect
(like https://appstoreconnect.apple.com/apps/my-app-id/distribution/subscriptions/my-subscription-id/pricing/offer-codes/offer-uuid)
The notification payload contains:
{"offerIdentifier": "offer-uuid"}
instead of
{"offerIdentifier": "<My offer identifier from App Store Connect>"}
Is it possible for a deactivated offer to be redeemed? If not, is this a known issue?
We need the actual offer identifier to understand which offers users are redeeming. Is this replacement with a UUID a known issue?
I'm working on my first subscription for an app I've built, and can't seem to figure out where I'm going wrong with this one whether it's something in Xcode or App Store Connect. Any idea where to start? Somethings to check. TIA.
Topic:
App & System Services
SubTopic:
StoreKit
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.
I have a rather simple StoreKitSubscriptionView for my app's single subscription.
Question: Am I expected to write code to handle lack of network connectivity?
When I run the app on development device, not using the local StoreKit configuration but rather the real app store, if the network is not available I get a not-user-friendly error message instead of the normal SubscriptionStoreView content.
I'm uncertain if end-users actually see this. Maybe they see a more appropriate "Cannot connect to App Store, try later" message?
Maybe I am supposed to check for network and not present the view if it is not available. I don't recall any mention of this in the WWDC video but I guess I should check again.
Ideas anyone?
We are currently integrating In-App Purchases for our app and have configured App Store Server Notifications (v2) in the Sandbox environment.
During testing, we observed the following issue:
When a transaction is cancelled, declined, or pending (e.g., Ask to Buy flows or authorization pending),
No App Store Server Notification is sent to our webhook endpoint.
We only receive webhook events where the status is "purchased".
This becomes a critical problem for us because our backend must accurately track transaction states including failed and pending purchases, especially for wallet top-up use cases.
Additionally, we tried mocking failed transactions (via Xcode local environment and turning off In-App Purchases from Developer Settings) to simulate a technical failure scenario.
Even in these cases, no webhook notification was received when the purchase failed server-side.
Is it expected behavior in Sandbox that only successful transactions ("purchased") trigger webhooks?
Are failed or pending transactions suppressed in Sandbox intentionally?
Will webhook behavior be different in Production (i.e., will we receive webhook notifications for failures there)?
Is there any extra configuration or entitlement needed to fully test failure scenarios via webhooks in Sandbox?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
In-App Purchase
App Store Server Notifications
I'm considering developing an app where users can create their own subscription plans by freely setting their prices, similar to YouTube's membership feature.
I understand that in-app purchases must be used to unlock features within the app. With that in mind, I searched for APIs to enable this functionality but couldn't find relevant information.
When I contacted Apple directly, they mentioned that they couldn't provide specific answers unless the app is under review.
If anyone has knowledge about the following points, I would greatly appreciate your response:
Is it possible to implement a feature similar to YouTube's membership using in-app purchase APIs?
If it's not feasible with in-app purchases, is it allowed to use external payment services like Stripe?
How can I get the region region currently used in the macOS App Store? Preferably via Swift libraries, but any command / function will suffice.
The following StoreKit property seems to always return the region for the Apple Account associated with my macOS user.
await Storefront.current?.countryCode
See the Apple docs.
My macOS Apple Account region is US; in the App Store, when I sign into a different Apple Account whose region is GB (UK), Storefront.current?.countryCode continues to return US, not GB (or UK).
I correctly see prices in pounds instead of in dollars, British spelling instead of American spelling, apps listed in my purchased tab for the UK (not the US) Apple Account, and, in the Account Settings dialog, the UK Apple Account email address, billing address & Country/Region set to United Kingdom.
I didn't get any relevant results from the following command lines:
defaults find GB
defaults find UK
defaults find uk-apple-id@example.com
defaults find uk-apple-id
The following didn't change after I signed into the UK Apple Account in the App Store:
$ defaults read com.apple.AppStoreComponents
{
ASCLocaleID = "en-US@calendar=gregorian";
}
Maybe Storefront.current?.countryCode only specifies the country code for the Storefront that will be used for in-app purchases, instead of for purchasing new apps from the App Store; maybe the former is tied to the Apple Account for the macOS user, instead of to the Apple Account for the App Store. If that's the case, what other mechanism can I use to obtain the country code for the App Store storefront?
I have been struggling to test the IAP response but it is returning empty. I am now in the very beginning of one app, and I don't want to submit the contacts and banking and tax stuff that early. are these necessary for even testing IAP results locally? I think it does not make sense if I have to.
While reviewing the Apple Documentation, I came across a potential issue in one of the examples that I believe is worth addressing.
The example appears to compare strings instead of integers, which could lead to unexpected behavior in production environments. Specifically, in the line where originalMajorVersion (a string) is compared with newBusinessModelMajorVersion (also a string) using <:
if originalMajorVersion < newBusinessModelMajorVersion
This comparison performs a lexicographical check rather than evaluating the numerical values of the strings. As a result, strings like "10" would incorrectly be considered less than "2", which is not the desired behaviour when comparing version numbers.
I have reported this via the Feedback assistant (FB16432337) but at the time of posting this there has been no reply at all (23 days)
Supporting business model changes by using the app transaction
do {
// Get the appTransaction.
let shared = try await AppTransaction.shared
if case .verified(let appTransaction) = shared {
// Hard-code the major version number in which the app's business model changed.
let newBusinessModelMajorVersion = "2"
// Get the major version number of the version the customer originally purchased.
let versionComponents = appTransaction.originalAppVersion.split(separator: ".")
let originalMajorVersion = versionComponents[0]
if originalMajorVersion < newBusinessModelMajorVersion {
// This customer purchased the app before the business model changed.
// Deliver content that they're entitled to based on their app purchase.
}
else {
// This customer purchased the app after the business model changed.
}
}
}
catch {
// Handle errors.
}
Topic:
App & System Services
SubTopic:
StoreKit
users download app with Streamlined Purchasing ,but the logic of checking subscription doesn't work. there the code:
func checkSubscriptionStatus() async {
for await entitlement in Transaction.currentEntitlements {
guard case .verified(let transaction) = entitlement else { continue }
if transaction.productID == monthlyProductID || transaction.productID == yearlyProductID {
if transaction.revocationDate == nil && !transaction.isUpgraded {
let activeSubscribed = transaction.expirationDate ?? .distantFuture > .now
if activeSubscribed {
hasActiveSubscription = activeSubscribed
// other operation
}
}
}
}
}
Hello! I am trying to get my app set up to support external payments. The snag I am hitting at the moment is it seems that relevant pages are not accessible?
There is this old EU doc
https://developer.apple.com/support/apps-using-alternative-payment-providers-in-the-eu/
But the more updated US doc titled "Distributing apps in the U.S. that provide an external purchase link - Support" is not available where it should be https://developer.apple.com/support/storekit-external-entitlement-us/
In addition the link for requesting the entitlement seems to be broken
https://developer.apple.com/contact/request/storekit-external-entitlement-us/
Any idea how one can access these? Perhaps this is just a temporary error?
Hi (from France)
I have a MacOS application which handles the App Store receipt by requesting at the url "https://buy.itunes.apple.com/verifyReceipt". From the response, I can know what are the inApps bought by the user and that suits for me.
I don't know if if I must change something in my code accordingly to this TN3118.
Does someone knows the response ?
Best regards.
My app calls Product.SubscriptionInfo.status(for:) to get the subscription status when the app starts.
Users with multiple Apple IDs have reported that every few days they get an unpurchased status, and when I checked that, the Product.SubscriptionInfo.status(for:) result array was empty.
(When the app is restarted, Product.SubscriptionInfo.status(for:) gives the correct result.)
StoreKit.Transaction.currentEntitlements, which is executed immediately after Product.SubscriptionInfo.status(for:), seems to be getting the correct result, so I am trying to check the subscription status with this result.
Is it a bug that Product.SubscriptionInfo.status(for:) returns an empty result for the purchaser?
There is a mismatch between Product.SubscriptionInfo.status(for:) and StoreKit.Transaction.currentEntitlements.
Is it possible for a mismatch to occur?
And In such a case, which result should be adopted?
I am implementing promotional codes for auto-renewing subscriptions in my app. I need to create the codes and have them link to a discounted auto-renewing subscription. So my normal 1 month subscription is $24.99, I would like to offer users (new subscribers and existing/expired subscribers) the ability to enter a promo code that discounts the price of the first month to $4.99, then $24.99 after the initial first month. All users, regardless of whether or not they have has a previous subscription or not should be able to use this code for this discount.
From what I am seeing in documentation, promo codes are only available to users that have had a subscription previously?
Currently I am receiving the response "Offer Not Available" with the error:
<SKPaymentQueue: 0x2815f0d60>: Payment completed with error: Error Domain=ASDServerErrorDomain Code=3904 "Offer Not Available" UserInfo={NSLocalizedDescription=Offer Not Available
I simply do NOT understand why apple engineers have to make something that should be somewhat straightforward, be SO COMPLEX, then when you try to figure out whats going wrong, no meaningful error to troubleshoot. ***
I have tried this on users that have had a previous subscription and still the same error.
Hi everyone,
We’ve encountered an issue in some of our games where IAP purchases made using UPI are going into a pending state. Since these purchases are for consumable items, the rewards are not granted at the time of purchase.
Even after the transactions are eventually confirmed, the rewards still aren't received.
We tested this with two separate UPI transactions, and both resulted in the same pending state issue.
Interestingly, when we tried making a purchase using Apple Wallet afterward, the transaction completed successfully on the first attempt, without any pending state.
This issue seems specific to UPI transactions.
Could anyone help us understand why this is happening or if there’s a recommended way to handle such cases?
Thanks in advance!
Topic:
App & System Services
SubTopic:
StoreKit
Hi,
I'm a server developer working on an iOS app, and I've encountered an interesting case that I'd like to understand better.
We received a user report indicating that they were able to successfully start a subscription without any charge being processed on their payment method. The subscription appears to be active in our system and we can verify the receipt with Apple's server, but the user claims no payment was deducted from their account.
I'm curious to know:
Are there any known scenarios where a subscription might activate without an immediate payment charge?
What would be the recommended way to handle such cases from the developer's perspective?
Could this be related to any specific subscription states or edge cases in the IAP system?
Any insights or documentation references would be greatly appreciated. I want to ensure we're handling our subscription logic correctly and providing the best experience for our users.
Thank you in advance for your help!
Hi,
I have a project in React Native, and I am using react-native-iap to load subscription products.
When I use Xcode to run my app in debug mode, it lists all my subscriptions, and I am able to subscribe successfully. However, the receipt I receive is not getting validated.
When I release the app on TestFlight, it does not list my subscriptions, and I am getting an empty array.
I am using the useIAP hook from react-native-iap to fetch the list of subscriptions.
Additionally, my app and subscriptions are not yet approved because the subscriptions are not being listed correctly.
I would like to know if it is possible to use the PIX payment option, a Brazilian payment method, for in-app purchases. Additionally, I would like to know if it is already possible to integrate other payment APIs such as MercadoPago, Iugu, etc.?
Currently, over the xcode environment to do the testing of product subscriptions through appstore are working correctly using the storeKit.
When deployed in testflight to do the testing over the integration environment, the store response times are being excessively high, in excess of 20 minutes.
This behavior is not replicated on Xcode, and is happening on recent versions uploaded to testflight, as earlier versions that were already tested and are currently in production.
In addition the communication between the appstore webhook and the BE is also failing in this environment.
It is being blocked to generate any test to be able to launch to production.
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
Developer Tools
App Store
StoreKit