In-app purchases

You can generate revenue by offering users the ability to make purchases in your game. For example, extra time to complete a level or accessories for a game character.

To do this:

Portal currency

Yan is the portal currency of the Yandex Games platform for in-app purchases. Yans are stored in a player's balance that is shared across all games and can be topped up using bank cards. The Yan to ruble exchange rate is dynamic.

Note

For international payments, the Yan exchange rate will depend on the player's country.

The balance can be topped up:

  • in the catalog header;
  • in the player's profile;
  • during in-game purchases.

Users can also receive Yans as a bonus for participating in promotions or purchasing fixed packs.

Both Yandex-authorized users and non-authorized users can make in-app purchases. Users can authorize during gameplay, including at the moment of making a purchase.

The terms and conditions for paying license fees to developers will not change due to the introduction of the portal currency.

Connection requirements

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

After receiving a confirmation email that purchases are allowed, you will be able to configure and test them.

Purchase process

You can initiate the in-app purchase process with the Initialize purchase method, using the parameters:

Parameter

Type

Description

ID

string

Unique product identifier in the catalog.

Payload

string

Optional data sent with the purchase.

After a player successfully completes a purchase, the triggers Specific product purchase success and On any purchase success become active.

However, if the player does not complete the purchase and closes the window, the triggers Specific product purchase error and On any purchase error will become active.

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

Purchase handling

There are two types of purchases:

  • non-consumable, typically purchased once;
  • consumable, purchased multiple times.

For handling both types of purchases, we recommend using the For each purchase loop, which gives access to expressions in the Purchases list with the in purchases list postfix.

Non-consumable purchase (ad removal)

Non-consumable purchase handling logic:

  • After a successful purchase, disable ads.
  • At each game launch, check if the purchase is activated, and if so, disable ads.

Consumable purchase (in-game currency)

Consumable purchase handling logic:

  • After a successful purchase — process the purchase with the Consume purchase method and credit in-game currency.
  • At each game launch, check if the purchase is still present, and if so, process the purchase with the Consume purchase method and credit in-game currency.

Product catalog

To work with products in the catalog, use the For each product in catalog loop with expressions in the Purchases list with the in catalog postfix.


Repository