StoreKit

RSS for tag

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

StoreKit Documentation

Post

Replies

Boosts

Views

Activity

Total number of active IAP subscribers
Hello,We have an iOS app that uses In-App Purchase for auto-renewal subscription. We have Monthly subscriptions and annual subsciptions- all are auto-renewals. In iTunes Connect I can see the total number of subscription transactions being processed each month, but I can't see how many subscribers we're adding / retaining. there's no place where I can see what is the total number of active IAP subscribers.Ideally, we'd like to be able to see:- Total number of active subscribers - How these active subscribers are divided between the diffrent products- How many of them are during their Free Trial, and how many already made the first payment,Any ideas on how to find this info - either from iTunes Connect or a third-party solution (actually I also use App Annie).Thanks,Inon
4
1
2.8k
Aug ’16
Dynamic products in Apple In-App Purchase
How to deal with dynamic products in In-App purchase? We have an existing website having and admin panel where user adds his/her courses. There are thousands of courses and every day lots of courses created there. Its not possible to add those courses to Apple In-App Purchase portal. Is there any other solution to use dynamic products to In-App Purchase? there are discounts and promotional coupons also applied. Is there any API exists which we can configure to our admin panel and course will automatically added to In-App? Please help me and save my life...
2
0
2.1k
Dec ’16
Test In-App purchase on AdHoc build
Hi,In the documentation it says you must use a sandbox account when testing In-App purchase using the Sandbox.But I just noticed that (currently on 10.3 release) the StoreKit popup is saying "Sandbox" even when using a normal account but the app is an AdHoc build.Is this expected that a normal account also uses the "Sandbox" when running a AdHoc distribution build?Thanks in advance,Anders
3
0
4.2k
Mar ’17
Referral program for subscription app
Let's say I want to build (iOS + Mac) free app which unlocks full functionality for paid subscription via in-app purchases API. To encourage natural growth, I would like to implement a referral program, similar to what apps like Uber have: 1. User invites their friends to my app (using a unique link or promo code) 2. Then for each activated invite they both (user who invited the friend and friend who used the invite) get a free month of access to premium version of the month.Is there a way to implement such a system with App Store and Mac App Store? Is it even allowed by IAP guidlines? (I suspect not). Now, let's say that this ideal system described above is impossible to build according to guidelines or tech limitations, but an alternative is to offer a free month of access only to users who used the invite. The user who originally sent the invite could get something else outside the app, let's say a free sticker if 10 of his friends signed up. This is easier to build and I think it doesn't contradict any guidelines. What do you think?A reply from Apple representative would be extra valuable. Thank you for your help.
4
0
8.7k
Apr ’17
IAP Sandbox user: iTunes account creation not allowed
Currently unable to test IAP with sandbox users. I have tried using existing accounts and also setup new sandbox users from scratch but still get the following error when trying to make a purchase:iTunes account creation not allowedThe Apple ID cannot be used with the itunes store at this time. Please try again later.I can confirm that I am not signed into any accounts under Settings > iTunes. I have created new sandbox testers with unique email addresses and tried both a) verifying a new account email address/security questions and b) not verifying email addresses. Neither of which make a difference.Looking at the System Status (https://developer.apple.com/system-status/) there was an issue last night (18/07/17) with the iTunes Sandbox but is apparently resolved - please can someone confirm this is now working for other users or is it actually broken for others still?
8
0
11k
Jul ’17
Cannot connect to iTunes Store
- My app’s binary is Rejected.- My In-App Purchases (IAP) is Waiting for Review.- In-App Purchase (IAP) is enabled in developer’s account- Restore purchase works in the sandbox environment- Some purchases works in the sandbox environment.When I try to create SKProductsRequest for some purchases, as a result I have "Error Domain=SSErrorDomain Code=109 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store, SSErrorHTTPStatusCodeKey=404}". But it works for some purchases. And also all my purchases have status "Waiting for Review". How to fix this?
9
0
5.1k
Nov ’17
Rules for "promo codes"?
I've always understood it to be the case that apps could permit users to log in or use a code to access paid content, as long as the app did not direct the user to an external web site to make a purchase. For example, apps like Netflix or Kindle.My app isn't even doing anything close to this. I have an app in which digital content is unlocked via in-app purchase. Occasionally I give away promo codes that allow a user to unlock one free piece of content. These codes can only be used once, and are distributed in very limited numbers on cards, in person, at events like trade shows.My app has been in the store for about four years using this method. This week I attempted to publish a small bug-fix update, and was flagged by Apple and told that my use of Promo Codes in this manner violates the rules.What happened here? Did Apple misunderstand what my app is doing? Did the rules change recently and I was unaware of the change? Has this always been against the rules, but either Apple didn't enforce it before or they never reviewed my app thorougly enough to find it?Thanks,Frank
5
0
9.2k
Nov ’17
Subscription downgrade renewal in sandbox
Hi, I am testing auto-renew subscriptin in the sandbox. If I purchase a subscription to Level 2, it renews every few minutes and I get notification in app. All good. But if, before it expires I do a downgrade to Level 1 using my app interface to purchase Level 1, the following happens. The Level 2 subscription continues until it expires. What I then expect to happen is that I would then get a notiification that the new subscription has been purchased. But that doesn't happen, the latest receipt is saying the original subscription has expired. It does include the new subscription in the "pending" field, but in that field the "auto_renew_status" is set to 0, which I guess is why it didn't actually happen.My question is: is this a sandbox thing? In production, will the new subscription purchase happen authomatically and I will get a receipt for the purchased downgrade subscription? If not, what is the way to handle this - a message to the user to say to go and manually renew subscription?Gary
4
0
2.9k
Mar ’19
latest_receipt_info is missing from Receipt
"latest_receipt_info" is missing from Receipt when fetched from Apple servers using verifyReceipt endpoint.Can anyone explaimn when can this arise, and what is the reason behind this. We see significant amount of the trxn resulting in this.Here is one such receipt.{ "receipt": { "receipt_type": "Production", "adam_id": "******", "app_item_id": "******", "bundle_id": "com.****.***.****", "application_version": "2.3.1", "download_id": "******", "version_external_identifier": "*******", "receipt_creation_date": "2019-06-19 16:15:05 Etc/GMT", "receipt_creation_date_ms": "1560960905000", "receipt_creation_date_pst": "2019-06-19 09:15:05 America/Los_Angeles", "request_date": "2019-06-20 08:45:52 Etc/GMT", "request_date_ms": "1561020352231", "request_date_pst": "2019-06-20 01:45:52 America/Los_Angeles", "original_purchase_date": "2019-06-19 16:15:05 Etc/GMT", "original_purchase_date_ms": "1560960905000", "original_purchase_date_pst": "2019-06-19 09:15:05 America/Los_Angeles", "original_application_version": "2.3.1", "in_app": [] }, "status": 0, "environment": "Production"}This is for Mac App Store. So i don't think that it is a old receipt (like iOS 6). Also it came while our QE was performing the test.
4
1
2.5k
Jun ’19
In app purchase not appearing on App Store
Hi there,We recently had a new version of our app Approved, and it included a new In App Purchase as well. We released the app to the App Store yesterday, and after a few hours it became visible in App Store Search.However, the in-app-purchase is not visible on the App Store, and therefore, the App simply does not work.I have read that it can take up to 24 hours for the in app purchase to be visible in the App Store, but this is a problem as our App doesn't work without the In App Purchase.Does anyone have any experience with this?
3
0
5k
Oct ’19
Auto-renewable subscriptions: 'is_in_intro_offer_period' in the local receipt with free trial period
Hi,In short:1. Is the 'is_in_intro_offer_period' field in the local receipt will be 'true' if the subscription is in the trial period?2. What is the right way to define from local receipt (not using server and verifyEndpoint) if user has used trial period for a subscription group?More detailed:We use auto-renewable subscriptions in the app. It's required to define if user is eligible for a free trial or introductory price to display correct price in the app. It seems that it's possible with the help of 'is_in_intro_offer_period'field from local receipt (Receipt Fields documentation, is_in_inrto_offer_period documentation). 'Trial' is one of the Intro Offer Period types ("The offer types are “pay as you go”, “pay up front”, and “free trial”" from documentation), so it's expected that the 'is_in_intro_offer_period' field will be 'true' if subscription is in the trial period. All our tests showed that both local and remote receipts for subscriptions in the trial period always contain "false" in the "is_in_intro_offer_period" field.The first question is why the 'is_in_intro_offer_period' field is not 'true' when the subscription is in the trial period? Does it mean that 'is_in_intro_offer_period' relates just to the 'Pay As You Go' and 'Pay Up Front' offer types? If so, it should be mentioned in the documentation.We've planned to use 'is_in_intro_offer_period' from local receipt to define if user is eligible for a free trial price. But:1) the 'is_in_intro_offer_period' field is not 'true' when subscription is in the trial period (as written in the first question)2) the 'is_trial_period' field is not presented in the local receiptSo the second question is how to define if a user is eligible for a free trial using just local receipt? (I understand that it's possible to use the 'is_trial_period' field from the 'verifyEndpoint' JSON, but the question is if it's possible to do it locally)Here is an example of JSON from verifyEndpoint for real subscription that is in the trial period with "is_in_intro_offer_period": "false".{ "auto_renew_status": 1, "status": 0, "auto_renew_product_id": "com.companyName.subscription.onemonth1", "receipt": { ..... }, "latest_receipt_info": { "is_in_intro_offer_period": "false", "is_trial_period": "true", "product_id": "com.companyName.subscription.onemonth1", "subscription_group_identifier": "20483890", "quantity": "1", "web_order_line_item_id": "430000223503827", "transaction_id": "430000604899999", "purchase_date_ms": "1584597149000", "purchase_date_pst": "2020-03-18 22:52:29 America/Los_Angeles", "purchase_date": "2020-03-19 05:52:29 Etc/GMT", "expires_date": "1584856349000", "expires_date_formatted": "2020-03-22 05:52:29 Etc/GMT", "expires_date_formatted_pst": "2020-03-21 22:52:29 America/Los_Angeles", "original_transaction_id": "430000604899999", "original_purchase_date_ms": "1584597149000", "original_purchase_date_pst": "2020-03-18 22:52:29 America/Los_Angeles", "original_purchase_date": "2020-03-19 05:52:29 Etc/GMT", "unique_vendor_identifier": "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE", "unique_identifier": "aaaaaaaaaaaaaa5aaeaeeaddaafaaaaaaaaceaaa", "bvrs": "395", "bid": "com.companyName.appName", "item_id": "1439222222", "app_item_id": "123456789" }, "latest_receipt": "e.....=" }
3
1
1.4k
Mar ’20
Family Sharing IAP Transaction IDs
Are the original_transaction_id fields in family sharing in-app purchase receipts populated with the ID of the original transaction (from the original purchaser), or does each family member get a new independent one? We're interested in supporting Family Sharing for our non-consumable in-app purchases, but since we also allow purchases to be activated on the web / other platforms, we're concerned that Family Sharing might enable somebody to create multiple accounts from a single purchase and use them independently on many more devices.
2
0
999
Jun ’20
App rejected due to "3.1.3(b) Multiplatform Services". Need help.
Hi, Our software helps personal trainers deliver better training experience to their clients.  Personal trainers as well as their clients can use the software to log workouts, track progress, build plans, chat with each other etc. One big part of our business is to build white-label apps for fitness businesses. With this solution fitness businesses can get their own branded apps in the app stores. Apple has recently started rejecting our white label apps because it seems we are breaking “3.1.3(b) Multiplatform Services” guideline. As per the guidelines we have to provide in-app purchase options if the app allows users to consume services bought elsewhere. The service in our case is the 1-on-1 personal training. Here are few reasons we think we shouldn’t be forced to implement in-app purchase option inside the app: The app is an add-on and not a major part of the service that is delivered. Here are some of the things a personal trainer delivers after a client buys a personal training package: Take assessment in person. Design workout plans Take clients through a workout in-person or over a Skype call. Teach them correct exercise form. Design nutrition plans. In person review session All of these things are delivered outside the app.  Moreover guideline 3.1.5(a) specifically prohibits the use of in-app purchase for goods and services that are delivered outside of the app. 2. After our appeal was rejected, we have included a “free signup” option inside the app. Using that option anyone can create a free account and use the app free. All the clients features are unlocked. We thought that adding this will show that the app is free and we only charge for 1-on-1 personalized service that is delivered outside the app. But in the end we were not successful in getting the app approved. 2. Recently “Hey App” was rejected for similar reasons (3.1.3(b) Multiplatform Services) and they were finally approved after they added a temporary free email account in the app. Not sure why our app is getting rejected even after adding a free signup option. 3. All major Gyms like 24-hour fitness have their app available in the app store and their app is available only to their members. There is no way to buy the gym membership or personal training package through in-app purchases. So how is our app different? 4. How is our app different from an app built for physical therapists or doctors? Should they provide in-app purchase options? 5. All the personal training packages are custom made and vary from one user to another. Also, a trainer will have to go through an assessment before they can decide on a package that is right for a client.   Do you guys think we have valid points? If yes, then how do you suggest we move forward with Apple review. Our Appeal was rejected and there is no way to move forward. Is there a way to talk to the Apple review board over the phone and explain the situation. Is there anyone here who can help? Thanks, Manobal
5
0
1.5k
Aug ’20
verifyReceipt returns tons of errors 21104 and 21107
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).
8
1
5.8k
Dec ’20
Converting paid app to freemium with IAP
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?
4
0
1.9k
Feb ’21
Can I bypass apple in-app purchase to unlock premium content in my app.
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.
2
0
3.1k
Jun ’21