Skip to main content

billdog_superwall 1.2.0-beta.1 copy "billdog_superwall: ^1.2.0-beta.1" to clipboard
billdog_superwall: ^1.2.0-beta.1 copied to clipboard

Optional bridge between Superwall paywalls and BillDog purchases for Flutter. Superwall presents; BillDog buys, restores and owns entitlements.

billdog_superwall #

The bridge between Superwall paywalls and BillDog purchases for Flutter: Superwall presents the paywall, BillDog buys, restores and owns the entitlements.

SuperwallBillDogPurchaseController is a Superwall PurchaseController backed by billdog_flutter. Every purchase and restore a Superwall paywall starts goes through BillDog, and BillDog's customer info drives Superwall's subscription status. billdog_flutter itself does not depend on Superwall; add this package only if you use Superwall.

Install #

dependencies:
  billdog_flutter: 1.2.0-beta.1
  billdog_superwall: 1.2.0-beta.1
  superwallkit_flutter: ^2.6.0   # verified against 2.6.0 and 2.8.0

Use the same version for billdog_flutter and billdog_superwall.

Use #

import 'package:billdog_flutter/billdog_flutter.dart';
import 'package:billdog_superwall/billdog_superwall.dart';
import 'package:superwallkit_flutter/superwallkit_flutter.dart' as sw;

await BillDog.configure('bd_public_...');

final controller = SuperwallBillDogPurchaseController(
  // BillDog entitlement id -> the Superwall entitlement it is reported as (unmapped ids pass through).
  entitlementMap: {'pro': 'premium'},
  // Superwall paywall id -> the BillDog offering behind it, so purchases are credited to it.
  offeringMap: {'onboarding_paywall': 'default'},
);
sw.Superwall.configure('pk_...', purchaseController: controller);
controller.startSyncingSubscriptionStatus();
  • With syncIdentity (on by default) Superwall's user is identified as BillDog's app user id; an anonymous BillDog id is never sent.
  • On Android the bridge buys the base plan and offer the Superwall paywall selected.
  • Forward SuperwallDelegate.handleCustomPaywallAction(name) to controller.handleCustomPaywallAction(name) to start BillDog web checkout from a billdog_web_checkout:<productId> paywall action, and the app's incoming links to controller.handleDeepLink(uri).

Full guide: billdog.io/docs/superwall-integration.

0
likes
145
points
672
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Optional bridge between Superwall paywalls and BillDog purchases for Flutter. Superwall presents; BillDog buys, restores and owns entitlements.

Homepage

License

MIT (license)

Dependencies

billdog_flutter, flutter, superwallkit_flutter

More

Packages that depend on billdog_superwall