Hi,
I am trying to build an app where users can upload music and sell it to other users on the app and have the money go straight to their account in such a way where stripe connect would be useful. I am wondering if I can use stripe for this or do I have to use in app purchases? If I have to use in app purchase how can i achieve this?
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
Since today, we are receiving reports from several customers on iPadOS17.x and iPadOS18 that their app runs in 'demo' mode. This can only happen if the purchase receipt is not found and this also shows in the log file they sent us. We can also reproduce it on an officially installed version of our app, but not when run from Xcode.
Is anyone else experiencing this?
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.
We are currently performing maintenance and operation on our app.
I would like to ask a question about Apple's purchase processing.
When retrieving purchase information for a user who has multiple original transaction IDs, such as original transaction ID AAA and original transaction ID BBB, if "Get All Subscription Statues" is executed with BBB as an argument, is it possible that purchase information for original transaction ID "AAA" will be retrieved?
If this kind of issue does occur, please share the conditions under which it occurs.
I am an app developer, and I have implemented in-app purchases in my application. When a user completes a purchase, Apple displays a success popup. After the user taps "OK", I send the receiptData to my server to add points to their account.
However, I have encountered cases where users either exit the app before tapping "OK" or experience network issues, preventing the receipt from being sent to my server. As a result, they do not receive their points.
Later, some users send me a receipt from Apple Pay, claiming that the payment was successful. These receipts include details such as the orderId, email, and other transaction information. However, I am not certain whether the user actually completed the payment but encountered an issue, or if they are providing a fraudulent receipt.
My question:
How can I verify the authenticity of these receipts? Is there an official way to check if a given Apple Pay invoice corresponds to a real in-app purchase in my app?
Any guidance or best practices would be greatly appreciated!
I've been struggling to work with the Storekit framework and specifically to find the current Storefront used by the user of the app.
Context : My app needs to behave differently depending on the country of the user.
For me relying on Locale.current.region?.identifier does not seem very reliable, the user can change it really easily.
I'm trying to use the Storekit framework like so :
if let storefront = await StoreKit.Storefront.current{
return storefront.countryCode
}
As per Apple's Storekit documentation :
Use current to determine a customer's current storefront region and offer in-app products suitable for that region. You maintain your own list of product identifiers and the storefronts in which you make them available.
But I just can't find out what I need to change in my current configuration to get another country. The code keeps returning my original storefront (which is France)
I've tried login in with a sandbox user defined on another country. Changed all settings on my device to another country. Changed my Apple's account region as described here. Also tried to logout from everything.
The only thing that works is setting a local .storekit file as described here and changing the default storefront.
Is Xcode overriding the default storefront when building on debug or TestFlight? does anyone know how can I test different storefronts with sandbox users without the local storekit file ?
Thank you in advance.
Over 50 hours ago, we created an app update with 4 IAP:s. We use revenue cat for the payment features. All IAP:s are approved, and they were bundled into this version.
Still, none of the IAP:s are working. They work as intended on TestFlight. All of them are approved.
I have reached out with a case to apple developer support but have received no assistance. This is a really frustrating situation and there are no logs or any ability to understand what is going on.
Topic:
App & System Services
SubTopic:
StoreKit
Hello everyone,
I’m hoping someone might help with auto-renewable subscription validation in Apple’s Sandbox environment. Here’s the situation:
My Setup:
I’ve configured three auto-renewable subscriptions in App Store Connect and generated an In-App Purchase key (with the correct Issuer ID and Key ID). (I also tried the App Store Connect API Keys)
I’m using Apple’s App Store Server API v2 endpoints (GET /inApps/v2/subscriptions/{originalTransactionId}/latest) to fetch the latest subscription status.
I’ve created several Sandbox test users (with fresh email addresses), signed out of old test accounts on my devices, and tested purchasing subscriptions anew.
What Works:
I am receiving valid Server Notifications from Apple (e.g. SUBSCRIBED, DID_RENEW) with the correct environment: "Sandbox" field.
My JWT generation appears to be correct because I’m no longer receiving 401 errors—only 404. That suggests Apple accepts the key and credentials.
My fallback logic attempts production first; if it sees a 404 or 410, it switches over to the Sandbox endpoint. This is exactly what Apple’s documentation recommends.
The Problem:
Whenever I query GET https://api.storekit-sandbox.itunes.apple.com/inApps/v2/subscriptions/{originalTransactionId}/latest using the originalTransactionId from Apple’s own Server Notification, Apple returns a 404 (indicating it can’t find that subscription).
This happens even though the subscription is active in Sandbox (I see notifications arriving for it).
I’ve tried adding a brief waiting period (2 seconds) before calling the Sandbox endpoint, but it consistently returns 404. I’ve also tried multiple retries over a longer timeframe without success.
I tested multiple fresh Sandbox test users, ensuring each one was signed in to the device’s App Store. After each new purchase, I still get the same 404.
Additional Checks:
These are definitely auto-renewable subscriptions, not non-renewing or consumable products.
I also tried calling GET /inApps/v2/subscriptions/{transactionId}/latest but I still see 404.
I tried everything mentioned above in production as I said to no avail:
GET https://api.storekit.itunes.apple.com/inApps/v2/subscriptions/{originalTransactionId}/latest
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?
Description:
We are developing an iOS app that offers only one auto-renewable subscription.
Recently, a user who had not subscribed for over a year purchased the subscription again through our app. However, when they checked Settings > Subscriptions, the new subscription did not appear. Instead, only their past subscription history was visible, and there was no option to cancel the new subscription. We have verified this issue with a screenshot provided by the user.
Additionally, we checked our app’s logs and confirmed that StoreKit.product.purchase successfully returned .success, indicating that the purchase was processed correctly.
Code used for purchase:
let result = try await product?
.purchase(options: [
.appAccountToken(uuid)
])
switch result {
case .success(let verificationResult):
switch verificationResult {
case .verified(let transaction):
addPurchaseLog("verificationResult.verified.")
case .unverified(_, let verificationError):
addPurchaseLog("verificationResult.unverified.")
case .userCancelled, .pending, .none:
addPurchaseLog("verificationResult.userCancelled or .pending or .none")
@unknown default:
addPurchaseLog("verificationResult.unknown.")
}
Despite the successful purchase, the new subscription does not appear under the user's active subscriptions. Could this be a bug in StoreKit? If there are any known issues or workarounds, we would appreciate any guidance.
Environment:
Xcode: 16.2
iOS version: 16.0+
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 keep getting this error:
Provisioning profile "iOS Team Provisioning Profile: com.visuallearningaids.craftshowtracker0320" doesn't include the com.apple.developer.in-app-purchase entitlement.
I've made several different identifiers and profiles.
Thanks
Greg
I ran into a problem. When using Storekit1 to purchase an SKU, the user payment was successful, but StoreKit1 did return paymentCancelled to my App. I would like to know under what circumstances this problem may occur? How do I fix it? Thank you
I try to call Get Transaction Info from App Store Server API, and the transactionId is for a Non-consumable type product, but it is odd that there are so many different transactionId and they have a same originalTransactionId
{
"bundleId": "${bundleId}",
"environment": "Production",
"inAppOwnershipType": "PURCHASED",
"originalPurchaseDate": 1691220528000,
"originalTransactionId": "${originalTransactionId}",
"productId": "${productId}",
"purchaseDate": 1691220528000,
"quantity": 1,
"signedDate": 1692590989925,
"storefront": "USA",
"storefrontId": "143441",
"transactionId": "${originalTransactionId}",
"transactionReason": "PURCHASE",
"type": "Non-Consumable"
}
the defination of Non-Consumable is can only purchase once for same apple account. But why there would have originalTransactionId?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
In-App Purchase
App Store Receipts
App Store Server API
Hello! Since October 2, we have observed a problem with the renewal of subscriptions. We have not changed anything, but the receipts no longer have the information whether a valid subscription exists after the subscription was actually automatically extended. The subscription status can then be queried correctly via verify Receipt. Has anything been changed to the receipts from Apple?
PS: we know that StoreKit1 is deprecated and we should switch to StoreKit2 asap.
I've just released my first on app store. I have monthly renewing subscription on my app, there is no pay wall for few days.
When I look at my app store page after release it shows me app price upfront instead of users download the app. I know I have subscription, but I don't want it to be upfront before install
I know other store that have the same model and users get to download their app. What am I missing?
Hi, I'm wondering if an in-app purchase is already made, but my app has not yet call finishTransaction(_:). Would that transaction be settled to me? Or do I only receive payment after the transaction is marked as 'finish' via storekit?
We have implementend Storekit 2 in our app, for one time purchases and subscriptions, so it is iOS15 and higher only.
Everything works fine, but now we want to add App Store promotions for our IAP's. That doesn't work because the App requires the app to implement SKPaymentTransactionObserver
How to Promote Your In-App Purchases
Make sure your app supports a delegate method in SKPaymentTransactionObserver. You can choose to customize which promoted in-app purchases a user sees on a specific device by implementing SKProductStorePromotionController.
The problem is that this observer is part of the original Storekit API and not of the new one.
What can we do to make this work with the new Storekit 2 API?
Hi 👋! I want to switch the business model in my app from premium to freemium and do it gracefully for existing users. Essentially, I wish to provide newly-paywalled content for free to existing paid users (people who bought the original app).
It seems clear that I should be using appTransaction's originalAppVersion property to check against purchases made in a previous version of the app, per the documentation. However, there seems to be broad confusion over whether originalAppVersion returns the version number or the build number and how to test for it. Examples of confusion can be found here, here and here.
This lack of clarity seems especially dangerous due to the difficulty in testing these values. In the sandbox originalAppVersion returns 1.0 by default, so whether you design for version number or build number, you'll always return a positive as long as your value is more than 1. There is a real risk to unknowingly either never identify previous premium users or accidentally identify everyone as premium (essentially giving away your app for free).
For example, my app's current version number is 1.4.0 and build number is 18, so 1.4.0 (18). As this is a major change, for this new update I might as well go for version number 2.0.0, and let's say I release the app with build number 5, so 2.0.0 (5). If I expect originalAppVersion to return the version number, I would match it against 2, because anything before 2.0.0 needs to be marked as premium. However, if I expect the build number, I should check against 19 and respectively bump up my build number: 5 -> 19.
In the standard version/build "v.v.v (b)" format, does originalAppVersion return app version or app build?
If it indeed does return build, and not version, I guess I'll start all of my future build numbers from 100 just in case: 2.0.0 (100). The only way I imagine I can test this is to print the value on the visual interface in a live version of the app, and ask a random user 🤷♂️.
Topic:
App & System Services
SubTopic:
StoreKit
Hello,
Our server isn't receiving Apple App Store Server Notification for in-app purchases.
It works for Sandbox Server, even I sent a test notification which I received on the Production Server URL, but the real in-app payment notification isn't coming to the server.
I checked this already: https://developer.apple.com/documentation/appstoreservernotifications/enabling-app-store-server-notifications and everything here has been reviewed.
Transport Layer Security (TLS) version and others things mentioned have been checked, test notification was received. But the main in-app purchase notification for live transaction isn't coming. What's the issue precisely?
Topic:
App & System Services
SubTopic:
StoreKit