Android consumePurchaseAndroid

Consume a consumable purchase, allowing repurchase. Automatically acknowledges the purchase.

Wraps BillingClient.consumeAsync(ConsumeParams) — for consumables (re-buyable like coins). Same 3-day deadline as acknowledge. See the Google Play Billing reference.

Signature

kt
suspend fun consumePurchase(purchaseToken: String): Boolean

Parameters#

  • purchaseToken (required, string) — Purchase token from the Play Billing transaction.

Returns#

Promise<boolean>true once the purchase has been consumed.

Example

kt
openIapStore.consumePurchase(purchase.purchaseToken)

Note: Called automatically by finishTransaction() when isConsumable is true.