In-App Purchases: Restoring Purchases Server Side - ios

iOS requires all apps have "Restore Purchase" functional through StoreKit or they are rejected. If my app keeps track of purchases on the server side do I still need this button? It would effectively do nothing if I'm thinking of this correctly since all of my in app purchases are managed at the user account level server side.

See this answer here: https://stackoverflow.com/a/54153169/3166209
In summary:
If you have your own account based system, you aren't required to
restore purchases from the device receipt if they can be restored by
logging in to their (your) account. You're required you to have
restore functionality, but it doesn't have to be implemented through
StoreKit. Apple vaguely mentions this in their docs as do service
providers.
You'll notice large, cross-platform, subscription apps like Netflix don't have a restore purchases button anywhere. This is because restoring purchases with the device receipt could allow a single receipt to be shared across multiple users that log-in on the same device.

Related

Restore Purchases is Mandatory In case saved in our system?

I searched a lot and did not find a concept for "In-App Purchases restore"
in our application all users can't used without login by email and pass, and all purchases saved in our system to enable multiple platform so the button of restore purchases is mandatory with this case or not?
The App Store Review Guidelines says:
Any credits or in-game currencies purchased via in-app purchase may not expire, and you should make sure you have a restore mechanism for any restorable in-app purchases.
So yes, a restore mechanism is mandatory.
Apple of course doesn't say it needs to be a button. Perhaps you can implement it without any user input; for example at first app startup.
Also, a restore method is mandatory, regardless of where/if you store a purchase. I mean, if you wouldn't have a backend system, you are still required to have a restore mechanism.
(It's good to read all App Store Review Guidelines.)

Is it possible to offer Apple's In App Purchases on an app that offers multiple user log-ins

We're designing an iPad app at the moment which offers in-app purchases for non-consumable items.
As the scope of the project has expanded, we want to allow the option to sign in to an account, and then sign out of that account and into another - similar to how one could on an app like the Facebook app.
My question is: is it possible to link Apple's in-app purchases to one of our system's user accounts, so that a User may sign in to a different device and access their purchases, but if another User signs in to my device, they cannot access my purchases (despite the device being signed in to my Apple ID)?
Any suggestions welcome
All completed in app purchases are tied to the Apple ID that was used at the time of the transaction. Since non-consumable in app purchases can only be purchased once, you can't use those. So, the only option would be to use consumable in app purchases and keep track of which system user account made the purchase. You need to store those purchase records on an external server somewhere though, since Apple will have no way of telling you which purchase went to which of your internal users. If you lose that purchase history your users will have to buy the item again, and probably not be very happy.

Is there a way to retrieve a list of in-app purchases made with my app?

Suppose there is an app with in-app purchase that uses a web server to verify in-app purchases with Apple and keep records. Suppose that web server had a bug and wasn't properly processing purchase verification. Suppose that bug was discovered and fixed.
Does Apple provide any sort of API for retrieving a list of purchases made for an app so that the verification can be re-run and the end users credited with their purchases? So far googling things like "ios in-app purchase retrieve list of purchases" hasn't turned up very much.
(Yes, said app ought to have been logging that information thus invalidating the need for such an API).
Edit: To be clear, I'm looking to see if there's a way to do this from MY purchase verification server and not involve the client devices.

iOS InApp Purchase

I just wonder if there is anyway to check if a user(email) already buy an in app purchase item in my application.
For example I buy an item on my iPhone, then I log in on my iPad with same itune account. the application will know that this user did buy the item.
Thanks,
Huy
The same thing is happening when you use the restore purchased option in many applications.
SKPaymentTransactionStateRestored
is the constant retrieved from server when you tries to purchase an already purchased item.
Please check this nice tutorial about inApp purchase : inApp purchases
From the In-App Purchase Programming Guide:
Store Kit provides built-in functionality to restore transactions for
non-consumable products, auto-renewable subscriptions and free
subscriptions.
You can restore purchases with the StoreKit framework by calling the restoreCompletedTransactions method of the SKPaymentQueue. Your app will then receive a transaction for each product the user has previously purchased. Simply handle these transaction and unlock the features and/or download content on the new device.
If your product is a consumable (gold coins for your game, health packs etc.) this would not apply and you have to keep track of the purchases on your own.
You will need to set up a server that will keep track of each transaction. And you need to implement a method to authenticate the user across devices (signup via e-mail, Facebook login etc.). Once the user logs in on a new device, your server can tell the app what it should unlock/download.

Subscription Products are Non-restoring, Why Apple is asking me to put up a restore button?

I don't understand Apple Guidelines. I had created an app which is having free as well as premium features.
By default the app comes installed with free features, I had provided the buy button so that user can buy the premium features of the app using the in-app purchase feature.
The duration of subscription is 3-Months and it is non-renewing.
I submitted the app to App store, but apple is asking me to place a restore button in the app, so that users can restore their previous purchases.
on the other hand, It is written in the apple documentation that you cannot restore subscription based apps.
It seems quite confusing to me, Can you please guide what to do in this matter.
There are two possibilities:
1) You don't know that some of your purchases are restorable.
2) Apple doesn't know that all of your purchases are non-restorable.
Follow up with Apple.
EDIT The above is wrong. You need to restore the purchases on your own without their support, since you chose to not use auto renewing. From the IAP guide
You are required to deliver non-renewing subscriptions to all devices owned by the user. Non-renewing subscriptions are not automatically synchronized to all devices by Store Kit; you must implement this infrastructure yourself. For example, most subscriptions are provided by an external server; your server would need to implement a mechanism to identify users and associate subscription purchases with the user who purchased them.

Resources