IAP v4 transmitting Item delivery result
The item delivery result transmission API is an API that sends the result of item delivery to users who have purchased consumable goods through Hive IAP v4.
By implementing the item delivery result transmission API call, you can check the item delivery status in the Hive console Billing > Search Market Cancellation·Refund
Cancellation·Refund Inquiry menu. Item delivery status can be used as a basis for determining which users are abusive users.
Note
When making web PG payments, you must call the item delivery result transmission API to complete the purchase transaction processing.
Request information¶
| Item | Description |
|---|---|
| Commercial URL | https://hiveiap.qpyou.cn/api_v4/item_result |
| Sandbox URL | https://sandbox-hiveiap.qpyou.cn/api_v4/item_result |
| HTTP Method | POST |
| Data Format | JSON |
HTTP header¶
| Item | Description |
|---|---|
| Content-Type | application/json;charset=utf-8 |
| Authorization | Bearer (optional) |
| Authentication method | You can use the Bearer token only when the Hive authentication status is Y in the Hive console App Center > Project Management > Game List - Select game company's game > Game Details > Basic Information. |
| Bearer token location | This corresponds to the Hive authentication key in App Center > Project Management > Game List - Select game company's game > Game Details > Basic Information. |
Request body¶
| Field | Type | Description | Required | |
|---|---|---|---|---|
| hiveiap_transaction_id | String | Send the hiveiap_transaction_id value returned from IAP v4 receipt verification | Y | |
| result_status | Integer | Whether the item was successfully granted 0: Grant failed 1: Grant successful | Y | |
| user_id_type | String | Hive user type (use fixed value player_id) | Y | |
| user_id | String | Hive user ID (player_id) | Y | |
| asset | Array | Information about the granted item Only send values when the grant is successful, and respond with an empty array ([]) when the grant fails | N | |
| asset_id | String | Item ID | N | |
| asset_name | String | Item name | N | |
| quantity | Integer | Number of granted items | N | |
| game_payload_info | Object | Values received from the game server for additional metrics in Analytics | N |
Example code¶
Request¶
curl -L -v -d '{"hiveiap_transaction_id": "GO_22160", "result_status": 1, "user_id_type": "player_id", "user_id": 30000041527, "asset": [ {"asset_id":"item_1","asset_name":"item_1_name","quantity":1},{"asset_id":"item_2","asset_name":"item_2_name","quantity":1}], "game_payload_info": {"gifteeid":null,"chracter_type_id":0,"product_name":"쿠킹덤 대체 상점팩 1"}}' -H "Content-Type: application/json" -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAzNzc4OTU2LCJqdGkiOiIxODczMTExMzIwIn0.OxWo4R6UdI0BLP1ckt8RlMFrPAb5H7TNedmLFV1Cawc" https://sandbox-hiveiap.qpyou.cn/api_v4/item_result
> POST /api_v4/item_result HTTP/2
> Host: sandbox-hiveiap.qpyou.cn
> user-agent: curl/7.68.0
> accept: /
> content-type: application/json
> Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAzNzc4OTU2LCJqdGkiOiIxODczMTExMzIwIn0.OxWo4R6UdI0BLP1ckt8RlMFrPAb5H7TNedmLFV1Cawc
> content-length: 235