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

Automatic store-purchase capture for the InfluTo Flutter SDK: listens to in_app_purchase and reports each purchase to InfluTo, so store-direct apps need no manual reporting.

influto_iap #

Automatic store-purchase capture for the InfluTo Flutter SDK (influto).

Add this companion to a store-direct app (one that validates purchases via Apple/Google directly, not RevenueCat) and InfluTo reports purchases for you — no manual reportPurchase calls. It listens to in_app_purchase's purchaseStream, extracts the store-signed proof (StoreKit 2 JWS on iOS / Play purchase token on Android), and forwards each new purchase to InfluTo.instance.reportPurchase, deduped so a purchase is never reported twice. enable() also runs a one-time back-sync of existing purchases.

It self-gates: if the app isn't store-direct (or InfluToConfig.autoCapture is false), the observer is a no-op — so RevenueCat apps stay silent even if it's wired in.

Install #

dependencies:
  influto: ^1.0.0
  influto_iap: ^1.0.0

Usage #

Call enable() once at startup, after InfluTo.instance.initialize(...):

import 'package:influto_iap/influto_iap.dart';

final observer = InfluToPurchaseObserver(
  // Android one-time / consumable SKUs — listing them routes those purchases to one-time
  // (NON_RENEWING) validation. Omit if you only sell subscriptions; iOS needs nothing.
  oneTimeProductIds: {'coins_100', 'remove_ads'},
);

final result = await observer.enable(); // listens + back-syncs existing purchases
print('back-synced ${result.sent}/${result.fetched} (${result.failed} failed)');

// later, on teardown:
observer.dispose();

Use exactly one reporting path per app: either this companion, a manual reportPurchase, or a RevenueCat webhook — never more than one.

License #

MIT — see LICENSE.

0
likes
130
points
20
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Automatic store-purchase capture for the InfluTo Flutter SDK: listens to in_app_purchase and reports each purchase to InfluTo, so store-direct apps need no manual reporting.

Homepage
Repository (GitHub)
View/report issues

Topics

#attribution #affiliate #influencer #in-app-purchase #revenuecat

License

MIT (license)

Dependencies

flutter, in_app_purchase, in_app_purchase_android, in_app_purchase_storekit, influto, shared_preferences

More

Packages that depend on influto_iap