Phaser API Documentation

  Version: 
consumePurchase(purchaseToken)

Description:

Consumes a specific purchase belonging to the current player. Before provisioning a product's effects to the player, the game should request the consumption of the purchased product. Once the purchase is successfully consumed, the game should immediately provide the player with the effects of their purchase.

It makes an async call to the API, so the result isn't available immediately.

If they are successfully subscribed this plugin will emit the consumepurchase event along with the purchase data.

If they cannot, i.e. it's not in the list of supported APIs, or the request was rejected, it will emit a consumepurchasefail event instead.

Parameters:

name type description
purchaseToken string

The purchase token of the purchase that should be consumed.

Returns:
Description:

This Facebook Instant Games Plugin instance.

Examples:
Since: 3.17.0