Payments

In-game purchases let players buy items, upgrades, or currency. Optional, but often the highest-revenue feature for games that fit the IAP model. Enable payments only after ads, storage, and the core game loop are stable.

Two product types

Type
Example
Lifecycle

Permanent

"Remove ads", DLC

Bought once. Use getPurchases() to check ownership on every launch.

Consumable

Coins, gems, energy

Bought, granted, then must be consumed with consumePurchase(id). Until consumed it sits in the purchases list.

circle-exclamation

Support

Check this before showing the store or purchase buttons. If payments are unsupported, hide the IAP UI or use a non-payment fallback.

bridge.payments.isSupported
chevron-rightPlatform support · 12 of 28 platformshashtag

Supports: bitquest, crazy_games, discord, facebook, huawei, microsoft_store, msn, playdeck, playgama, portal, reddit, yandex

Does not support: absolute_games, dlightek, game_distribution, gamepush, gamesnacks, jio_games, lagged, ok, poki, samsung, telegram, tiktok, vk, xiaomi, y8, youtube

Setup

Configure products in the config file. Add an id for each product and fill in platform-specific price data. Example for one product:

{
    ...    
    "payments": [
        {
            "id": "test_product",
            "playgama": {
                "amount": 1 // int price in Gam
            },
            "playdeck": {
                "amount": 1, // int price in Telegram Stars
                "description": "TEST PRODUCT"
            }
        }
    ]
}

Purchase

Start a purchase flow for the product ID from your config. Call this only from a direct player action, such as pressing a buy button.

Each platform returns its own purchase fields. Check the target platform documentation before depending on platform-specific properties.

Use the returned purchase data for backend verification before granting valuable items. Playgama API verification currently supports only playgama, msn, and microsoft_store.

Consume Purchase

Mark a consumable purchase as used after you grant the in-game item. Do not call this for permanent products.

Catalog of All Items

Load the product catalog before showing your store. Use it for localized prices, currency codes, and platform-specific product metadata.

List of Purchased Items

Load the player's active purchases on startup and after reconnecting. Use this for permanent ownership checks and unprocessed consumables.

circle-exclamation

Last updated