Phaser API Documentation

  Version: 
purchase(productID, [developerPayload])

Description:

Begins the purchase flow for a specific product.

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 purchase 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 purchasefail event instead.

Parameters:

name type arguments description
productID string

The identifier of the product to purchase.

developerPayload string <optional>

An optional developer-specified payload, to be included in the returned purchase's signed request.

Returns:
Description:

This Facebook Instant Games Plugin instance.

Examples:
Since: 3.13.0