Phaser API Documentation

purchase(productID, [developerPayload])


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.


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.


This Facebook Instant Games Plugin instance.

Since: 3.13.0