StoreKit

RSS for tag

Support in-app purchases and interactions with the App Store using StoreKit.

StoreKit Documentation

Posts under StoreKit subtopic

Post

Replies

Boosts

Views

Activity

Dev Defined IAP Transaction Metadata
I have an app that works by being able to map IAP transactions to a predefined user ID. This means when I consume events from Apple's App Store Server Notifications endpoints I have to do a reverse lookup in order to assign permissions within my app. Workflow: User purchases subscription within the app via IAP. The app persists the subscriptionID from the Apple IAP library in my cloud database (Firestore). Cloud function receives the event from App Store Server Notifications endpoint and looks up the user ID containing the persisted transactionID (with retries to avoid race condition). Question: This workflow works but it seems an improvement would be to allow dev's to append metadata, like the user ID, to the transaction submitted to IAP that we can access within the signedTransactionInfo of the event from the App Store Server Notifications endpoint in order to facilitate a direct lookup of the user document needing it's permissions updated. This would greatly simplify workflows that use non-Apple systems as a source of truth for app permissions. Does this actually exist already? If not, is there a feature request platform?
0
0
54
Mar ’25
Best practices: ensuring server-side that the AppReceipt sent up by a client belongs to the client
Hi, all! I have an AppStore Server-side question. User sends up an AppReceipt that I am validating. What's the best way to tell the receipt belongs to said user? I want to make sure that the source of the AppReceipt was actually the original purchaser of the item. Is fetching Transaction + AppAccountToken the only way? AppAccountToken can only be utilized if the original purchase used it, and it is associated with the user's data. Is there another way?
0
0
313
Feb ’25
AppDistributor.current never returning
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
0
0
149
Jun ’25
Can't fetch products
Use the following method to fetch: let appProducts = try await Product.products(for: productIdentifiers) The following checks have been carried out ✅ Must-check points App ID capabilities Subscription product status (ready to submit) Why The result is an empty array?
0
0
59
Sep ’25
Delete Offer Codes
Regarding the offer codes in https://developer.apple.com/help/app-store-connect/manage-subscriptions/set-up-offer-codes, I set up some incorrect offer codes by mistake. Currently, I can only deactivate it but I can't delete it. Is it possible to let me delete the incorrect offer codes due to the below reasons? Thank you. I can't recreate the offer code due to error message This reference name is or has been used by another offer in this subscription group. When I use the offer code redemption view in https://developer.apple.com/documentation/SwiftUI/View/offerCodeRedemption(isPresented:onCompletion:), it shows all the deactivated offer codes. I don't want them to be displayed in the page.
0
0
67
Sep ’25
Cannot get public keys for jwks verification
I am using the public url https://api.storekit-sandbox.itunes.apple.com/inApps/v1/notifications/jwsPublicKeys to get the jwks keys to verify the signed payload for store kit payments. I am checking Apple server notifications. const APPLE_JWKS_URL = "https://api.storekit-sandbox.itunes.apple.com/inApps/v1/notifications/jwsPublicKeys" // Apple JWK set (cached by jose) const appleJWKS = createRemoteJWKSet(new URL(APPLE_JWKS_URL)); const jwks = await appleJWKS(); logger.debug("Apple JWKS Keys: %O", jwks); // Log the keys if (!signedPayload) { // return res.status(400).json({ error: "Missing signedPayload" }); } // Step 1: Verify JWS (signature + payload) using Apple's JWKS const { payload, protectedHeader } = await jwtVerify( signedPayload, appleJWKS, { algorithms: ["ES256"], // Apple uses ES256 for signing } );
0
1
348
May ’25
Apple Media Services T&C pop-up
I had published an App, and my app has App Clip supported. The issue I faced is that I had received complaints where the user keep seeing the pop up "Apple Media Services Terms and Conditions Have Changed" when user clicked on the "Open" Button in the App Clip. What we had tried so far: Let user switch the Apple Id's region to our supported region. Let user try to log out and log in to Apple Id within the supported region.
0
0
61
2w
Questions regarding refundPreference sending consumption data
Apple notification description: notificationType: The type that describes the In-App Purchase or external purchase event for which the App Store sends the version 2 notification. App Store Server Notifications 2.0+ string notificationType Possible Values CONSUMPTION_REQUEST A notification type that indicates that the customer initiated a refund request for a consumable In-App Purchase or auto-renewable subscription, and the App Store is requesting that you provide consumption data. For more information, see Send Consumption Information. When the developer receives the refund request notification and sends the refundPreference, they say: GRANT_PRORATED You prefer that the App Store grants a prorated refund. Discussion Use these values in the refundPreference field of a ConsumptionRequest. The following constraints apply to the GRANT_PRORATED option: If the product is a consumable or non-consumable In-App Purchase or a non-renewing subscription, you may include a consumptionPercentage value in the ConsumptionRequest. Question: Requesting a refund for a non-consumable type does not send a notification to the developer. However, when a developer sends a refund preference, they can still send a GRANT_PRORATED request for a non-consumable type.
0
0
27
1w
Age Assurance Sandbox Testing - revoke vs declined
1)What's the relationship between ""Texas, child, 16-17, significant change declined" from my 11:03 screenshot below and "revoking"? ie what situation could someone decline but not revoke or vice versa, what is the purpose of the distinction in testing or legally or implications/implementation 2) What is a cause besides a typo to receive the "Can't trigger notification" titled message after using "Revoke"? you can see by my screenshot by comparing the left and right half there is no title. 3) Even if i find a workaround perhaps my info will help someone else or be an opportunity for improved documentation see: see my 5:54pm second screenshot
0
0
108
Jan ’26
StoreKit 2 subscription: “Continue to Purchase” does nothing in App Review, works in TestFlight
Hi, I’ve been struggling for a while with an issue around an auto-renewable subscription using StoreKit 2 and I’d like to double-check here whether I’m missing something, or if anyone has seen similar behavior. Context • iOS / iPadOS app, first release • 1 auto-renewable subscription (only product in the app) • Using StoreKit 2 only (Product, Transaction, AppStore) • Review device according to the message: iPad Air 11” (M3), iPadOS 26.2 • I keep failing on Guideline 2.1 – App Completeness • The App Review message is always the same: “The In-App Purchase products in the app exhibited one or more bugs which create a poor user experience. Specifically, no action occurred when we tapped on the Continue to Purchase button.” In App Store Connect, the subscription is properly configured, is in the state Ready for Review, and is correctly associated with this app version. What I see (locally + TestFlight) In TestFlight and local builds, the behavior looks correct: • Product.products(for: […]) returns the product, the price and currency are displayed correctly on the paywall / subscription card. • The user taps “Get PRO” → my overlay is shown (“Preparing purchase…” → then a screen with confirmation and price). • After tapping the “Continue to Purchase” button in that overlay, I call await product.purchase(). • On my devices, the system StoreKit purchase sheet always appears. • In the sandbox logs I can see: • a successful result from purchase() • a verified transaction via VerificationResult • the “user has PRO” flag being set correctly after refreshing entitlements (Transaction.currentEntitlements + fallback Transaction.latest(for:)). I’ve tested this on multiple real devices and with several sandbox Apple IDs – I cannot reproduce the “nothing happens after tapping” problem. What App Review reports App Review repeatedly claims that “no action occurred when we tapped on the Continue to Purchase button.” From their screenshots and description, the flow is: 1. They open Settings → subscription card. 2. They see the loaded price, so the product has clearly been fetched successfully from the App Store. 3. They tap my “Get SalonFlow PRO” button. 4. My overlay appears with the subscription name and price. 5. They tap “Continue to Purchase” (in my UI this is “Pokračovat k nákupu”). 6. According to them, nothing happens – no system StoreKit confirmation, no error message, no visible action. Important: this overlay did not appear as an extra complication, but as a reaction to their earlier feedback: • Originally, I had a simple flow: button in the card → directly calling purchase(). • App Review at that time said that after tapping the button “nothing happens”. • I added the overlay specifically to make it obvious that the button does react and that the app is preparing the system purchase: I show the product, the price, and a text explaining that a system App Store confirmation will appear next. • Only from that overlay do I call purchase(). So: in their environment they obviously do reach the overlay (meaning the button definitely does “something”), but the actual StoreKit purchase sheet never shows up. Additional changes and “safety belts” From the App Review video it was clear they were tapping the purchase button roughly 3 seconds after launching the app. So I tightened the flow even more: • The “Get SalonFlow PRO” button is now: • disabled until the product has been loaded from the App Store, • visually dimmed, with a spinner and a short text like “Loading subscription information, please wait…”. • The button only becomes active once the product is actually loaded and ready. • After that, the user goes through a two-step process: 1. tap “Get SalonFlow PRO” → overlay with details, 2. tap “Continue to Purchase” → this is where I call purchase(). On my devices, after that step the system purchase confirmation always appears. But App Review still says that after tapping “Continue to Purchase” nothing happens. What I’d like to ask 1. Has anyone seen a situation where Product.purchase() with StoreKit 2 works fine in TestFlight and sandbox testing, but in the App Review environment the system purchase sheet never appears (no error, just “nothing”)? 2. Are there any known edge cases on iPad (iPadOS 26.2, iPad Air M3) where the StoreKit purchase sheet might fail to show even if: • AppStore.canMakePayments == true, • the product is valid and loaded, • and no error is thrown from purchase()? 3. Could App Review consider my two-step flow (button → overlay → confirm button calling purchase()) problematic in itself, even though the overlay is there precisely because of their initial complaint that “nothing happens” after tapping the button? 4. Is there anything concrete you’d recommend: • adding to the logs, • changing in the timing/order of the purchase() call, • or adjusting in the UI, to make it absolutely clear what is happening in their environment if the system sheet never appears? From my point of view, the implementation follows the StoreKit 2 documentation, everything works correctly in real tests and TestFlight, but the App Review environment behaves differently and I keep getting stuck on Guideline 2.1. I’d really appreciate any experience, tips (“we had exactly this and fixed it by X”), or even a recommendation to radically simplify the flow back to a minimal “button → directly purchase()” without any intermediate overlay. Thanks a lot for any help – this review loop has been going on for weeks and I’d really like to finally resolve it.
0
0
88
1w
WatchOS IAP -- why is this such a mess?
Need to vent a bit before relaxing for Christmas... WatchOS IAP using Storekit 2 is such a mess...is nobody actually using this or does Apple just not care for the user experience here? Lots of users experience after the purchase confirmation double tap on the side button an instant return to the purchase screen with nothing actually happening. No error message whatsoever. There is just one remedy: users need to unpair and re-pair their watch, including restoring a backup and setting up their wallet again. Nobody really wants to do this, or doesn't believe me and think this is just typical support BS, because their watch is paired and most things just work as they expect. And it turns away a customer, often leaving a bad review. And I can't do anything about it. Other errors in the purchase process are reported, but like "process interrupted" in case the payment is not setup correctly (credit car no longer valid or sth.). How should the user know? There must be better ways of letting him know what exactly the problem is. You need to implement a "Restore Purchase" function, otherwise you're not passing the review. But it really asks every time for the AppStore password, and users with crazy passwords -- that they rightfully should have! -- have almost no chance of typing them successfully on the tiny AW keyboard. Why is it not also just a side button double tap like for purchase? At the very least you would need access to the keychain PWs or allow pasting of sth. copied on the paired iPhone. Promo Codes for IAP on AW-only apps just don't work. AW has no redemption at all, and on the iPhone the AppStore will try to talk to a companion app (which AW-only doesn't have) and the end up in a dead-end installation effort. This all feels like never really tested in the field, and people are of course blaming the 3rd party dev. for all these issues. And opening a ticket is just leading nowhere -- at best it's closed after months with the hint "duplicate" but w/o any chance for me to see that one that they then actually work on and track progress. It's all so frustratingly broken...
0
0
165
Dec ’25
Double-counted consumable in StoreKit unfinished and updates workflow
In Getting started with In-App Purchase using StoreKit views and the corresponding sample project, Store simultaneously enumerates Transaction.unfinished and Transaction.updates. Since, "if your app has unfinished transactions, the updates listener receives them once, immediately after the app launches," it appears that Transaction.unfinished would also receive the same unfinished transactions causing handle(updatedTransaction:) to be called for twice for each transaction, causing consumables to be double-counted. Is this a bug in the sample? Is there more information on concurrent execution of unfinished and updates?
0
0
110
Dec ’25
Unable to sign in to Sandbox Apple Account on Simulator
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.
0
0
175
Apr ’25
Auto renewable subsction, auto renews to different product id
I need help understanding how the In-App purchase subscription works within the same subscription group and how the Order plays a role at the time of auto-renewal. In my case, I have 5 in-app products in the same group as given below with their Order, Order Product ---------------------- 1 Gold Annual 2 Gold Monthly 3 Silver Annual Old, 3 Silver Annual New 4 Silver Monthly One user purchased Silver annual New, at the time of expiry, after a year, it auto-renewed to Silver annual Old. My understanding is that if a user has purchased Silver annual New, at the time of renewal, it should renew with the same product, not with different product id. Is this behaviour expected? Is there any official document which can explain this behaviour? Note: There was no Order given before, recently we have changed the Order to manage Upgrade and Downgrade for In-App subscriptions.
0
0
67
Nov ’25
Can I ask user to share his/her email id while doing
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?
0
0
56
Apr ’25
Request Guidance on IAP Requirements for Dynamically Priced Digital Video Content
Dear Apple Developer Support Team, I hope you are doing well. We are reaching out to request clarification and guidance regarding the In-App Purchase (IAP) requirements for our upcoming iOS application. Our app offers paid access to digital video content. Each video has a dynamic price determined by our backend based on multiple factors (such as duration, category, and promotions). Additionally, users are allowed to select and purchase multiple videos at the same time, which results in a combined total price that varies per transaction. Challenges we face with IAP on iOS Dynamic pricing: Apple requires IAP products to have static pricing defined in App Store Connect. Our video prices change frequently and cannot be represented by fixed IAP product SKUs. Multiple-item purchases: iOS does not support a single purchase that includes multiple different IAP products. Processing many separate IAP transactions in sequence results in a poor user experience and is likely to cause failures. Product creation limitations: Since our catalog contains many videos with frequently changing prices, it is not feasible to create individual IAP products per video. Given these restrictions, we are unclear how to remain compliant while still providing a functional purchase flow for our users. Question In this scenario, where: video prices are dynamic, users may purchase multiple videos together, and IAP does not support multi-item purchases or dynamic pricing, are we allowed to use Stripe or another external payment provider to handle these purchases? If not, we would appreciate Apple’s guidance on what the recommended and compliant approach would be for apps that must price digital content dynamically and allow bulk purchasing. We want to ensure full compliance with App Store Review Guidelines and would like confirmation on the correct implementation strategy before proceeding. Thank you for your time, and we look forward to your clarification. Kind regards, Muhammad Adnan Koderlabs
0
0
90
Dec ’25