---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.4
alternate:
  - https://yandex.com/dev/games/doc/en/sdk/construct-3/in-game-purchases.md
  - https://yandex.com/dev/games/doc/hi/sdk/construct-3/in-game-purchases.md
  - https://yandex.com/dev/games/doc/ko/sdk/construct-3/in-game-purchases.md
  - https://yandex.com/dev/games/doc/ru/sdk/construct-3/in-game-purchases.md
  - https://yandex.com/dev/games/doc/tr/sdk/construct-3/in-game-purchases.md
  - https://yandex.com/dev/games/doc/vi/sdk/construct-3/in-game-purchases.md
  - https://yandex.com/dev/games/doc/zh/sdk/construct-3/in-game-purchases.md
  - href: en/sdk/construct-3/in-game-purchases.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/games/doc/en/llms.txt

# In-app purchases

<!-- source: en/_includes/script-common.md -->
<!-- source: en/_includes/script/index-js.md -->

<!-- endsource: en/_includes/script/index-js.md -->

<!-- source: en/_includes/script/requirements-js.md -->

<!-- endsource: en/_includes/script/requirements-js.md -->

<!-- source: en/_includes/script/image-modal-js.md -->

<!-- endsource: en/_includes/script/image-modal-js.md -->
<!-- endsource: en/_includes/script-common.md -->

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:

- [Connect in-app purchases](https://yandex.com/dev/games/doc/en/console/purchases.md#connect) in the Yandex Games Developer Console.
- Configure the SDK to work with purchases.



## Portal currency {#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 info %}

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

{% endnote %}

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 {#enable}

After adding purchases and publishing a draft of your game, send an email requesting to enable purchases to [games-partners@yandex-team.com](mailto:games-partners@yandex-team.com){.external}. 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 {#purchase}

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:

![](../../_images/construct-3/in-game-purchases/purchase.webp)



## Purchase handling {#process}

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) {#constant}

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.

![](../../_images/construct-3/in-game-purchases/non-consumable-purchase.webp)


### Consumable purchase (in-game currency) {#consumable}

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.

![](../../_images/construct-3/in-game-purchases/consumable-purchase.webp)



## Product catalog {#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.

![](../../_images/construct-3/in-game-purchases/for-each-in-catalog.webp)


---


<!-- source: en/_includes/button-git.md -->
<a href="https://github.com/yandex-games-plugins/construct3">
  <span class="button">Repository</span>
</a>
<!-- endsource: en/_includes/button-git.md -->
