manage_iap_subscriptions 0.2.0 copy "manage_iap_subscriptions: ^0.2.0" to clipboard
manage_iap_subscriptions: ^0.2.0 copied to clipboard

Opens App Store or Google Play subscription management from Flutter on iOS and Android.

manage_iap_subscriptions #

A focused Flutter plugin that opens App Store or Google Play subscription management on iOS and Android.

The caller explicitly chooses the store:

await showAppStoreSubscriptionManagement();
await showGooglePlaySubscriptionManagement();

It does not purchase, restore, query, validate, or synchronize subscriptions.

Platform behavior #

Requested store iOS 15.0+ Android API 24+
App Store Presents StoreKit's native management sheet. Opens Apple's subscription management website.
Google Play Opens the Google Play subscriptions website. Opens the Play Store app, with a browser fallback.

Other platforms and stores are not supported.

Development #

The Flutter SDK version is pinned through .fvmrc. Install and use it with:

fvm install
fvm flutter pub get
fvm flutter test

Installation #

Add the package to your pubspec.yaml:

dependencies:
  manage_iap_subscriptions: ^0.2.0

Then run:

flutter pub get

Usage #

import 'package:flutter/services.dart';
import 'package:manage_iap_subscriptions/manage_iap_subscriptions.dart';

Future<void> openSubscriptionManagement() async {
  try {
    await showAppStoreSubscriptionManagement();
    // Or:
    await showGooglePlaySubscriptionManagement();
  } on PlatformException catch (error) {
    // Show an error appropriate for your app.
    print('Could not open subscription management: ${error.message}');
  }
}

The future completing does not mean that the user changed or cancelled a subscription. The stores do not return that information through this API.

Store behavior #

App Store #

On iOS, the plugin calls AppStore.showManageSubscriptions(in:). StoreKit determines whether the sheet displays production, sandbox, TestFlight, or local StoreKit test data.

On Android, the plugin opens Apple's web-based subscription management:

https://account.apple.com/account/manage/section/subscriptions

The call can fail with:

  • window_scene_unavailable if there is no foreground UIWindowScene.
  • app_store_unavailable if the web interface cannot be opened.
  • subscription_management_failed if StoreKit cannot present the sheet.

Google Play #

On Android, the plugin opens the Play Store app and falls back to a browser when the app is unavailable. On iOS, it opens the same URL in the browser:

https://play.google.com/store/account/subscriptions

This shows the signed-in Play account's subscription center. The plugin deliberately does not accept a product ID and therefore does not deep-link to one specific subscription.

The call can fail with:

  • plugin_not_attached if the plugin is not attached to a Flutter engine.
  • google_play_unavailable if neither the Play Store app nor the website can be opened.
  • subscription_management_failed for another native launch error.

Scope #

This package:

  • Lets the caller choose App Store or Google Play explicitly.
  • Uses native management where the requested store matches the device platform.
  • Uses the store's web management on the other mobile platform.
  • Contains no purchase, restore, receipt, entitlement, or backend logic.
  • Does not provide confirmation dialogs or other application UI.

Publishing #

After the first version has been published manually and GitHub automated publishing has been enabled in the package's pub.dev Admin tab, publishing a GitHub Release automatically publishes the corresponding package version.

The release tag and pubspec.yaml version must match:

pubspec.yaml: 0.2.0
GitHub tag:    v0.2.0

Configure pub.dev automated publishing with:

Repository: dieringe/manage_iap_subscriptions
Tag pattern: v{{version}}

Draft releases do not publish the package. The workflow starts when the release is published.

License #

MIT

1
likes
160
points
156
downloads

Documentation

API reference

Publisher

verified publisherdieringe.com

Weekly Downloads

Opens App Store or Google Play subscription management from Flutter on iOS and Android.

Repository (GitHub)
View/report issues

Topics

#in-app-purchases #subscriptions #storekit #google-play

License

MIT (license)

Dependencies

flutter

More

Packages that depend on manage_iap_subscriptions

Packages that implement manage_iap_subscriptions