In-App Purchase

RSS for tag

Offer extra content, digital goods, and features directly within your app using in-app purchases.

Posts under In-App Purchase tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Should we remove local storekit configuration option before submitting to App Store?
Hello, when developing an app on Xcode I add the local .storekit file to the run options as seen in the attachment. Should this option be reverted back to "None" before we submit the app to the App Store? Because this option is only under the "Run" scheme, not "Archive", I thought it shouldn't have any impact to the App Store build. Backstory: I had rejections from the app review team saying that they can't access the in-app purchases. In another build I removed this option and the app got accepted. But I don't know if this was the reason or it was because in-app purchases were waiting for review. When searching the web I've seen some people suggesting that the option should be "None". StoreKitConfigurationFileReference
1
0
85
2h
Which offer type to use for seasonal discounts?
Hi, I would like to run a seasonal discount on my app and offer -30% off for subscribing for the first year to all new and lapsed users. I can achieve that in two ways: Create a new Subscription with an Introductory offer (for the new users). And add a Promotional offer to existing subscription (for the lapsed users). or Add Offer Code to existing subscription. Make it available for new users and previous subscribers. It seems that both ways produce the same result, which one should I prefer? Are there any caveats to them? Thank you!
1
0
136
4d
401 error when validating IAP receipt using App Store Server API before App first release
Hi, I'm using the App Store Server API for in-app purchase receipt validation. However I received 401 error status code. My app is ready for submit in App Store Connect, but not yet published the first version. The receipt is generated using StoreKit test configuration and follow the Sandbox testing instruction. It is generated on a real device using Sandbox Apple account registered in the App Sandbox tester section. If I go back to use the deprecated verifyReceipt API sandbox endpoint, I get {'status': 21002} error instead. Is it expected for an App that has not yet published in App Store? If not, is there any way to test the in-app purchase server-side validation before the App is release?
1
0
93
4d
Re-enabling cancelled subscription before the expiry date
My app has a single subscription group called Premium that contains two products with different billing periods - monthly and yearly. All tests are made in Apples's Sandbox environment with sandbox user. I am currently testing a scenario, where the user is subscribed to the monthly product, subsequently cancels the subscription from the App Store subscriptions page, and before the subscription expires, he wants to re-enable it (same monthly product). If the subscription is re-enabled from the App Store subscriptions page, my server gets a notification about the changed subscription renewal status and everything works well. This scenario is documented at the bottom of the page here: https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox/testing_disabling_auto-renew#3780478 I however also want to support the scenario where the user can re-enable the subscription before it expires from the app itself. To do so, if the subscription is cancelled, but not yet expired, I show the user a button Re-activate. When this button is clicked, I initiate a purchase of the same monthly product, the IAP correctly shows the payment sheet and once I click Subscribe in the In App Purchase payment sheet, it goes through without any issues. However, my app subsequently receives a callback that the purchase failed: <SKPaymentQueue: 0x280f1fa10>: Payment completed with error: Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x2803a4720 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedDescription=Invalid Status Code, AMSURL=https://sandbox.itunes.apple.com/WebObjects/MZBuy.woa/wa/inAppBuy?REDACTED, AMSStatusCode=500, NSLocalizedFailureReason=The response has an invalid status code}}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception} This seems like the purchase failed with invalid status, but strangely enough, my server receives a notification that the subscription renewal status was changed to AUTO_RENEW_ENABLED and if I check the App Store subscriptions, I can see that its not cancelled anymore. The subscription also gets renewed at the end of the billing period, where it would have otherwise been cancelled. So in other words, everything seems to work except the purchase error above. My question is, what could be the reason for this? Perhaps Apple does not support re-enabling subscription directly from the App, but only from the App Store subscription page? Or perhaps its just a limitation of Apple's sandbox environment and I would not receive this payment error in production environment?
0
1
110
1w
Why is Apple refunding (6 IAP consumables) to customer even though they have exhaused their purchase?
"Jaxl Phone" a calling application. Users buy recharges to make cellular calls from the application. In this particular case, user has already utilised their recharge by making cellular calls from within the application. They have made about 4-hours of cellular calls from the app. Now, suddenly, customer started asking for REFUND from Apple. They never reached out to us. In fact, they also asked for REFUNDs for older IAP's and to our surprise, Apple has refunded all 6-IAP that the user has asked refund for. We have written twice to Apple Developer Support about it We have also hit consumption request API and used DECLINE as refund preference. But still Apple has gone ahead and issued a refund. How can we stop this scam and bleeding?
6
0
172
6d
Store kit screen automatically dismissed when using UPI payment method
I implemented a store kit in my application, which was working fine until the last three months. Recently, we have encountered an issue where the store kit screen automatically dismisses when attempting to purchase an in-app product using the UPI payment method. This issue specifically occurs with consumable products. Our non-renewable products are working fine with the same code base.
3
0
162
1w
My getTransactionInfo call resulted in apiError: 4040010, errorMessage: 'Transaction id not found.'
Hi, I am testing a consumable in-app purchase on my app, with a Sandbox account on an iPad device. The transaction was successful, as I saw "You're all set. Your purchase was successful. [Environment: Sandbox]. I set a break point in Xcode after the line await transaction.finish() in following code private func handle(transactionVerification result: VerificationResult ) async { switch result { case let .verified(transaction): guard let product = self.products.first(where: { $0.id == transaction.productID }) else { return } self.addPurchased(product) await transaction.finish() return. <----- breakpoint And I saw those property values for the transaction id UInt64 88*****848 originalID UInt64 437****2496 . Then I use the originalID value 437*****2496 in a server library call in node.js .... const environment = Environment.SANDBOX .... const client = new AppStoreServerAPIClient(encodedKey, keyId, issuerId, bundleId, environment) .... const response = await client.getTransactionInfo("4379072496") I got apiError: 4040010, errorMessage: 'Transaction id not found.' Could someone please tell me if I use the library call correctly with the right id? And why I got the error? Thank you very much! Kind regards, Shih-Chin Yang [Edited by Moderator]
3
0
149
1w
I can not fine Sandbox in Setting->App Store
Hi, I am testing an consumable in-app purchase for my app on an iPad, whenever I select to purchase, it always shows "For testing purpose only. You will not be charged for confirming this purchase.". Then I touch the blue Purchase button. It instantly shows "Done", then alerts "You're all set. Your purchase was successful. [Environment: Xcode]. It never asks me to enter a Sandbox account. I followed the instructions on "Testing in-app purchases with sandbox" page, but I can not find the sandbox account in Settings > App Store. I expected to see [Environment: Sandbox] so I could get the transaction id for App Store Server API. My iPadOS version is 17.4.1. My Xcode version is 15.1 and I use StoreKit with SwiftUI view. Can someone please shed some light on why I always get [Environment: Xcode]? I googled a lot, the process to test with Sandbox seems to be straightforward, But I just could not get it right. Thank you very much! KInd Regards, Shih-Chin Yang
3
0
158
1w
Error: Product ID already in use
Hi everyone, I created an IAP When I filled a the information in the require database, my internet was broken. When the internet in working normally, I create it again (I didn't save it before I lost my internet) The system reported an error "The Product ID you entered is already being used by another in-app purchase associated with this app." Question: Why can't I reuse a Product ID that I haven't saved before? Please reply to me soon, Thank you so much
0
0
131
1w
Assistance with Configuring Free Tier and In-App Purchases for Cordova App
Hi, Thanks for getting back to me regarding my query. I'm developing a Cordova app that includes games with an initial free tier and additional tiers available through in-app purchases. Here’s a detailed explanation of what I’m aiming to achieve: Users can play a set of games for free initially (Free Tier). After playing a certain number of games, users can purchase additional game tiers: Tier 1: Adds 3 more games. Tier 2: Adds 6 more games. Tier 3: Adds 9 more games. Users can continue playing the games in any purchased tier indefinitely. If users do not wish to purchase additional tiers, they can continue playing the free tier games with limited themes but without restrictions on play count. Questions: How can I configure App Store Connect to offer the Free Tier initially and then present the in-app purchase options for the additional tiers? Is there a specific configuration in App Store Connect that supports this model, or do I need to handle this logic within the app itself? I appreciate any guidance you can provide on setting this up correctly. Best regards, T
0
0
115
1w
Using in-app purchase in App Clips
Is it possible to initiate an iap flow from App Clips? There's not a clear answer to this in the docs. StoreKit is NOT listed as an unapproved framework for App Clips, but in-app purchases ARE listed as "not recommended" for App Clip functionality. I tried setting up a test with a StoreKit config file on the App Clip in XCode and the products weren't returned but... storekit testing... it would be great to get confirmation on this functionality after the iOS 17 updates.
1
0
122
3d
in-app purchase with free tier
Hi, I am developing Cordova apps/games with in-app purchase products as well as an initial product as non-paid (Free) tier: New users will be able to play freely for a set of games as default at the beginning. Then, if they would like to have more games with different set of attributes or themes, they can add more games with in-app purchases. It is similar to a game called Subway Surfers in App Store I would play in the past. A new player initiates games as Free Tier. After, let us say 3 games, the user is asked if he/she would like to have more games to play with different scenes/themes in different Tiers, in addition to their disposal: Tier 1, Tier 2 and Tier 3. For example Tier 1 adds 3 more games into the Free Tier games so they can play 6 games in the set;Tier 2 add 6 more games and so 9 games they can play and so on. Each individual game in their set is a variant of others in differing Tiers. If they don't wish and play Free Tier games, they may play them too, with limited set of themes but infinite times. If a user chooses a tier, let us say Tier 1, and when they play 6 games, they are asked if they would like advance to Tier 2 or Tier 3. If they choose Tier 2, as they complete the respective games they will be asked for Tier 3. However, if they don't wish to advance, again they can play current Tier games as many times as they wish. It is like non-subscription apps then converted to subscription-based ones. In App Store Connect, I created a number of products for in-app purchases for an app. How I can deliver this Free Tier games in the app and let users try it and allow them to choose in-app purchase products available in AppStore Connect. I would appreciate response and support. Best Lexxyacc
0
0
116
1w
InAppPurchase create problem
Hello, I try to create a product in app purchase with the API calls. I meet a problem during this creation for some products, see the error message : Erreur lors de l'appel d'API Apple : { "errors" : [ { "id" : "89876075-5f2a-44ea-a910-fcbcf95ea641", "status" : "409", "code" : "ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE", "title" : "The provided entity includes an attribute with a value that has already been used", "detail" : "This product ID has already been used", "source" : { "pointer" : "/data/attributes/productId" } } ] } It seems that the productId has already created but when we check in the app we cannot find its. Is it possible that if the productId has already created and deleted after ? And now we cannot created again with the samed productId ? Thank you in advance to help us. Best Regards.
2
0
171
2w
message extension(sticker pack), in-app purches (IAP), Review problem
Hey everyone, I'm facing a bit of a puzzling issue with the review of my app, particularly with the in-app purchase functionality for message extension/sticker packs. I've implemented the entire store using StoreKit for in-app purchases, using exactly the same code like it is in Apple's demo application (https://developer.apple.com/documentation/storekit/in-app_purchase/implementing_a_store_in_your_app_using_the_storekit_api). Here's the problem: the products appear correctly according to what's set up in App Store Connect (In-App Purchases section), and the purchase process works flawlessly in sandbox and TestFlight environments. However, during the review process, I received the following feedback: "Guideline 2.1 - Performance - App Completeness We found that your in-app purchase products exhibited one or more bugs which create a poor user experience. Specifically, the app kept loading indefinitely when we tapped on “Shop”. Please review the details and resources below and complete the next steps." It seems that the products are not loading properly in the environment used by the reviewers. What's most puzzling is that another app with the exact same store implementation has passed the review and is available in the store (https://apps.apple.com/pl/app/the-prince-frog/id6478831171?l=pl). I'm running out of ideas on what could be causing this discrepancy, especially since everything is functioning correctly in sandbox and TestFlight. Could someone please take a look at the code in Store.swift in this demo project and point out what might be missing? Any help or insights would be greatly appreciated! Thanks in advance. @MainActor func requestProducts() async { do { //Request products from the App Store using the identifiers that the Products.plist file defines. let storeProducts = try await Product.products(for: productIdToEmoji.keys) for product in productIdToEmoji.keys { toDebug = toDebug + ", " + product } var newCars: [Product] = [] var newSubscriptions: [Product] = [] var newNonRenewables: [Product] = [] var newFuel: [Product] = [] //Filter the products into categories based on their type. for product in storeProducts { switch product.type { case .consumable: newCars.append(product) case .nonConsumable: newCars.append(product) case .autoRenewable: newSubscriptions.append(product) case .nonRenewable: newNonRenewables.append(product) default: //Ignore this product. print("Unknown product") } } //Sort each product category by price, lowest to highest, to update the store. cars = sortByPrice(newCars) subscriptions = sortByPrice(newSubscriptions) nonRenewables = sortByPrice(newNonRenewables) fuel = sortByPrice(newFuel) } catch { print("Failed product request from the App Store server: \(error)") errorMessage = error.localizedDescription } }
1
0
212
6d
When to call transaction.finish() when using currentEntitlementTask
When using the new currentEntitlementTask ViewModifier to check for the status of a non-consumable IAP when should you call transaction.finish()? Also, since currentEntitlementTask will trigger whenever the app/view is run it will call transaction.finish every time. Is it bad to repeatedly call .finish on a already finished transaction? Currently my app works fine when making purchases and using currentEntitlementTask and @Environment to grant access to the purchased content but I know that all the transactions are unfinished and the docs say you should call transaction.finish() to tell StoreKit that you have given the user access to the content. Thanks for any help/advice here.
1
0
170
2w
How do I create a free Consumable In-App Purchase?
I have already created consumable in-app purchases in App Store Connect which are available in my app. Then I created a "Discount Code" UIButton which presented custom UI for the user to input a code for another in-app -purchase at a lower price but that build was rejected because you cannot have custom code for this sort of thing. Ref: Apple Documentation: presentCodeRedemptionSheet() Finally I got it through review when I changed the UI but then I realized that I can't offer a free consumable in-app purchase. The minimum price is US$0.29. I would prefer a free consumable in-app purchase to give to freelancers I am owkrin with for them to test the app with. I know that there are ways to do it when using subscriptions but my app only using consumable in-app purchases which align better with my business model and the value offering of my app. There must be some way of creating a single-use free consumable discount code which will also get through App Store Review. Anyone managed something like this? Thanks.
1
0
185
2w