# consume()

Consumes an in-app purchase by its purchase token.

Purpose [#purpose]

Consumes a consumable in-app purchase using its purchase token. This is typically used for Google Play Store purchases that need to be consumed before they can be purchased again.

Signature [#signature]

```dart
Future<String> consume(String purchaseToken)
```

Parameters [#parameters]

<TypeTable
  type="{
  purchaseToken: {
    type: &#x22;String&#x22;,
    description: &#x22;The purchase token of the in-app purchase to consume.&#x22;,
    required: true,
  },
}"
/>

Returns / State [#returns--state]

Returns a `Future<String>` that resolves to the purchase token of the consumed purchase.

Usage [#usage]

Consuming a purchase after you have granted the benefit:

```dart
Future<void> consumeGrantedPurchase(String purchaseToken) async {
  try {
    final consumedToken = await Superwall.shared.consume(purchaseToken);
    print('Purchase consumed: $consumedToken');
  } catch (e) {
    print('Failed to consume purchase: $e');
  }
}
```

> **Note**

On Android, `purchaseToken` comes from Google Play's purchase result. The current Flutter `StoreTransaction` wrapper does not expose this token from Superwall's `transactionComplete` event.



Related [#related]

* [`PurchaseController`](/docs/flutter/sdk-reference/PurchaseController) - Handles purchase logic
* [`Consumable Products`](/docs/flutter/guides/consumable-products) - End-to-end setup for consumable products