Skip to content

4. Consume purchased product

Iman khoshabi edited this page May 27, 2021 · 1 revision

Consume a purchased product using below function:

await FlutterPoolakey.consume(purchaseToken);

It consumes a product that you defined consumable in your business logic. If you consume a product, the user can buy that product again. Otherwise, users can only buy a purchasable product once.

If any error happened it throws a PlatformException with a stacktrace. You must handle the error with your logic.

purchaseToken is the purchase identifier

It returns true if the process is successful

Clone this wiki locally