This guide explains Hive Server APIs required to implement Hive; Auth v4 Token Verification API and IAP v4 Receipt Verification API, and outlines how to implement Hive Item.
Required Server API
Auth v4 Token Verification
● API Guide: Verifying Authentication v4 Token
The Token Verification API responds by verifying the returned token validation from the game client after successful login.
If the game does not allow duplicate logins, you must save the token of the logged in user and implement the invalidation of the token used in the previous login, such as logout or game termination.
The token verification server serves a distributed environment for the bad connection with an overseas server. If the token verification does not respond via a common URL, you should implement the function that requests again verifying through a distributed environment URL.
IAP v4 Receipt Verification
● API Guide: Hive IAP v4 Verifying Receipt
Receipt Verification API performs validation on the in-app purchased receipt and then responds with the verification result as to whether the receipt is processed normally. Refer to the diagram below to learn more about the purchase process with Hive IAP v4.
It is required to request verifying the receipt from a game server to Hive server before delivering an item to the user who paid for the item in a game. Furthermore, you can find out whether to deliver the items or not based on
hiveiap_market_pid, which are the response to the receipt verification.
|Transaction ID generated by receipt succeeded verification. This value is saved in game server to check the duplicate receipt.
Deliver only when the response code is 0 (Verification success)
|Market code which distinguishes the store user paid.
1: Apple App Store
2: Google Play Store
3: HIVE Lebi
4: ONE store
Deliver only when the response code is 0 (verification success)
hiveiap_transaction_idis a unique key of the receipt successfully verified that Hive issues.
In order not to duplicate the receipt, the value is saved in a game server when delivering items, and then you can decide whether the receipt has been used or not. The receipt verification is the only basis for returning the value by Hive. In addition, Hive cannot distinguish whether the receipt was validated after the purchase attempt or by the restoring action due to the failure to send an item.
hiveiap_market_pidis item information extracted from the receipt or the verification result of the receipt. The item information sent through a client has a danger of memory transformation, so you must decide and deliver the items based on this value.
Hive item is a system to integrate and manage the delivering and retrieving features of game money & item in games. By Hive item, you can connect with diverse systems such as coupon system, event, offerwall and CPI to send or retrieve items, and back office for administrator is available to manually search the history of sending and retrieving items.
The structure of Hive Item is that if Hive Item Server calls send item API or retrieve item API to the game server, the game server responds to the request. For more details of the Server API, go to API > Hive Server API > Billing > Sync with Hive Item on Hive Developers.
Make sure to register the game server URL and items on Hive Item Management menu of Hive Console to sync with it. For more information about Hive Item Management, see the Operation > Billing > Item Management page on Hive Developers.