InAppPurchase

external interface InAppPurchase : EventEmitter(source)

Properties

Functions

Link copied to clipboard
fun addListener(type: EventType, listener: EventListener)
Link copied to clipboard
abstract fun canMakePayments(): Boolean

whether a user can make a payment.

Link copied to clipboard
fun emit(type: EventType, vararg args: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
abstract fun finishAllTransactions()

Completes all pending transactions.

Link copied to clipboard
abstract fun finishTransactionByDate(date: String)

Completes the pending transactions corresponding to the date.

Link copied to clipboard
Link copied to clipboard

Resolves with an array of Product objects.

Link copied to clipboard
abstract fun getReceiptURL(): String

the path to the receipt.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun off(type: EventType, listener: EventListener)
Link copied to clipboard
fun on(type: EventType, listener: EventListener)
Link copied to clipboard
fun once(type: EventType, listener: EventListener)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun purchaseProduct(productID: String): Promise<Boolean>
abstract fun purchaseProduct(productID: String, opts: PurchaseProductOpts = definedExternally): Promise<Boolean>
abstract fun purchaseProduct(productID: String, opts: Double = definedExternally): Promise<Boolean>

Returns true if the product is valid and added to the payment queue.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun removeListener(type: EventType, listener: EventListener)
Link copied to clipboard

Restores finished transactions. This method can be called either to install purchases on additional devices, or to restore purchases for an application that the user deleted and reinstalled.

Link copied to clipboard