Get Payment Information from In-App Purchase - ios

I need to get the user billing address and full name, is it possible to get such information after the user finishes an In-App Purchase or do I need to request it from the user itself?

You cannot get such information from the in-app purchase. Apple is very strict on sharing personal data of users.
Your only option would be to ask users to provide these voluntarily. Although to be honest I would be very reluctant to share such info myself. Why would an app developer need my private address?

Related

App with an auto-renewable subscription rejected because demo account needed

Apple rejected my app with an :
Guideline 2.1 - Information Needed
We have started the review of your app, but we are not able to continue because we need an expired demo account to fully assess the subscription feature.
Next Steps
To help us proceed with the review of your app, please provide us with a link to a demo account in the App Review Information section of App Store Connect and reply to this message in Resolution Center.
I really don’t understand what kind of demo account they want from me. There are no any login screens in the application. Active subscription needed to access pdf share function.
Should I give them a test sandbox account with which we tested the subscriptions or something else?
TL;DR
You have your premium feature (features that can be accessed only with your subscription) available for non subscripted users, so they are asking you for expired account to check what happens if they don't have subscription.
Long story
We had subscription which was giving access to training videos for our users inside app. Someday we realized that we want to make this feature free and did it through our backend without releasing the app. So, the next review we've got the same reject:
Guideline 2.1 - Information Needed
We have started the review of your app, but we are not able to
continue because we need an expired demo account to fully assess the
subscription feature.
Next Steps
To help us proceed with the review of your app, please provide us with
a link to a demo account in the App Review Information section of App
Store Connect and reply to this message in Resolution Center.
After struggling around we've revealed that the problem is that Apple App Review team couldn't test the case where a user DOESN'T have subscription and CAN'T access our premium online training videos. I guess they get confused and asked as to share with them an expired demo account, so they can test this case.
At the end of the day, we've removed our subscription properly from App Store Connect and got our app passed through review. Therefore, I think you have your premium feature (features that can be accessed only with your subscription) available for non subscripted users, so they are asking you for an expired account to check what happens if they don't have subscription.

How to track In-App Refund in ios app [duplicate]

Situation:
- User makes an IAP and is awarded some content, we store the users device id to ensure they can access this content whenever they want.
- User decided they do not like the content, so they call Apple and get a refund.
- User can still access the content, even though they have been refunded for their IAP
Problem:
We don't want the user to be able to access this content anymore. This could become a loophole that they would take advantage of. (unlock content, then get refunded and keep their access to said content)
Question:
Is there any way for us to check if a user has been refunded for an IAP with either their transactionId, transactionReceipt, or any other information we may have?
For Reference, I've read the StoreKitGuide, it did not mention this case.
No. There is no way to revoke access to content if they have been refunded. I believe this is by design. It is the same with App Store refunds; if someone buys an app and then asks Apple for a refund, Apple does not stop the user from continuing to use the app.
No. you cannot stop user to access. Apple does not stop user to use that feature after refund
Below a recent answer from the overbearing Apple!!!
At April 11
Hello Joe,
Thanks for your quick reply at first.
I think there were some misunderstandings. We understand that you must protect the user information. And we do not require any user info. We do not require any user's information---- iTunes account, User Name, email address and other information about himself/herself.
We require only one data----- transaction id (named "transactionIdentify" in your code), for example "1000000033409668" (this transaction id is a record at March 13).
A user buys a product from IAP, you will generate a "transaction id" and send it to us. This transaction id is stored in our database then. Now he/she gets refunds from you, so please send the transaction id to us. Let us know which one in the game canceled the IAP.
When a refund occurs, we think you should provide the transaction id to us. With these data, we could make a more fair service for all players. If you do not do it, more and more players will use your refund mechanism to get game items without real payment. You and we will lose money then. We think it is very important.
Regards,
Baibo
At April 12
Hello Baibo,
Thank you for following up with me regarding the refund transaction data.
We will not be able to provide you with the refund transaction data you have requested as it is not a feature or benefit provided to you per the contracts you have agreed to.
To view your paid applications contract and review your membership benefits, please access the contracts, tax and banking module within iTunes Connect:
http://itunesconnect.apple.com
If you are not happy with large refunds, you may want to consider adjusting the price of your in-app purchases as we will not be able to provide you with the refund transaction data in the future.
According to an answer one of my users received from Apple, refunding an app means they will no longer receive updates to the app, but doesn't remove the app from the device. IAP appears to work the same.
I am wondering if there is not a way by using restoreCompletedTransactions to check for the iAP purchase, but this would pop up a request for the user's iTunes password, so its use is limited.

How to get some user Information when user buy some items on Apple In app purchase by swift?

I am working an app that has In app purchase function.
And i need some unique user information when they make some purchases in order to store it on my Database for some reason.
So how can i get some info like email,username or userId from the purchased user?
Thanks!
You cannot obtain this information from the Apple purchase flow, so the answer depends on what you are trying to accomplish.
If you are selling a non-consumable item, such as a game unlock, Deepak's solution will work for you -- by providing a "restore" button in you application the user will be able to connect to their iTunes account from any of their devices and re-obtain the item.
If you are selling a consumable item, such as in-game currency, you should have the users register with your backend service and be authenticated when they make their purchase. Once you have verified the purchase you can write it to your database and you will be responsible for restoring their state regardless of the device they log in on.
Note that if you combine these approaches it would be possible, though unlikely, that a user could share a non-consumable purchase by using the same iTunes account but different accounts on your system by performing a Apple restore action. If you are managing your own inventory on a server, I recommend using consumables.
So the short answer is, if you want that information, you have to ask for it from the user.
[Answer is valid if you have users registered with your system]The transactions can be restored based on user who has logged into your system ,please refer to link here then you can map the information from your system to the product you are selling via in-app purchase.

In-App purchase for different login user in my app

Am creating cloud storage app with multiple user access(like Google Drive app).
I want to add expand storage feature using in-App purchase(1 year validity after that user need to renew).If it is single user i can go with Auto-renewing subscriptions.But i need to provide this feature to each login user.
Can i go with Non-renewing subscriptions
If i use Non-renewing subscriptions,i need to manage subscription date and end date in my DB
If u have any idea please share with me :)
Offering a year of service as a consumable IAP might be a valid solution to your problem, since you want to associate the purchase not with the iTunes user, but the user of your service. The issue with subscriptions is that they need to be restorable across all devices for the iTunes user, which is not what you want -- you don't want someone to auth with your system with a different account and restore subscription. Rather, you want to associate a user authenticated on your system with your content, which you could do through a consumable.
You've probably already looked at it, but Apple's IAP documentation can be found here.

What subscriber information can be collected by developers when implementing iOS subscriptions?

My app implements the iOS auto-renewing subscription to access premium content. I haven't yet submitted this for approval, because I want to know what subscriber information I'll be able to access once users purchase subscriptions. I need this information so that iOS app subscriptions integrate with a separate business database handling subscriptions on other platforms.
My reading of the typically-cryptic Apple docs is that name, e-mail and zipcode are available but only if the user explicitly opts in. But I'm not clear how to request that this information be asked for during the purchase process, or whether there's additional information I can ask for.
So here are my questions:
Are subscriber name, e-mail and zipcode the only pieces of information available via iTunes Connect?
If (1), is this information available only through opt-in?
If (1) and (2), how does the opt-in process work?
I think so. Although I've never received this info, based on the dialog below, I can only assume you don't get more info than they list.
Yes. You can't require the information. You'll only get the information if the user opts in.
You don't have to request that the user be prompted. In fact, you can't prevent the dialog from appearing when the user first subscribes to your auto-renewing subscription.
From Marco Arment's post on The limited world of auto-renewable subscriptions:
There’s no way for a developer to opt out of this data collection and
disable this dialog. If you sell an auto-renewable subscription, your
customers will be told that you want their personal information, and
you will be given that information [...] whether you wanted it or not.
Please read the rest of his post to see why you may want to steer away from ARS. Apple may reject your app if you're not a magazine or newspaper.
This is what the dialog looks like:

Resources