Question

Managing subscriptions on multiple devices with the same App User ID

  • 8 April 2022
  • 5 replies
  • 840 views

Badge +1

Hello,

We’ve got a Flutter app that requires user register / login and we’re providing the SDK with an App User ID tied to those credentials to allow our users to share the same subscription among multiple devices. 

This is working fine and we recover the same Entitlements no mater the device the user Logs In.

What we’re having problems is with subscription management since many actions (Upgrade, Downgrade, etc...) will only work from the device that did the original purchase as stated in the docs:

 

Managing Subscriptions

A user can only manage their subscription on the platform it was purchased from.


Having the same App Account logged in in two devices with different Google Play accounts and calling Purchases.purchasePackage() generates the following error:

PlatformException(4, One or more of the arguments provided are invalid., {code: 4, message: One or more of the arguments provided are invalid., readableErrorCode: PurchaseInvalidError, readable_error_code: PurchaseInvalidError, underlyingErrorMessage: Couldn't find existing purchase for SKU: <sku>, userCancelled: false}, null)

 

And on a second try:

PlatformException(15, The operation is already in progress., {code: 15, message: The operation is already in progress., readableErrorCode: OperationAlreadyInProgressError, readable_error_code: OperationAlreadyInProgressError, underlyingErrorMessage: , userCancelled: false}, null)

 

After enough time has passed we’ll get a PlatformException 4  once again.

This is indeed the expected behaviour but we need a way to tell which devices are using the same Store Account that did the original purchase from those that don’t so we can disable unavailable options there.

 

We’ve checked the PurchaserInfo and EntilementInfo objects but found no way to tell.

We were actually expecting this to be available under ownerShipType but it shows as OwnershipType.unknown for everyone.

Is there any way from within the SDK to handle this?

 

Thanks in advance,

Roger

 


5 replies

Userlevel 3
Badge +5

👋 Hey @rlacamara-www!

I did some digging into this today with another engineer and it doesn’t appear that we have a great way within the SDK to handle this 😔 

One of the solutions would be to manually do a purchase history query. If there are no purchases on that device but there it an entitlement then you would know to not show that upgrade/downgrade options. But it might also get weird if there is a purchase for that user but its different than the logged in RevenueCat user.

I’m going to keep noodling on this but just wanted to let you know that we couldn’t think of an already built-in solution!

Userlevel 1
Badge +6

Managing Subscriptions

A user can only manage their subscription on the platform it was purchased from.

 

Does this statement really mean the user can only manage their subscription on the device in which he purchased the subscription? For what I read it’s actually saying “on the platform”, not “ont he device” it was purchased from.

For example, if a user has purchased a subscription in an Android device, he could then only manage his subscription on Google Play Store on any Android device, whereas if the user has purchased the subscription on an iPhone then he would only be able to manage his subscription on Apple’s App Store on any iOS device.

Is my understing about it correct? Or does the user really can only manage his subscription on the actual device he used to purchase the subscription? 

Userlevel 3
Badge +5

Hey @UlyssesAlves

Is my understing about it correct? Or does the user really can only manage his subscription on the actual device he used to purchase the subscription? 

 

The user can manage their subscription from any device on the platform it was purchased (as long as the same account that purchased the subscription is the one that is logged in)

Example: I have an iPhone and an iPad. I can cancel my subscriptions on either of those because I’m logged into the same Apple ID on both.

Hope this helps!

Userlevel 1
Badge +6

The user can manage their subscription from any device on the platform it was purchased (as long as the same account that purchased the subscription is the one that is logged in)

That’s what I thought. 

But if this is the case, I can’t see why it could be an issue as described by @rlacamara-www when he said

What we’re having problems is with subscription management since many actions (Upgrade, Downgrade, etc...) will only work from the device that did the original purchase as stated in the docs:

Wouldn’t it be a solution @rlacamara-www if you write your code in a way that’s not dependend upon the device on which the subscription was purchased? Then you could just verify the platform (Android or iOS) rather than the physical device.

Badge +5

Running into a similar issues myself too.

First, to clarify, so is it the platform or the device that matters? @joshdholtz  your example was iPad and iPhone but the question was about iOS vs Android. If I purchase on Android phone and then login on my iPad, I can definitely compare the platform vs the “store” value in customerInfo object to tell the iPad app to repoint the user back to Android.

How would this work for repeated or multiple purchases, not just the first one?

 

Reply