İçeriğe geç
InstaPlay
SDK belgelerinin bölümleri

Upcoming SDK features

Draft, subject to change. SDK v1 has no shop.* methods yet — they will come with purchases on the portal. The shapes below are shown in advance so you can prepare your game; the final signatures will be fixed by the purchases release (an entry in the changelog).

Ads are already here: ads.interstitial(), ads.rewarded() and ads.available() — SDK 1.3, the Ads page.

Check in advance

The Feature type already knows shop. Today the check returns false — on the portal, in preview and in the emulator:

InstaPlay.isSupported('shop') // false

Put purchase code behind such a check only: once the feature arrives, it will work without a rebuild, and until then it will not call what does not exist. Payments outside the portal and your own ad networks are forbidden (external_monetization).

Purchases: shop (sketch)

An in-game purchase is a spend of the player's coins through a portal window: the game sees neither payment data nor the wallet. Prices, currency and receipt checks on your server are in development; below is only a sketch of the names, without data shapes:

InstaPlay.shop.products() // the game's product catalog
InstaPlay.shop.purchase(productId) // purchase through a portal window
InstaPlay.shop.consume(purchaseId) // consume a consumable item
InstaPlay.shop.owned() // what the player already owns

Do not build your game economy on these shapes: fields, error codes and behavior may change.

What will not change

  • isSupported is the only correct way to find out whether purchases are available.
  • Calling a missing feature answers with the not_supported error (errors and limits).