Hive Server API reference¶
This guide explains Hive Server APIs required to use Hive platform; Auth v4 Token Verification API and IAP v4 Receipt Verification API, and outlines how to implement 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: 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 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_transaction_id
and hiveiap_market_pid
, which are the response to the receipt verification.
Field Name | Description | Type | Required |
hiveiap_transaction_id | 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) | String | N |
hiveiap_market_id | Market code which distinguishes the store user paid. 1: Apple App Store 2: Google Play Store 3: Lebi 4: ONE store Deliver only when the response code is 0 (verification success) | Integer | N |
hiveiap_transaction_id
is a unique key of the receipt successfully verified that 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 Server. In addition, Hive Server 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_pid
is 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.
item¶
item is a system to integrate and manage the delivering and retrieving features of game money & item in games. By 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 Item is that if 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 Item on Hive Developers.
Note
Make sure to register the game server URL and items on Item Management menu of Hive Console to sync with it. For more information about Item Management, see the Operation > Billing > Item Management page on Hive Developers.