PlayerIO

The fastest way to build online games without breaking a sweat.

  • Supports Buying Coins
  • Supports Direct Purchase

Kongregate PayVault Provider

Setting up your Kongregate account

  1. Sign up for Kongregate on http://www.kongregate.com/
  2. Upload your Flash game to Kongregate
  3. Go to the edit game page. You can reach this page by appending /edit to your game's URL on Kongregate, for example: http://www.kongregate.com/games/MyUser/MyGame/edit
  4. On this page, you need to set the API Callback URL This URL is specific per game, and you can find it on the PayVault configuration page in the Games Control Panel for your game.
  5. Go to the item setup page. You can reach this page by appending /items to your game's URL on Kongregate, for example: http://www.kongregate.com/games/MyUser/MyGame/items
  6. For each amount of Coins you want the users to be able to buy, you need to create a corresponding item:
    • Set the Identifier to coins + the amount, for example coins500 for an item that will award 500 Coins.
    • Set the price to how much in Kreds you want to charge for the given amount of Coins.
    • Set the number of uses to exactly 1.
    • ...and set the rest of the fields to whatever you see fit. You should probably set the Name and Description to something that lets the user know they're buying virtual currency in your game.
  7. For each PayVaultItem you want the users to be able to buy, you need to create a corresponding item:
    • Set the Identifier to item + the itemkey, for example itemsupercar for an item that will award the user the PayVaultItem 'supercar'.
    • Set the price to how much in Kreds you want to charge for the given PayVaultItem.
    • Set the number of uses to exactly 1.
    • ...and set the rest of the fields to whatever you see fit.

Configuring Kongregate on PlayerIO

  1. Enable Kongregate in the PayVault Control Panel for your game.
  2. Enter the Kongregate API Key You can find this value on the API Information page for your game on Kongregate. You can reach this page by appending /api to your game's URL on Kongregate, for example: http://www.kongregate.com/games/MyUser/MyGame/api

Buying Coins and Items

Unlike the other PayVault providers, buying coins and items through Kongregate doesn't require you to first call the GetBuyCoinsInfo() or GetBuyItemsInfo() methods, and you also can't specify a payload when purchasing items.

Note that PayVault for Kongregate only works for users that have connected to your game through Kongregate Authentication.

However, the only thing you need to do to let the user do a purchase is to start an item purchase through the Kongregate Client API. When a user buys one of the coins items you've specified, that user will receive the corresponding amount of Coins in their PayVault. When a user buys one of the item items you've specified, that user will receive the corresponding PayVaultItem.

Example of buying coins with Kongregate in ActionScript 3:

Example of buying an item with Kongregate in ActionScript 3:

Note that this provider is implemented this way: When the user completes a purchase on Kongregate, PayVault will request that user's inventory on Kongregate, look for items with identifiers that start with 'coins' or 'item', and use up those item instances on Kongregate before awarding the corresponding coins or item. If your game on Kongregate already has items defined that don't match what PayVault expects, those items will not be touched by PayVault.