For the complete documentation index, see llms.txt. This page is also available as Markdown.

Payments

You are reading the documentation for Bridge SDK v2. If you need the obsolete v1 documentation, see Documentation (v1).

In-game purchases let players buy items, upgrades, or currency. 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"

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.

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
Platform support · 11 of 26 platforms

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

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

Setup

Configure products in the config under the payments key. Add an id for each product (you reference it in code) and fill in platform-specific price data under each platform key. Example for one 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.

Last updated