consumePurchase

open fun consumePurchase()


open fun consumePurchase(productId: String)

Consumes a purchased product, allowing it to be purchased again. Call this after you have granted the user their items/credits.

For consumable products (e.g., coins, gems), you must consume the purchase to allow the user to buy it again. The flow should be:

  1. User purchases product
  2. onProductPurchased callback fires
  3. Grant user their items (update balance, etc.)
  4. Call consumePurchase(productId)
  5. onPurchaseConsumed callback fires (if listener set)

Parameters

productId

The product ID to consume.