-
public interface AppDNAPaywallDelegate13 paywall lifecycle methods incl. purchase, restore lifecycle (started/completed/failed), post-purchase deep-link/next-step.
-
-
Method Summary
Modifier and Type Method Description UnitonPaywallPresented(String paywallId)UnitonPaywallAction(String paywallId, String action)UnitonPaywallPurchaseStarted(String paywallId, String productId)UnitonPaywallPurchaseCompleted(String paywallId, String productId, Map<String, Object> transaction)UnitonPaywallPurchaseFailed(String paywallId, Throwable error, String errorType, String productId)A wrapper host cannot introspect error: it crosses the bridge as an opaque platform object, so a JS or Dart host could not tell a user cancel from a declined card from a dead network — and so could not decide whether a retry was even sensible.UnitonPaywallRestoreStarted(String paywallId)UnitonPaywallRestoreCompleted(String paywallId, List<String> restoredProductIds)UnitonPaywallRestoreFailed(String paywallId, Throwable error)UnitonPaywallDismissed(String paywallId)BooleanonPromoCodeSubmit(String paywallId, String code)Validate a user-entered promo code. UnitonPostPurchaseDeepLink(String paywallId, String url)Post-purchase: the SDK asks the host to open a deep-link URL. UnitonPostPurchaseNextStep(String paywallId)Post-purchase: the SDK asks the host to continue to the next onboarding step. -
-
Method Detail
-
onPaywallPresented
Unit onPaywallPresented(String paywallId)
-
onPaywallAction
Unit onPaywallAction(String paywallId, String action)
-
onPaywallPurchaseStarted
Unit onPaywallPurchaseStarted(String paywallId, String productId)
-
onPaywallPurchaseCompleted
Unit onPaywallPurchaseCompleted(String paywallId, String productId, Map<String, Object> transaction)
-
onPaywallPurchaseFailed
Unit onPaywallPurchaseFailed(String paywallId, Throwable error, String errorType, String productId)
A wrapper host cannot introspect
error: it crosses the bridge as an opaque platform object, so a JS or Dart host could not tell a user cancel from a declined card from a dead network — and so could not decide whether a retry was even sensible.errorTypeis the stable discriminator (userCancelled | productNotFound | verificationFailed | networkError | serverError | pending | providerNotAvailable | unknown).productIdis null only when no product was ever selected — a paywall selling two plans must say WHICH one failed.
-
onPaywallRestoreStarted
Unit onPaywallRestoreStarted(String paywallId)
-
onPaywallRestoreCompleted
Unit onPaywallRestoreCompleted(String paywallId, List<String> restoredProductIds)
-
onPaywallRestoreFailed
Unit onPaywallRestoreFailed(String paywallId, Throwable error)
-
onPaywallDismissed
Unit onPaywallDismissed(String paywallId)
-
onPromoCodeSubmit
Boolean onPromoCodeSubmit(String paywallId, String code)
Validate a user-entered promo code. Return true to accept, false to reject. Routed via sync_callbacks; defaults to reject on no-delegate/timeout (SPEC-070-C §3.7).
-
onPostPurchaseDeepLink
Unit onPostPurchaseDeepLink(String paywallId, String url)
Post-purchase: the SDK asks the host to open a deep-link URL.
-
onPostPurchaseNextStep
Unit onPostPurchaseNextStep(String paywallId)
Post-purchase: the SDK asks the host to continue to the next onboarding step.
-
-
-
-