Flutter - Redirect user to the Subscription page in PlayStore/AppStore

531

You can launch the following URL. which will redirect to the Manage Subscription page in App Store for Apple.

launch("https://apps.apple.com/account/subscriptions");

and u can launch the following URL for Android.

launch(
  'https://play.google.com/store/account/subscriptions?sku=pro.monthly.testsku&package=com.example.app',
);

with replacing the sku and package for Android.

You will need to add url_launcher in pubspec.yaml

and import this package too,

import 'package:url_launcher/url_launcher.dart';
Share:
531
Kanwarpreet Singh
Author by

Kanwarpreet Singh

I am a hardcore programmer and programming has been my passion since i compiled my first hello-world program. Solving real problems of developers through tutorials has always been interesting part for me.

Updated on December 30, 2022

Comments

  • Kanwarpreet Singh
    Kanwarpreet Singh over 1 year

    I read that "Currently, the In-app Billing API does not provide support for programmatically canceling subscriptions from inside the purchasing app", I would like to redirect the user to this page to manage his own subscription.

    I am using the following package in_app_purchase to implement the In-app Module.

    I'm not able to find how to open the subscription page from an application in Flutter.

  • Roc Boronat
    Roc Boronat about 2 years
    Just to add some clarification. On Android, if you don't set the SKU, it forwards the user to the regular subscriptions screen on Google Play.
  • Roc Boronat
    Roc Boronat about 2 years
    Update: on Android, passing SKU to the URL seems to have no effect. It just forwards the user to the regular manage subscriptions screen.