onPurchaseInitiated
abstract fun onPurchaseInitiated(product: AdaptyPaywallProduct, onStartPurchase: AdaptyUiObserverModeHandler.PurchaseStartCallback, onFinishPurchase: AdaptyUiObserverModeHandler.PurchaseFinishCallback)
This callback is invoked when the user initiates a purchase. You can trigger your custom purchase flow in response to this callback, read more.
Parameters
product
An AdaptyPaywallProduct of the purchase.
onStartPurchase
A PurchaseStartCallback that should be invoked to notify AdaptyUI that the purchase is started.
From Kotlin:
onStartPurchase()Content copied to clipboard
From Java:
onStartPurchase.invoke()Content copied to clipboard
onFinishPurchase
A PurchaseFinishCallback that should be invoked to notify AdaptyUI that the purchase is finished successfully or not, or the purchase is canceled.
From Kotlin:
onFinishPurchase()Content copied to clipboard
From Java:
onFinishPurchase.invoke()Content copied to clipboard