User who canceled subscription can't restore purchase

  • 21 December 2021
  • 2 replies

Userlevel 1
Badge +7
  • Dedicated Member
  • 21 replies

We are using Flutter and have an Android user who paid for a monthly subscription Dec 9th and canceled, but their subscription should be active until Jan 9th. They were trying to restore their purchase several times but it seems like restoring just hangs after waiting up to 2 minutes. The success/failure toasts that normally appear don’t seem to be triggering for them. 

Other Android users have been able to restore their purchase successfully.

Are there any known issues for when users have canceled but are in an active subscription state? Pasted our restore purchase code & attached a screenshot of our user’s Google Play subscription screen.


Future<bool> restorePurchase(BuildContext context) async {
final PurchasesErrorCode? code = await requestToRestorePurchases();
if (code == null) {
triggerToast(context: context, text: 'Purchase restored!');
return true;
} else {
context: context, text: 'Could not restore existing subscription.');
return false;

Future<PurchasesErrorCode?> requestToRestorePurchases() async {
logPurchaseAction('purchase restore', {});

try {
final PurchaserInfo restoredInfo = await Purchases.restoreTransactions();
return null;
} on PlatformException catch (e, stackTrace) {
final PurchasesErrorCode code = PurchasesErrorHelper.getErrorCode(e);
if (code == PurchasesErrorCode.purchaseCancelledError) {
logPurchaseAction('purchase restore cancel', {});
} else {
error: e,
stackTrace: stackTrace,
name: 'Purchase',
message: 'Failed to restore purchases for $code',

return code;




Best answer by sharif 3 January 2022, 18:14

View original

2 replies

Userlevel 4
Badge +9

If they’re not seeing the success/failure toast in just a few seconds and the process is taking an unusually long time, this may be an issue on their device (e.g. slow network connection, too many background apps, etc.) It doesn’t seem to be widespread either judging from what you’re describing. Have they tried connecting to a different Wifi network and/or restarting the device? That would be my next troubleshooting step for them.

Userlevel 1
Badge +7

You’re right that it turned out that it works after they restart the app with Wifi on, thanks!