AppPurchase
Types
Link copied to clipboard
enum PurchaseType
Enum representing the type of purchase for ad-disabling purposes.
Link copied to clipboard
Subscription replacement modes for upgrade/downgrade.
Link copied to clipboard
interface SubscriptionVerificationListener
Listener for subscription verification results.
Properties
Functions
Link copied to clipboard
open fun changeSubscription(activity: Activity, currentSubsId: String, newSubsId: String, replacementMode: AppPurchase.SubscriptionReplacementMode): String
Upgrades or downgrades from a specific subscription.
Link copied to clipboard
Link copied to clipboard
Consumes a purchased product, allowing it to be purchased again.
Link copied to clipboard
Downgrades a subscription to a lower tier.
Link copied to clipboard
Gets the type of purchase that is disabling ads.
Link copied to clipboard
Gets all active subscriptions with their states.
Link copied to clipboard
Returns the "base" subscription offer — the one without trial or intro pricing phases.
Link copied to clipboard
ISO-8601 base billing cycle (e.g.
Link copied to clipboard
Returns the ISO-4217 currency code for a product's price.
Link copied to clipboard
ISO-8601 trial duration (e.g.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Formatted introductory price (the discounted, finite-recurring phase) across all offers of a subscription.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns the full pricing-phase list of the resolved base offer — useful for paywalls that want to render every phase (trial → intro → recurring).
Link copied to clipboard
Returns the formatted base (post-trial / post-intro) price for a subscription.
Link copied to clipboard
Raw numeric price (currency unit, not micros) — useful for analytics events that expect a
double amount.Link copied to clipboard
Localized Play Console product description.
Link copied to clipboard
Escape hatch: returns the raw ProductDetails for callers that need fields not surfaced by the typed helpers (e.g.
Link copied to clipboard
Clean Play Console product name (without the app-name suffix).
Link copied to clipboard
Play Console title (includes the app name suffix Play appends, e.g.
Link copied to clipboard
Gets the category of a purchased product.
Link copied to clipboard
Gets the PurchaseItem configuration for a product ID.
Link copied to clipboard
Gets the subscription result for a specific product.
Link copied to clipboard
Gets the subscription expiry time in milliseconds.
Link copied to clipboard
Gets the subscription expiry time as a formatted string.
Gets the subscription expiry time as a formatted string with custom pattern.
Link copied to clipboard
Gets the remaining days until subscription expiry.
Link copied to clipboard
Gets the subscription state for a specific subscription.
Link copied to clipboard
Returns the first offer on this subscription that contains a free-trial phase, or
null if no offer has a trial.Link copied to clipboard
Link copied to clipboard
Whether any offer on this subscription includes a free-trial phase (
priceAmountMicros == 0 with FINITE_RECURRING).Link copied to clipboard
Checks if user has a "Lifetime Premium" purchase specifically.
Link copied to clipboard
Checks if user has a lifetime premium purchase.
Checks if a specific product has been purchased and is currently owned.
Link copied to clipboard
Checks if user has a "Remove Ads" purchase specifically.
Link copied to clipboard
Checks if any subscription is cancelled but still has access.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Checks if a specific product is currently owned (purchased and not consumed).
Link copied to clipboard
Link copied to clipboard
Checks if user has an active subscription (including cancelled but not expired).
Checks if user has a specific active subscription.
Link copied to clipboard
Checks if a subscription has expired based on verified expiry time.
Link copied to clipboard
Link copied to clipboard
Refreshes and retrieves all current purchases from Google Play.
Refreshes and retrieves current purchases for a specific product type.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Sets a listener to receive purchase history events.
Link copied to clipboard
Link copied to clipboard
Sets a callback for server-side subscription verification.
Link copied to clipboard
Link copied to clipboard
Checks if ads should be disabled based on any purchase type.
Link copied to clipboard
Link copied to clipboard
open fun updateSubscription(activity: Activity, newSubsId: String, oldPurchaseToken: String, replacementMode: AppPurchase.SubscriptionReplacementMode): String
Upgrades or downgrades a subscription.
Link copied to clipboard
Upgrades a subscription to a higher tier.
Link copied to clipboard
Verifies all active subscriptions with your backend server.
Link copied to clipboard
Link copied to clipboard
open fun verifySubscription(subscriptionId: String, listener: AppPurchase.SubscriptionVerificationListener)
Verifies a subscription with your backend server to get the expiry date.
Link copied to clipboard
Checks if all subscriptions will auto-renew.