Solved

How to know the difference between the Google Store account I subscribed to and the current Google Store account?

  • 28 November 2022
  • 3 replies
  • 94 views

Badge +3
  • User John
  • Custom App ID: 8EFA
  • Android Device A
  • Android Device B
  • Goole Play Account: John
  • Goole Play Account: Tom

Scenario:

  1. John logs in RevenueCat device A(John account) with custom ID(8EFA) and purchases Subscription $5 monthly Item.
  2. John logs in RevenueCat with the same custom ID(8EFA) device B(Tom account).
  3. Click the $10 monthly subscription Item.

Expected Result: Pop up Message “The current Google Play Store account does not match the account you paid for” and link the managementURL deepLink

Actual Result: Purchase process again.

 

What I have done:

I read this question. 

and Idea with Google Play Developer API

  1. Save play store account ID after purchase(using billingFlowParam?? or receipt)
  2. When subscription event fire,  check current play store account and saved store account

Here is the question

  1. How to know current Google Play account
  2. Is it accurate above idea? or I would love to better idea
icon

Best answer by sharif 3 December 2022, 02:05

View original

3 replies

Userlevel 5
Badge +9
  1. How to know current Google Play account

 

I’m not sure but I don’t think Google lets you do this and I don’t think RevenueCat will work well with any workarounds that use Google’s Billing Client directly.

 

  1. Is it accurate above idea? or I would love to better idea

 

The closest solution would be to first check RevenueCat to see if 8EFA has any existing purchases, and if so don’t let them make another purchase (for example, don’t show them the paywall.) The management URL will always point to the Google account of the current device, there’s no way around this (because the Google account is used to log in to the Play Store and the management URL sends the user to the Play Store.)

Badge +3
  1. How to know current Google Play account

 

I’m not sure but I don’t think Google lets you do this and I don’t think RevenueCat will work well with any workarounds that use Google’s Billing Client directly.

 

  1. Is it accurate above idea? or I would love to better idea

 

The closest solution would be to first check RevenueCat to see if 8EFA has any existing purchases, and if so don’t let them make another purchase (for example, don’t show them the paywall.) The management URL will always point to the Google account of the current device, there’s no way around this (because the Google account is used to log in to the Play Store and the management URL sends the user to the Play Store.)

 

Thank your for your reply.

But. the question still remain. Block the paywall if user has any existing purchases. then How user upgrade or downgrade subscription?

Userlevel 5
Badge +9

But. the question still remain. Block the paywall if user has any existing purchases. then How user upgrade or downgrade subscription?

 

I didn’t consider this scenario, in that case yes hiding the paywall may result in some confusion on the user’s side.

If John tries to upgrade on Tom’s Google Play account, Tom’s subscription will be upgraded. This can be confusing for the user, but this makes sense because John must log in to the Play Store with his own Google account in order to upgrade his own subscription. As long as John doesn’t restore purchases (meaning you do not call restorePurchases or syncPurchases in your app) then the only thing John can do while logged in to Tom’s device is update Tom’s subscription.

It may make sense for you to block restores in RevenueCat: https://www.revenuecat.com/docs/restoring-purchases#restore-behavior. This will ensure that John can’t restore or take Tom’s purchases. But it shouldn’t be used if you allow users to purchase without logging in to your app.

Reply