androidiosin-app-purchaseauto-renewable

IAP in Cross Platform


I have integrated In App Purchase (Auto-Renewable subscription) in iOS & Android. Both are working fine. I have certain doubts about validating the IAP using cross platforms like:

  1. How multiple user when login in one app, how does the subscription for one particular works? (For Example, if user A has standard plan & after logout from the app. If user B logins in the same plan who has premium plan. How the iTunes will manages plan of IAP for particular user?)

  2. Also what if user's who has android device when switch to iOS, then how to validate the IAP from android to iOS or vice-versa? (Like Netflix)

  3. What if user A who has purchased standard plan on android and now switch to iOS & upgraded to platinum plan. So at the end of the standard subscription plan , will the standard plan be stopped & platinum will continue.. or standard plan will be counted too??

Any help will be appreciated. Thanks


Solution

  • Like @Paulw11 said, you'll need to manage subscriptions on your own server. Any receipt validation will only validate against that users App Store or Play Store account on the device, not the logged in user of your app. Obviously, Apple can't validate a Google purchase or vis-versa.

    To answer your questions directly:

    1. Apple will only look at the App Store account on the device to see if that user has made a purchase or not. Apple won't do any validation against your logged in user.
    2. You need to store the receipt (from whichever store they purchased from) for the user on your server. When the user logs in on any device, you can check your backend to see if the subscription is expired or not.
    3. There is no way to upgrade/crossgrade between two platforms. As soon as userA has purchased the standard plan on Android, they'll need to use their Play Store account to manage the subscription. Look at large, cross-platform apps like Netflix or HBO to see how they handle this messaging to users.

    There is a tool, RevenueCat, that might be worth checking out. It's essentially a subscription backend-as-a-service that handles exactly what your trying to do.