Maintaining and organizing purchases on multiple platforms

I have an application for different platforms. Let it be iOS, Android and Windows. To use the application, you need to pay a monthly fee, but you just need to pay to use all platforms. This is the same as with Spotify, therefore, by paying once, you can use each platform.

As recommended by Google and Apple, I have to offer an in-app purchase for a monthly fee. The system is connected to user accounts that are managed by a server that is under my control. I store user subscription data, so if a user uses In-App purchases in iOS, the information is transferred to the central server to unlock the Android application (in case it has already been paid on another platform)

The problem is the following scenario: The user has a valid subscription that was paid through Google Play. IOS and Windows apps are also unlocked. Now the user uninstalls the Android application, goes to the Google Play website and cancels the subscription. In the current scenario, I cannot detect this, and the subscription will be valid for all other platforms.

Question: Is there any pattern to get around this? Spotify and co also solve this problem, so there must be a solution for this

+5
source share
1 answer

Well, the server that handles the authorization of the user (i.e. your server) must request the Google subscription API to check if the current subscription is still valid. Each SubscriptionPurchase resource contains information about when a subscription expires.

(see https://developers.google.com/android-publisher/api-ref/purchases/subscriptions )

The same things apply for Apple: you will receive a receipt, and with this receipt you can request a server at any time to check if this subscription is valid.

There is a slide that describes these points and traps very well: https://speakerdeck.com/rosapolis/the-recurring-nightmare-cross-platform-in-app-subscription-purchases

Bottom line: you cannot do this without a server that communicates between the two stores. This is due to problems, however, as the slide shows.

Bonus: The discussion the slides are made of is also on Youtube.

+1
source

Source: https://habr.com/ru/post/1268636/


All Articles