We’ve never used in-app purchases until now, and we’ve found that while the sample app is pretty well commented there is no definitive guide or blog on how to go about handling different purchase possibilities (I’m aware brent has mentioned that he’d like to do this at some point).
I have a few questions, this might be quite long but hopefully it will be useful for other people who are new to IAP.
- Non-consumable items: My understanding is that these can be retrieved by using the “restore” transaction event. So if a user has paid to unlock all levels for example, and then downloads the app onto another device - they can “restore” this purchase onto the second device (simplest case - we add a “restore” button to the iap screen).
Is that correct?
- Consumable items: Is there any way to track these across multiple devices?
Example: User buys a “100 coins” item on their iPhone. They then spend 50 coins on a new skin for the main character. If they then downloaded the app onto their iPad, would there be some kind of record on iTunes to say that they still have 50 coins?
My assumption is: no, it doesn’t work like that, after the initial purchase the number of coins remaining must be tracked by the developer somehow.
- A new character (non-consumable) is available on the store for $0.99. It can also be purchased in-app for “100 coins”, which also costs $0.99. If the user purchases the coins, and then uses the coins to unlock the item, the store would have no record of the “purchase” of the new character, and so it would be unrestorable. So if the user then downloaded the app onto another device and clicked restore, the character would still be locked.
Is there a way around this?
I can easily track a user’s purchases and item usage on our server IF I have a unique way to identify each user. I don’t want to use some kind of manual login process, because it puts people off (even Facebook login has led to bad reviews on a previous app of ours).
Is there some way to get a unique identifier for the user not the device, based on their iTunes / Google Play id? Since that should be the same across all devices it seems like that would be the best way to identify the user. It does still leave me with one issue though:
- If the coins can also be collected in game (think Jetpack Joyride), the user may make in game “purchases” without ever actually logging in to a store, and so we would never get a store id from them. I don’t see any way around that, but at the same time if they never logged in then they never spent any real money, so I don’t think it’s unfair if unlocks don’t carry across to other devices. Does anyone have any comments on this?
Thanks in advance to anyone who takes the time to read / answer this.