In-App Purchase

RSS for tag

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

In-App Purchase Documentation

Posts under In-App Purchase tag

564 Posts
Sort by:
Post not yet marked as solved
5 Replies
2.8k Views
How do we find out User information from Apple server notifications? I have created a user and purchased an In app product from Apple . I have received a INITIALBUY notification from the App store. Apple ID : xxxx@gmail.com User : ABC (User id :111) The JSON receipt contains the following fields. "latestreceiptinfo": { "transactionid": "1000000657540200", "originaltransactionid": "1000000657537943", "quantity": "1", "subscriptiongroupidentifier": "20623048", "isinintroofferperiod": "false", "purchasedatepst": "2020-04-27 23:41:05 America/LosAngeles", "istrialperiod": "false", "expiresdateformattedpst": "2020-04-27 23:46:05 America/LosAngeles", "productid": "com.***.iap1.5", "weborderlineitemid": "1000000052078939", "uniquevendoridentifier": "xxxxxx-xxxxxxx" }, I have created one more user  from the same Apple id and purchased the same product. Apple ID : xxxx@gmail.com User : XYZ (User id :222)   "latestreceiptinfo": { "transactionid": "1000000657540202", "originaltransactionid": "1000000657537943",    "productid": "com.***.iap1.5", "weborderlineitemid": "1000000052078942", "uniquevendoridentifier": "xxxxxx-xxxxxxx" },   I have store user information based on productid-  originaltransaction_id =>user  xxxx@gmail.com -  com.***.iap1.5 - 1000000657537943 -ABC xxxx@gmail.com - com.***.iap1.5 -  1000000657537943 -XYZ In this case I could not track the user information.Duplication will come From the same Apple id ,2 different users buy the same product Apple will give the same original transaction Id. Is there any other field to differentiate transactions to find users ? Is there any option to include User name on JSON server notification from App store.
Posted
by
Post not yet marked as solved
8 Replies
22k Views
Hi, I am trying to generate or view the App-specific-shared-secret in App Store Connect to validate the receipts made by the subscriptions so when I click the link I only see a info modal and not the key, is there a permission problem? I tried following the following path in Apple Connect > My Apps -> Select My App -> In-App Purchases -> App-Specific Share Secret
Post not yet marked as solved
8 Replies
5.5k Views
Hi, Sometimes I get tons of errors 21104 and 21107 in a row when I try to validate new subscriptions and renew existing subscriptions from our server side by using the endpoint verifyReceipt: POST https://buy.itunes.apple.com/verifyReceipt https://developer.apple.com/documentation/appstorereceipts/verifyreceipt The response of this endpoint doesn't give any extra information: { 		"environment": "Production", 		"status": 21107, 		"is_retryable": true } I noticed that those subscriptions are renewed on the second try after waiting a bit (in a different hour/day). The documentation only indicates that the status codes 21100-21199 are internal data access errors but it doesn't specify each one: https://developer.apple.com/documentation/appstorereceipts/status I understand that it's an error on the Apple side so there is nothing I can do but if someone could give us more information about those errors (21104 and 21107).
Posted
by
Post not yet marked as solved
4 Replies
1.8k Views
Hello, I have an existing app which is beeing sold in the app store since 2010. Now I want to convert this app into a free app with optional in-app purchases. A part of the functionality which paid users currently have should then be accessible only by IAP. Therefore, I must identify my existing customers, to not make them pay again for functionality they have paid already. Googling around reveals that this is not easy to do, if it was possible at all. However, I found this post: https://stackoverflow.com/questions/3735635/convert-existing-ios-paid-app-to-freemium-model-with-in-app-purchase Quote: "There is now an Apple-approved way to do this on both iOS and macOS. The originally downloaded version of the app can be obtained from the receipt using the info key Original Purchased Version. You can then decide whether to unlock features if that version predates the switch to IAP." Now I have played around with this a bit, or more precisely: NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; NSData *receipt = [NSData dataWithContentsOfURL:receiptURL]; However, in my tests, receipt will always be nil. The URL also points to some local location with sandbox in the name. Am I doing something wrong in general, or is this just not supposed to work how I thought it would? Note that I have installed my app from the app store on my device, then launched the above code on my device (so I'm NOT testing this in the simulator). I also read about SKReceiptRefreshRequest, however I cant figure out how to use it. So the question is, how would I figure out if a user has already purchased the orignal paid version? My app does not have a server-component, and by checking some NSUserDefaults key would result in charging users which reinstall the app on a new device. So what should I do?
Posted
by
Post marked as solved
34 Replies
15k Views
We have an issue with validating in-app purchases which just seemed to start occurring today. When you send a sandbox receipt to the production endpoint (https://buy.itunes.apple.com/verifyReceipt), it returns the status code 21007 with the message. This receipt is from the test environment, but it was sent to the production environment for verification. This is documented here: https://developer.apple.com/documentation/appstorereceipts/status It is then advised to attempt this receipt on the sandbox endpoint (https://sandbox.itunes.apple.com/verifyReceipt) due to the status code returned. We have used this successfully for about a year now. We check the status code and if it is 21007, we then try the sandbox endpoint. As of today, we started seeing that the sandbox endpoint is returning a 21007 status code which does not make sense and threw our API into a recursive loop since it kept seeing that status and kept trying the sandbox endpoint. This status code is clearly wrong as it was not 'sent to the production environment' in these cases and this status code has never been returned in the past from the sandbox endpoint. Is this a bug introduced by Apple as of today or has something changed that I have not seen the documentation for?
Posted
by
Post not yet marked as solved
2 Replies
1.3k Views
Hi, I receive a lot of emails from users who say they purchased an in app purchase but haven't received it and want to know the order status of their purchase. Or they ask for a refund for example. In the Google Play developer console there is a tab called "Order management" where I can search by orderid (and gmail address) and check the order status and see if for example the credit card didn't pass the credit check and thus the order cannot be fulfilled. Is there any equivalent in Connect? Or another manual way how I can check the order status based on the user's order id? Thanks in advance, Sjoerd
Posted
by
Post not yet marked as solved
2 Replies
2.8k Views
As far as I know, an app should use an In-app purchase to unlock premium content, features, or levels, etc. Apple won't allow making payments via third-party payment gateways or even providing a link to do payment other than in-app purchase is against the guidelines. Today I found an app in AppStore where they use a third-party payment gateway to unlock their premium content. Attaching the screenshot Here they are asking for credit card details and entering the card details completes their payments process (Worth mentioning they have cool UX for this!). I am wondering how did they manage to get into the store? or did apple update the policies? or is it a new feature? I am clueless. Any help is greatly appreciated.
Post not yet marked as solved
1 Replies
874 Views
I'm have an existing app in the AppStore which is paid. I want to update this app to be free with ads, with an In App Purchase option for removing ads. The problem is: for all the people that already paid for the app, I want to provide the update with the ads removed by default. Is there any way to accomplish this?
Posted
by
Post not yet marked as solved
3 Replies
3.2k Views
In the latest Product object we are unable to get the price locale of the current product. Even though the display price string available with currency symbol, we need to display discount price of current product by comparing with other products. Earlier in SKProduct we had price locale property to achieve this.But in latest Product object we are missing this. Is there a way to get the price locale of the current storefront?. There is a countryCode property in Storefront enum. But there is no option to create locale using country code.
Posted
by
Post not yet marked as solved
2 Replies
771 Views
Hello I have a question about this section in the App Store Review Guidelines. 3.1.3(e) Goods and Services Outside of the App: If your app enables people to purchase physical goods or services that will be consumed outside of the app, you must use purchase methods other than in-app purchase to collect those payments, such as Apple Pay or traditional credit card entry. According to this, does this mean that if i want to purchase a t-shirt in the app, but the t-shirt is a physical good, I am allowed to use INSIDE MY APP a 3rd party money processor such as: 3rd part credit card proccessor, paypal etc...?
Posted
by
Post not yet marked as solved
17 Replies
14k Views
I'm using TestFlight to test an app with payment/subscription functionality. I created sandbox accounts in AppStore Connect accordingly to be able to test the subscriptions. I'm logged in with the sandbox account. When I try to subscribe in the App the wrong account (this is my actual real AppleID) is used for the subscription although it is recognized that this is just a sandbox subscription. I tried: logging off/on into the sandbox account creating a totally new sandbox account trying to trigger the payment with no logged in sandbox account The result is always: in the payment popup it is stated that the purchase account will be my original AppleID and not a sandbox account. How can I switch the accounts? Is this a bug at Apple's side somehow?
Posted
by
Post marked as solved
2 Replies
1.9k Views
I'm stuck in "Add bank account" step when filling User informations in Agreements, Tax, and Banking for Paid Apps. When I try to save, i get the error The bank identification code you selected does not match the corresponding part of your IBAN. I checked many times, all of my informations are valid (Valid IBAN, Account number same as given by my bank). I even tried to take every part of my IBAN as account number because I was desperate, nothing changed. I'm with Qonto bank. What am I doing wrong ?
Posted
by
Post not yet marked as solved
1 Replies
1.8k Views
When I subscribe for a trial period in Apple products like: Apple Music Apple TV Apple News etc. If I want to cancel my subscription via App Store I see a message: If you cancel, you will immediately lose access to Apple Music and the remainder of your free trial. Нou cannot reactivate this trial At the same time for 3d party developers when a user clicks Cancel Free Trial alert says: If you end your trial now, you will still have access to it until some date So my question is how can I replicate the same logic for my app. I've googled a lot but didn't find anything. I believe it should be possible to do since Apple apps are just like any other app distributed via App Store. If not - it looks like unfair competition because users will more likely postpone trial cancellation for Apple products and forget about this which will result in charging their money.
Posted
by
Post not yet marked as solved
2 Replies
1.3k Views
We're getting this error on all TestFlight versions currently. It's happening when anyone tries to subscribe to our in-app subscription. However, we are not making any changes to the subscription and haven't in weeks. Anyone else getting this? Any work around? Any update on a fix?
Posted
by
Post marked as solved
9 Replies
5.1k Views
Because the receipt file doesn't exist at the following path, my application exits with error code 173. /Applications/Notched Up.app/Contents/_MASReceipt/receipt However unlike in the past where it then re-launches and works, I'm now getting the error message that this application is damaged and must be re-downloaded from the App Store. In the console I see the following messages. error 12:35:02.553477+0800 Notched Up (com.apple.libsqlite3) cannot open file at line 45340 of [d24547a13b] error 12:35:02.553498+0800 Notched Up (com.apple.libsqlite3) os_unix.c:45340: (2) open(/var/db/DetachedSignatures) - No such file or directory default 12:35:04.481080+0800 storeuid (com.apple.commerce) Fetching missing receipt for sandbox app /Applications/Notched Up.app default 12:35:04.707374+0800 storelegacy (com.apple.commerce) StoreLegacy: Failed to perform in-line receipt renewal for application at path /Applications/Notched Up.app : 'Error Domain=com.apple.commerce.client Code=500 "(null)"' My gut is telling me that something internal related to the App Store isn't working correctly as this code was functional a couple of weeks ago and while the first two lines show sql, this app doesn't use sqlite. App is signed with "Apple Distribution". Have tested app with "Apple Development". Have removed entitlements that need a profile and the provisioning profile. The App Store application shows the correct "Sandbox" tester account (in the preferences). I've logged the test account out and back in. I've verified that tester account is the same store locale as my main account. I've rebooted this i9 16" MBP running macOS 12.0.1, even thought it rebooted itself last night, because ???? Any advice, can you spot something I've done wrong?
Posted
by
Post marked as solved
3 Replies
2.2k Views
I've created 2 auto-renewing products, one with a cheaper price and one with a more expensive price. I show the cheaper product for legacy users (users who have been on the app for a long time). The problem here is that when a user goes to the App Store and manages their subscription there, they are able to see the cheaper option and subscribe to it. Is there a way I can hide the cheaper product from being purchased through the App Store and only allow them to be purchased from my app? I saw the Cleared For Sale option on the product but when I tried unchecking the box, it made it sound like after users' subscription ends, they will no longer continue auto-subscribing to the cheaper option. Or am I misunderstanding Cleared For Sale?
Posted
by
Post not yet marked as solved
3 Replies
1.6k Views
I am making an app in SwiftUI using an In-app purchase. In this app, the user should be able to buy points as many times as he wants, so I have used consumable products (in the app store connect). But when I've tried to buy them once again I got the information "This In-App purchase has already been bought. It will be restored for free". I've already searched for a way how to do it but none of the ideas worked for me. Here is my StoreManager class: import Foundation import StoreKit import SwiftUI class StoreManager : NSObject, ObservableObject, SKProductsRequestDelegate { @EnvironmentObject var authViewModel: AuthViewModel @Published var transactionState: SKPaymentTransactionState? @Published var myProducts = [SKProduct]() var request: SKProductsRequest! func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) { print("Did receive response") if !response.products.isEmpty { for fetchedProduct in response.products { DispatchQueue.main.async { self.myProducts.append(fetchedProduct) } } for invalidIdentifier in response.invalidProductIdentifiers { print("Invalid identifiers found: \(invalidIdentifier)") } }else{ print("it's empty") } } func getProducts(productIDs: [String]) { let request = SKProductsRequest(productIdentifiers: Set(productIDs)) request.delegate = self request.start() } func request(_ request: SKRequest, didFailWithError error: Error) { print("Request did fail: \(error)") } func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) { for transaction in transactions { switch transaction.transactionState { case .purchasing: transactionState = .purchasing break case .purchased: print("purchased") queue.finishTransaction(transaction) transactionState = .purchased break case .restored: print("restored") transactionState = .restored queue.finishTransaction(transaction) break case .failed, .deferred: queue.finishTransaction(transaction) transactionState = .failed break default: queue.finishTransaction(transaction) break } } } func purchaseProduct(product: SKProduct) { if SKPaymentQueue.canMakePayments() { let payment = SKPayment(product: product) SKPaymentQueue.default().add(payment) } else { print("User can't make payment.") } } func restoreProducts() { SKPaymentQueue.default().restoreCompletedTransactions() } } And I am simply using getProducts with onAppear, and purchase product on button's action. Please help me or if an answer to a similar question already exists send me a link to that thread.
Posted
by
Post marked as solved
2 Replies
960 Views
I want to track subscriptions of multiple applications and need to choose unique key. Can transactionId from app1 match somehow transactionId from app2? If yes, then Is it possible situation: app1 and app2 have products with same productId (e.g. "com.subscription") and have transactions with same transactionId? So should I use key (appAppleId, productId, transactionId)? (It would be more convinient to use transactionId, but I am not sure about uniqueness)
Posted
by
Post not yet marked as solved
1 Replies
765 Views
Hi there, My team is working on a port of our game for IOS. We are very close to meeting our gold for submission, but one bug that appears unsolvable is that though our game is in Landscape, when a user taps to purchase IAP the Apple specific IAP overlay loads in portrait by default. Our developer can't find any information pertaining to this but he did discover several other released landscape games that share this issue. Example Pocket Mortys: Is this an expected behaviour or is there a known bug with our development environment (Unity). Thanks in advance for any advice, I can upload screenshots of our unreleased game but it is basically the same issue as shown above.
Posted
by
Post not yet marked as solved
2 Replies
1.2k Views
Hello, At https://developer.apple.com/documentation/storekit/skpaymentqueue/3566726-presentcoderedemptionsheet Apple describes a way to enables users to redeem subscription offer codes. Unfortunately according to https://help.apple.com/app-store-connect/#/dev6a098e4b1 this only seems to relate to auto-renewable subscriptions. Is that right? Is there also a way to offer codes for non-renewing subscriptions? Thank you so much!
Posted
by