Premium Games in Gameroom

Due to the ongoing consolidation of the gaming ecosystem at Facebook, we have introduced important changes to the Web Games on Facebook and Facebook Gameroom platforms that might affect your games. To learn more read our blog post.

You may build a freemium game with in-app purchases (IAP) to award players with in-game items. In addition to IAP, we have two methods for you to provide paid content to players:

  1. Premium Game - Downloadable purchase before you play
  2. Trial Mode - Try before you buy

Please note that Premium Games is only available in the Gameroom client and not on Facebook Web.

Payment configuration

For both Premium Game and Trial Game flows, you need to configure your Payments Company and enable Payments Lite.

Payments Company

Under Canvas Payments, make sure that you have registered and configured your Payments Company:

Payments Testing

In the Testers box, you should add the Facebook IDs of your payment testers:

Payments Lite

Enable Payments Lite:

You can configure your game as a premium game in Gameroom. If you have already added the Gameroom Native product, select the Gameroom Native tab in your App Dashboard.

Toggle Yes for Premium, set a Default Price, and save your changes.

In Gameroom, players will see a Buy Now button before being able to launch your game.

Optional: You may choose to manually configure price points for different currencies via Local Prices. The price converts automatically to the player's currency if the Local Price is not specified.

Trial Game - SDK integration

Alternatively, you can allow the player to try the game before purchasing it. You will need to enable Premium and Trial Mode in the App Dashboard.

In Gameroom, players will be able to play your game via Play Now button:

License check

You will need to manually implement a license check (paywall) within your game to separate the trial and paid content. You may choose to implement trial mode with a content or time limit. For example, after the player finishes the first level, call this method to see if the player can continue immediately or if they need to purchase the game.

  (IHasLicenseResult result) => 
     if(result.HasLicense) {
       // allow player to play paid content
     else {
       // paywall - prompt player to purchase the game

Premium purchase

When the player completes the trial content or trial time period, you should prompt the player to purchase the game. Calling this method will display a payment dialog with the price configured in the App Dashboard. The callback provided will return a PayResult object that contains the proof of purchase of your game.

  (IPayResult result) =>
     // process the result - unlock paid content

A successful response looks like this:

  payment_id: 848929916459082, 
  quantity: "1", 
  status: "completed", 
  signed_request: "7QYHzKqKByA7fjiqJUh2bxFvEdqdvn0n_y1zYiyN6tg.eyJhbGCJxdWFudGl0eSI6IjEiLCJzdGF0dXMiOiJjb21wbGV0ZWQifQ"

A failure looks like this:

      "message":"An active access token must be used to query information about the current user.",

For more details, you should refer to the Payments Dialog documentation or the Unity SDK reference.