dooboolab-community / react-native-iap

In App Purchase module for React Native!
https://react-native-iap.dooboolab.com
MIT License
2.75k stars 632 forks source link

Android account hold and restore features #1159

Closed clems36 closed 3 years ago

clems36 commented 3 years ago

I've come across this worrying message in the Play Store:

Reminder: You must support account hold and restore in your app by November 1, 2020. Subscription pause and resubscribe will also be enabled by default unless you explicitly opt out.

What does that mean for react-native-iap? Are these features supported by the latest version?

These are my current subscription settings, i'm not sure if this is compliant with this warning:

Screenshot 2020-10-16 at 12 52 12

Could someone help me out understanding this better ?

glafont commented 3 years ago

Go check : https://developer.android.com/google/play/billing/subs#lifecycle and https://developer.android.com/google/play/billing/subs#account-hold

I tried to work of that this morning. Here's what I did for the "on hold" issue :

Back-end

Mobile app

Play Console

I'm definitively not sure that this is the solution but this is what I'm going to do. I think the warning message is about enabling the "Account hold" into the play console settings. Just be sure that your app can handle properly an account with a subscription that would be on hold (message + blocking subscription features).

roots-ai commented 3 years ago

Go check : https://developer.android.com/google/play/billing/subs#lifecycle and https://developer.android.com/google/play/billing/subs#account-hold

I tried to work of that this morning. Here's what I did :

Back-end

  • Modified back-end subscription check function to compute the "On Hold" status and return failure + message to the user (according to the documentation)

Mobile app

  • On subscription check from the mobile, display alert message when the new back-end response occurs and lock all content (== disable subscription)

Play Console

  • Enable "Account hold" for all users

I'm definitively not sure that this is the solution but this is what I'm going to do. I think the warning message is about enabling the "Account hold" into the play console settings. Just be sure that your app can handle properly an account with a subscription that would be on hold (message + blocking subscription features).

That's not right. It means we have to incorporate account hold and restore functionality from the app as well. I have seen the same functionality in some of the apps recently, not sure how to to do this with RNIAP.

glafont commented 3 years ago

That's not right. It means we have to incorporate account hold and restore functionality from the app as well. I have seen the same functionality in some of the apps recently, not sure how to to do this with RNIAP.

Sorry I did not add enough details : my app already have a restore function so I forgot to mention it and I only talked about "account on hold". I've just edited my previous post to correct it.

What to you mean by incorporating account hold ? Do you have the name of the apps you are mentioning ?

Restore : Restoring purchases is a pretty common IAP process and I think RNIAP supports restoring since the very beginning. There's a ton of documentation everywhere.

Account hold : from my understanding, account holding is just a way to keep user on the hook of the subscription, it's past grace period, supposed to notify the user, so I guess that functionality just supposed to offer a new chance to the customer to update its payment method without having to subscribe again. The account is "hold" during 30 days where the customer is prompt to update its payment method. My guess is that Google now makes account holding mandatory just to keep more customers using IAP transactions because it's obvious that this will improve sales.

Please, correct me if I'm wrong.

clems36 commented 3 years ago

Hey @looggi thank you for your answer, i'm looking into in right now. Do you know if there is a way to fake a payment failure? I want to see what the API returns in that case to see how to implement Account hold. Restore is already implemented on my side as well.

I have one more question. The Play Store mentions that Account Hold will be required from November 1st. I'm guessing this means that they won't let you upload an app with Account hold set to "Disabled" or "Enabled for licensed testers" in the subscription settings. But what happens if you just set it to "Enabled" but you don't handle the "On hold" response in your app? That is of course not my goal but i'm wondering if that would affect the app's behaviour at all...

glafont commented 3 years ago

what happens if you just set it to "Enabled" but you don't handle the "On hold" response in your app? That is of course not my goal but i'm wondering if that would affect the app's behaviour at all...

@clems36 I'm just guessing but I would not be surprised if the required part will concerns just the Play Console settings. I don't think they will review the app to simulate an account on hold situation and see if you've implemented some specific response.

Guys, again, please correct me if I'm wrong. I'm in the same situation I need my app and subscriptions to work after November 1st

I didn't manage to simulate account hold so I blindly followed the specifications here : https://developer.android.com/google/play/billing/subs#lifecycle

clems36 commented 3 years ago

We're in the same boat. I don't think they will review the app neither, just check if the setting is enabled. I can't find how to simulate an Account Hold situation. The link you've shared points to native response codes but (correct me if i'm wrong) we don't know how react-native-iap handles these. Could you show an example of how you handled the response in your js code?

glafont commented 3 years ago

I use react-native-iap but I do back-end checks to validate the subscriptions while calling direclty Apple and Playstore services server to server so technically react-native-iap doesn't have a role here.

Account hold seems to be a status returned when you're going to check if your customer is a subscriber (== check subscription)

clems36 commented 3 years ago

Ok thanks for your help. Would love to know exactly what is returned by RNIP in an Account hold case. I'll keep the issue open until somebody from RNIAP sees this.

hyochan commented 3 years ago

Thanks for the important discussion. I've tried exposing more variables from the new android SDK which is v3, and exposed obfuscatedAccountIdAndroid and obfuscatedProfileIdAndroid in #1171 but nothing more than that. Would this be needed? I currently need to investigate this but I also think there isn't anything that could be provided in react-native-iap but rather it looks like the work is needed in the backend.

Hope I can have better clarification to help you around.

stale[bot] commented 3 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

andresesfm commented 3 years ago

More information here: https://stackoverflow.com/questions/64303962/you-must-have-account-hold-and-restore-implemented-in-your-app-by-november-1-2/64318101#:~:text=Play%20Console%20saying%3A-,You%20must%20have%20account%20hold%20and%20restore%20implemented%20in%20your,I%20am%20confused%20about%20this. and here: https://android-developers.googleblog.com/2020/06/new-features-to-acquire-and-retain-subscribers.html

There doesn't seem like we need to do anything else from the rn-iap side, you have to check your subscription and see if it's still valid on your end. Closing as stale, if more discussion needed, please reopen or even better, open a discussion instead of an issue.