The sample code provided in https://developer.apple.com/wwdc21/10114 doesn't appear to call finish() on unverified transactions, and I haven't been able to find any documentation regarding what to do with unfinished transactions. However, Apple has always emphasized the importance of finishing transactions, and since a transaction object is provided even with the unverified state, I'd love some guidance!
In-App Purchase
RSS for tagOffer extra content, digital goods, and features directly within your app using in-app purchases.
Posts under In-App Purchase tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
There is an issue with StoreKit. The line let products = try await StoreKit.Product.products(for: ids) doesn't always work correctly. Sometimes it returns an array with the correct data, and sometimes it returns an empty array. I'm passing the correct ids to products(for:).
This problem only occurs when using the sandbox environment (in TestFlight builds). In the App Store version, everything works fine.
StoreKit configuration is none. All IAPs are approved.
Everything was working fine before this. The problem was discovered on May 1, 2025.
As of today we seem to continuously get back 21 of the product IDs we have defined when the shop initializes.
This is causing what looks like intermittent bug behavior in our shop. The IDs sent each time are random (not always the same 21). So sometimes they match shop offers and the packs look right and can be bought and sometimes the ones our current shop offers need are not sent and so the offers in game look wrong and error when you try to buy.
Is anyone else seeing this new behavior of not getting down all their product IDs successfully?
In my understanding, with the latest court ruling in the US, iOS apps may decide to support web-based payments for subscriptions and in-app purchases. However, are we allowed to exclusively support web-based payments and not implement StoreKit at all?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
StoreKit
App Store Connect
In-App Purchase
Hello
I recently discovered that Denmark's (and soon the rest of the Nordic countries) biggest mobile payment service - MobilePay - is seemingly getting away with selling digital products in their app without using IAP. I am confused how this is possible, as I spent a lot of time making sure I understand the rules -- and I'm quite confident I do, so the only conclusion I can reach from this is that this is a violation that has not been discovered. If it isn't, I would like an explanation.
So, what am I talking about? First; MobilePay is an app that lets you send money to whoever, essentially a Danish version of CashApp. You attach a credit card, and you can transfer funds using people's phone numbers. Nothing about this is problematic. There are some fees involved, which is also fine.
But.
You can select to "wrap your money in digital wrapping paper", which can be unwrapped by the recipient to reveal the amount you transferred. This is, no matter how you spin it, a digital product. It adds about 1 USD to the transferred amount, but that amount goes directly to MobilePay, not to the recipient - and isn't a transaction fee. To me that sounds exactly like the kind of payment that is absolutely mandatory to process via IAP - so how are they not? How does it pass app review? Is there something I'm missing? As someone who has been forced to use IAP for a service I would much rather not share the revenue of with Apple, I find this frustrating, and I'd prefer that everyone was subject to the same rules, especially when it comes to big corporate players like the developers of this app.
You can read about the conditions of buying digital wrapping paper here: https://mobilepay.dk/app/legal/trading-conditions-da-dk - this page is in Danish but should be easily translatable. A theory I had is that maybe this wrapping paper feature is just not available to the test user they provided to Apple, as it is only sold to customers in Denmark and Greenland. But that's almost worse than an oversight, because in that case, they deliberately hid it from app reviewers.
I have attached some photos of how it looks when you select the product in the app and how it just adds the cost on top of the amount you chose to transfer. I just chose a sample transfer of 1 DKK for the amount itself, and the 7 DKK for the "paper" is then added on top. It's not a lot, but given the size of the app's userbase (over 4.5 million according to themselves), we're likely talking a significant chunk of change they're essentially (if you're being cynical) stealing from Apple.
What gives?
For reference, the app in question is this one: https://apps.apple.com/dk/app/mobilepay/id624499138?l=da (currently ranked 4th in Finance in Denmark)
Hi,
I have added widgets to my iOS app and I would like to make this feature only accessible to "pro" users that have made a non-consumable in-app purchase.
Currently, I am doing the following: I store an "isUnlocked" property in the Keychain after the purchase is made
I read data to be displayed in the widget and here I also query the Keychain and store whether the widget is unlocked
I have no refresh policy, but only change the widget data on a significant time change
a different view is displayed when the app is locked
Some dummy code snippets:
func getTimeline(in context: Context, completion: @escaping (Timeline<Entry>) -> Void) {
		let entry = readContents()
		let timeline = Timeline(entries: [entry], policy: .never)
		completion(timeline)
}
struct WidgetEntryView: View {
		let entry: Provider.Entry
@Environment(\.widgetFamily) var family
@ViewBuilder
var body: some View {
switch family {
case .systemSmall:
if !entry.isUnlocked {
LockedWidgetView()
} else if let event = entry.event {
SmallWidgetEventView(event: event)
} else {
NoDataWidgetView()
}
...
func applicationSignificantTimeChange(_ application: UIApplication) {
		if #available(iOS 14.0, *) {
				WidgetCenter.shared.reloadAllTimelines()
		}
...
However, 2 unexpected things happen: the view is refreshed intraday (not only at midnight i.e. at significant time change)
sometimes the LockedWidgetView is displayed.
Especially the latter is problematic, because it gives false information to a user that has already made the in-app purchase.
How can I achieve my goal of only displaying info when the user has made the in-app purchase?
Thanks in advance.
P.S. Although it would not have my preference, I would also find it acceptable if the widget is only shown as option to add once the purchase is made. In other words, I was considering changing the Widget itself:
struct MyWidget: Widget {
private var supportedFamilies: [WidgetFamily] = isUnlocked() ? [.systemSmall, .systemMedium] : []
but I believe I cannot re-initialise the widget from the app when the user makes the in-app purchase, because the only refresh option that I have is
WidgetCenter.shared.reloadAllTimelines()
We have had a small number of users of our mac app complaining that the app suddenly can't detect their subscription or previous purchase history. These users are not new, and have been using the app successfully for some time.
In the app we do this using the following (very standard) code at app startup:
let result: VerificationResult<AppTransaction> = try await AppTransaction.shared
For those users experiencing the failure, the result is coming back as unverified.
So far we've been unable to find the cause or a solution, but it seems to have become worse with the release of macOS 15.4.
We've tried resetting, rebooting and reinstalling the app.
It's worth adding the (probably obvious) that it's impossible to test or fault-find with this, because we can't replicate the issue in a development environment.
Any suggestions gratefully received.
Hey everyone,
I’m submitting my first version of an iOS app to the App Store and ran into an issue I can’t seem to resolve.
The app was rejected because during review, Apple couldn’t see the In-App Purchase product on the purchase screen. That’s their only complaint — everything else works fine.
Here’s what’s going on:
• In debug mode via Xcode, the product shows up correctly, and everything works as expected.
• In TestFlight builds, the product doesn’t show up at all — neither for me nor for Apple.
• The IAP is currently marked as “Waiting for Review”, not “Ready to Submit”, and it is linked to the current app version in App Store Connect.
I’m not sure if the IAP being in “Waiting for Review” is the reason it doesn’t show up in the TestFlight version — but I assumed Apple would still be able to access it for testing.
Has anyone experienced this? Do I need to wait for the IAP itself to be approved before it works in TestFlight and can be reviewed?
Any insights would be super helpful. Thanks!
Topic:
App Store Distribution & Marketing
SubTopic:
App Review
Tags:
App Review
StoreKit
App Store Connect
In-App Purchase
Hello everyone,
I’d like to ask for your input regarding best practices for implementing In-App Purchases (IAP) across both the frontend and backend.
Here’s our current flow:
-Frontend (Mobile)
The user opens a specific page.
We initiate a payment request using react-native-iap.
After the user completes the payment, we send the purchase data (receipt) to our backend.
Backend:
Accept the purchase receipt from the app.
Validate the receipt with Apple’s server. (GET https://api.storekit.itunes.apple.com/inApps/v1/transactions/{transactionId})
If the receipt is valid and the response indicates success, we mark the payment status as PAID.
We store the transaction ID in our payment module.
The Issue:
We recently encountered a situation where Apple returned a valid receipt, so we marked the transaction as PAID. However, later we realized that the payment status was actually Pending.
{
transactionId: '70002676245699',
originalTransactionId: '70002676245639',
bundleId: '',
productId: '',
purchaseDate: 1745560404000,
originalPurchaseDate: 1745560404000,
quantity: 1,
type: 'Consumable',
inAppOwnershipType: 'PURCHASED',
signedDate: 1745981078460,
environment: 'Production',
transactionReason: 'PURCHASE',
storefront: 'SGP',
storefrontId: '',
price: 5000,
currency: 'SGD',
appTransactionId: ''
}
This raised a few questions:
Does a Pending status always resolve to Paid, or is there a risk that Apple may later mark it as Failed or Unpaid?
Is there a specific field in Apple's receipt response that reliably indicates whether the purchase is truly active?
Should we hold off on granting access or product delivery until the status transitions from Pending to Paid?
We’d really appreciate any insights or recommendations on how to handle this edge case to avoid granting access prematurely.
Thanks in advance!
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect API
Tags:
In-App Purchase
App Store Receipts
App Store Server API
Hello,
Does a customer may redeem the same promotional offer multiples times? For example, get 25% of our app subscription for one year, and then we give the customer the same promotional offer for a second year at 25% off?
Thank you
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
Subscriptions
In-App Purchase
In my APP for now contains IAP for one time purchase.
By adding to APP auto-renewable subscriptions can I ask from customers(that purchased on App Store and IAP ) to purchase subscription.
For customers that purchase IAP, ask to purchase subscription after year from IAP was purchased.
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
Subscriptions
StoreKit
In-App Purchase
App Store Receipts
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
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:
StoreKit
In-App Purchase
App Store Server Notifications
works perfectly on android but doesn't work at all on IOS and i have used the same bundle id and product ids on both stores.
The error that i get on IOS is : "IAP initialization failed: NoProductsAvailable - No Product returned from store"
Here are the things that i've done:
Created an App ID on the apple developer portal with the correct capabilities
I have enabled the correct capabilities on the xcode project Unity Framework is embed and signed, Storekit (do not embed)
In singin and capabilities in-app purchases is there
I am using testflight to submit the app with a distribution certificate that appears to be valid
I've checked the the bundle identifier and it's the same everywhere (unity project, xcode project, App ID)
All of the products are cleared for sale and are in the status "ready to submit"
I always uninstall the old app version before testing the new one
My banking updates are still processing does this effect TestFlight IAP
Paid Apps Agreement is in Pending User Info state does this effect also
I still haven't filled out the tax forms, so I'm wondering if I need to complete them before my app's in-app purchases (IAPs) work in TestFlight.
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
In-App Purchase
Apple Unity Plug-Ins
I've already done my test on development signed app locally, all in-app purchase runs well with sandbox tester Apple ID.
Errors happens when make a purchase in distribution app from TestFlight.
Detail Info:
in Apple Store connect , make app available to China
Electron project, packaging by electron builder using distribution sign
upload to TestFlight, invite myself to test
using my Apple ID(not the sandbox tester) to login and purchase
dialog appears and said "Account not in this store"
VPN is off
Apple Store shows Chinese language and Chinese apps, not llikely to be u.s. store
I'm suspecting that:
Maybe shouldn't use my developer Apple ID to run TestFlight test?
TestFlight locked app to be in u.s. store ?
My IAP and Subscriptions were rejected during review.
I went to see what the problem was and it was due to my localization descriptions.
So I removed Enlgish (Canada) no problem, created a new one, save.
Then there was only one left which is English (US) but when I try to remove this last one, I get an error saying 'There was an error with deleting the localization. Please try again later.' when I try to delete it.
This is happening for all my subscription and iap items, as well as the subscription group localization.
Seems that when there are multiple rejected localization items in a table, you aren't able to delete the last rejected row regardless of language.
Anyone else experience this? Any way to get around it? I would prefer not deleting my entire subscription group and iaps.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
Subscriptions
App Store
In-App Purchase
Debugging
Hi, thanks for reading my question. I need help with some odd behaviour with product.purchase() not triggering a confirmation dialog after a subscription has expired and trying to purchase it again. Seeing this in iOS 16.2 and 15.7.2 (haven't tried any other versions) on actual devices, not in simulator.
I'm using a sandbox user on the sandbox environment (not using the local store kit config file testing option).
Using a newly created sandbox user, first subscription purchase goes through just fine, dialog box pops up, login with sandbox user, get confirmation of purchase and then Transaction.currentEntitlements has one item as expected. It auto renews for 12 times (each time Transaction.currentEntitlements contains the correct results) and then expires, as expected for sandbox. Transaction.currentEntitlements is then also empty, as expected. All good so far.
Now I want to test purchasing it again...Call product.purchase() again to renew/start a new subscription and nothing happens, no confirm purchase dialog box pops up at all. The purchase function simply exits BUT returns success (as in the following gets called) but in self.updatePurchasedProducts(), Transaction.currentEntitlements is empty.
case let .success(.verified(transaction)):
// Successful purchase
await transaction.finish()
await self.updatePurchasedProducts()
if I instead go to Settings->App Store->Sandbox User-> Manage Subscriptions and renew the subscription there, instead of in my app, then Transaction.currentEntitlements has a new entry and all is good again.
Alternatively, if I create yet another new sandbox user and logout of the old one I was using, I am once again able to purchase from within the app, so .purchase() once again works as normal.
Is there something I am missing about expired subscriptions and trying to purchase them again in the app? Is this a sandbox issue and in production I'll have no problem?
The sandbox user has purchasing enabled in Settings->App Store.
I've also tried calling AppStore.sync() (which is in my "Restore Purchase" button) before calling product.purchase() after the subscription stops renewing, expires and this issue comes up, doesn't resolve it.
Also have a less important question, the initial call to product.purchase(), the one that works as expected, has a bit of a delay before the confirmation dialog pops up, a few seconds, which will probably result in the user clicking the buy button again thinking it didn't work. Is a bit of a delay normal for sandbox? Will it be ok in production? When it fails, and I have to renew in Settings->AppStore->Sandbox user, there's also a bit of a delay after I return to my app, 5-15 or so seconds, before the transaction observer fires and currentEntitlements is checked again, is there a way to reduce this delay?
Thank you!
Colin
@MainActor
class IAPManager: NSObject, ObservableObject {
// removed other functions.....
func purchase(_ product: Product) async throws {
let result = try await product.purchase()
switch result {
case let .success(.verified(transaction)):
// Successful purchase
await transaction.finish()
await self.updatePurchasedProducts()
case let .success(.unverified(_, error)):
break
case .pending:
break
case .userCancelled:
break
@unknown default:
break
}
}
func updatePurchasedProducts() async {
for await result in Transaction.currentEntitlements {
guard case .verified(let transaction) = result else {
continue
}
if transaction.revocationDate == nil {
self.purchasedProductIDs.insert(transaction.productID)
} else {
self.purchasedProductIDs.remove(transaction.productID)
}
}
}
}
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
In-App Purchase
StoreKit
StoreKit Test
Subscriptions
We have uploaded our app on 17th Apr'25 on app store and status showed "Ready for distribution". However our in-app purchases are still showing "Waiting for Review". It has been 4 days since our app is live on app store but we are unable to make the in-app purchases.
Please let us know what steps are we supposed to do on this front
Hi all,
I’m testing Subscription in my Flutter app on a real iOS device (iPhone 16 Pro with iOS 18) via TestFlight. I’ve set everything up as required, but I still get this error:
flutter: Found products: []
If everything works perfectly when StoreKit configuration is used in Xcode, but not via TestFlight.
All my Subscriptions are approved with the same ID.
I'm trying to understand the IAP development process. I created my first Product on App Store Connect and am trying to build my app to use it. However it keeps failing with "Invalid product ID.". From what I've read, this is because the product has not yet gone through review. But what I don't understand is, of course it hasn't gone through review yet, because trying to use it in any capacity fails, even though I'm using a real physical device and using a Sandbox User. Is this the correct workflow? It seems very backwards that I have to submit the product for review, even before I know how it's going to be used. I'm still building the screen for the product page, and haven't even started touching any backend APIs, yet it's asking for screenshots. Am I misunderstanding something here?