To activate Hive IAP v4, request IAP initialization before purchase. If you request to initialize IAP, Game Client returns available store information.
Store information is defined as IAPV4Type enum, and details in field are as following;

Market information

Field Name Description
APPLE_APPSTORE Apple App Store
GOOGLE_PLAYSTORE Google Play Store
HIVE_LEBI Hive Lebi Store
ONESTORE ONE Store
AMAZON_APPSTORE Amazon App Store (Available with SDK v4 only)
SAMSUNG_GALAXYSTORE Samsung Galaxy Store
HUAWEI_APPGALLERY Huawei App Gallery
HIVESTORE PG Payment (for Windows, Unity only)

 

Soft currency market in game should be available for users who enjoy the gameplay even after the game stops download service. Therefore, each game studio is required to code hard currency market and soft currency market separately. The result value sent by initializing IAP v4 is not for access to in-game market, so do not use the result value in different ways. Implement marketConnect() in the IAPV4 class to initialize Hive IAP v4.

Initialize Hive IAPv4

Followings are sample codes to initialize Hive IAP v4.

Unity®

API Reference: hive.IAPV4.marketConnect

C++

API Reference: IAPV4::marketConnect

Kotlin

API Reference: IAPV4.marketConnect

Java

API Reference: com.hive.IAPV4.marketConnect

Swift

API Reference: IAPV4Interface .marketConnect

Objective-C

API Reference: HIVEIAPV4::marketConnect

 

Notes for initialization

From Hive SDK v4 Unity Windows 23.0.0, Windows apps for Google Play are supported, and the GOOGLE_PLAYSTORE market can be used. In this case, please note the following during development:

  • Initialization (IAPV4.marketConnect) must be executed only after the IdP login with AuthV4.
  • When IAPV4.marketConnect is called for the first time, a Google account login screen for product payment, which allows the app user to select a Google account for payment in the market, will appear. This login process is not a feature that the app developer implements, but is automatically performed by the Hive SDK.
  • The Google account login for product payment is different from the Google IdP login provided by the Hive SDK authentication module (AuthV4). If a user previously logged in with any IdP (AuthV4) including Google IdP logs out, the Google account for product payment will also be automatically logged out.