Billing

interface Billing(source)

Inheritors

Properties

Link copied to clipboard
abstract val purchaseResults: MutableStateFlow<InternalPurchaseResult?>

Functions

Link copied to clipboard
abstract suspend fun awaitGetProducts(identifiers: Set<String>): Set<StoreProduct>
Link copied to clipboard
abstract suspend fun consume(purchaseToken: String): Result<String>
Link copied to clipboard
Link copied to clipboard
abstract suspend fun getStorefrontCountryCode(): String?
Link copied to clipboard
abstract suspend fun queryAllPurchases(): List<Purchase>
Link copied to clipboard
open suspend fun queryAllPurchasesResult(): Result<List<Purchase>>

Every purchase Play returns, or a failure when Play couldn't be asked (billing not ready, a query timed out or its retries ran out). Unlike queryAllPurchases, a failed read is never mistaken for "no purchases".

Link copied to clipboard
abstract suspend fun querySubscriptionPurchases(): Result<List<Purchase>>

Fails when Play can't be asked, so a failure is never mistaken for "no subscriptions".