subfay 1.0.0 copy "subfay: ^1.0.0" to clipboard
subfay: ^1.0.0 copied to clipboard

Subfay Flutter SDK — subscriptions, in-app purchase entitlements and customer identity for your Flutter app.

Subfay Flutter SDK #

Entitlements, customers and subscription state for Flutter apps, powered by Subfay.

Install #

dependencies:
  subfay: ^1.0.0

Usage #

import 'package:subfay/subfay.dart';

// Configure once at startup with your publishable key
await Subfay.instance.configure(
  apiKey: 'pk_live_xxxxx',
  environment: Environment.production,
);

// Identify the signed-in user
await Subfay.instance.identify(externalUserId: 'user_123');

// Gate a feature on an entitlement
if (await Subfay.instance.hasEntitlement('premium')) {
  // unlock premium
}

// React to entitlement changes
Subfay.instance.entitlementsStream.listen((entitlements) {
  print('Active entitlements: $entitlements');
});

Purchases #

This SDK does not run store transactions. Take the purchase with your store plugin (e.g. in_app_purchase), send the receipt to your server, and validate it there with your secret key via POST /iap/validate. Once Subfay records the entitlement, it shows up here.

License #

MIT — see LICENSE.

0
likes
160
points
83
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Subfay Flutter SDK — subscriptions, in-app purchase entitlements and customer identity for your Flutter app.

Homepage
Repository (GitHub)
View/report issues

Topics

#subscriptions #in-app-purchases #entitlements #iap

License

MIT (license)

Dependencies

flutter, http, shared_preferences

More

Packages that depend on subfay