Skip to main content

In-Game Purchases

You can generate revenue by offering users the option to make in-game purchases. For example, they can buy extra time for completing a level or accessories for their character. To do this:

Portal Currency

Yan is the portal currency of the Yandex Games platform. You can use them to pay for in-game purchases. Yans are stored on the player's balance, which is shared across all games and can be topped up with a bank card. The exchange rate of Yans to rubles is dynamic.

info

For international payments, the exchange rate of one Yan to the national currency depends on the player's country.

Players can top up their balance:

  • In the catalog header.
  • In the player profile.
  • When making an in-game purchase.

Users can also earn Yans as bonus rewards for participating in promos or purchasing fixed packages.

Both authorized and unauthorized Yandex users can make in-game purchases. Users can log in directly during the game, including at the time of making a purchase.

The introduction of the portal currency will not affect the terms and conditions for paying the licensing revenue to developers.

Connection Requirements

After adding purchases and publishing the game draft, send a request to enable purchases to games-partners@yandex-team.ru. Be sure to include your game's name and identifier (ID) in the email.

After receiving a confirmation reply from games-partners@yandex-team.ru saying that the purchases have been enable, you'll be able to configure and test them out.

Purchase Process

You can activate the in-game purchase process using the Initialize purchase method with the following parameters:

IDstringA unique product identifier in the catalog.
PayloadstringOptional data sent with the purchase.

After the player successfully makes a purchase, the Specific product purchase success and On any purchase success triggers will be activated.

However, if the player doesn't make a purchase and closes the window, the Specific product purchase error and On any purchase success triggers will be activated.

The triggers above give you access to expressions for handling successful or unsuccessful purchases:

Purchase example

Purchase Handling

There are two types of purchases:

  • Permanent purchases, usually made once.
  • Consumable purchases, made multiple times.

To handle both types of purchases, it's recommended to use the For each purchase loop, which provides access to the following expressions:

Persistent purchase example

Permanent Purchase (Ad Removal)

The logic for handling a permanent purchase would look like this:

  • After a successful purchase, disable ads.
  • Check if the purchase is active each time the game is launched. If it is, disable ads.
Persistent purchase example

Consumable Purchase (In-Game Currency)

The logic for handling a consumable purchase would look like this:

  • After a successful purchase, consume the purchase using the Consume purchase method and credit the in-game currency.
  • Check if the purchase is still present each time the game is launched. If it is, consume the purchase using the Consume purchase method and credit the in-game currency.
Persistent purchase example

Product Catalog

To get a list of available purchases, their prices, names, and descriptions, use the

For each product loop.

The loop provides access to the following expressions:

For each product expressions For each product in catalog example