makePurchase

fun makePurchase(activity: Activity, product: AdaptyPaywallProduct, subscriptionUpdateParams: AdaptySubscriptionUpdateParameters? = null, isOfferPersonalized: Boolean = false, callback: ResultCallback<AdaptyPurchasedInfo?>)

To make the purchase, you have to call this method.

Should not be called before activate

See also

Parameters

activity

An Activity instance.

product

An AdaptyPaywallProduct object retrieved from the paywall.

subscriptionUpdateParams

An AdaptySubscriptionUpdateParameters object, used when you need a subscription to be replaced with another one, read more.

isOfferPersonalized

Indicates whether the price is personalized, read more.

callback

A result containing the AdaptyPurchasedInfo object (is null if and only if it was a subscription change with the DEFERRED replacement mode). This model contains information about the purchase and the user's profile. The profile, in turn, includes details about access levels, subscriptions, and non-subscription purchases. Generally, you have to check only access level status to determine whether the user has premium access to the app.