Verify discount coupon
This is an API used to verify if a discount coupon can be used.
Note
Please refer to here for identifier policies.
Request information¶
Item | Description |
---|---|
Production URL | https://coupon.withhive.com/tp/coupon/discount_coupon_verify |
Sandbox URL | https://sandbox-coupon.withhive.com/tp/coupon/discount_coupon_verify |
Method | POST |
Response Format | JSON |
Request header¶
Item | Description | Type | Required | Note |
---|---|---|---|---|
Content-Type | application/json | String | Y | |
Authorization | Bearer | String | Y | How to check Hive authentication key: App Center > Project Management > Game Details > Basic Information > Hive Authentication Key |
Request parameters¶
Name | Type | Required (Required: M, Optional: O) | Description |
---|---|---|---|
game_index | Integer | M | App Center Game Index |
coupon | String | M | Coupon number |
cs_code | String | M | In-game user CS CODE |
language | String | O | Response message display language code (Default is English) Use when displaying the message directly on the screen |
discount_type | String | O | Discount type (fixed to 'percent') |
Response¶
Name | Type | Required (Required: M, Optional: O) | Description |
---|---|---|---|
code | Integer | M | Response code (103: Available for use) |
message | String | M | Result message according to response code |
info | Object | O | If available for use, responds with the discount coupon percentage in the percent sub-item |
info > percent | Integer | O | Discount coupon percentage |
Request example¶
curl -L -v
-d '{"game_index": 539,"coupon": "HIVESDKTEST","cs_code": "123456789","language": "ko","discount_type":"percent"}'
-H "Content-Type: text/html"
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAyMDU2NzI2LCJqdGkiOiIxODczMTExMzIwIn0.3soFiHTPlObCoqR5xX9ZeOQTSvnHrHDHWmopP3QfWtY"
https://sandbox-coupon.withhive.com/tp/coupon/api
>> POST /tp/coupon/discount_coupon_verify HTTP/2
> Host: sandbox-coupon.withhive.com
> user-agent: curl/7.68.0
> Content-Type: application/json
> Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJIaXZlIiwiaWF0IjoxNjAyMDU2NzI2LCJqdGkiOiIxODczMTExMzIwIn0.3soFiHTPlObCoqR5xX9ZeOQTSvnHrHDHWmopP3QfWtY
> Accept: */*
> Content-Length: 105
Response example¶
< HTTP/2 200
< server: nginx
< date: Wed, 27 Aug 2025 12:22:34 GMT
< content-type: application/json; charset=utf-8
{"code":103,"message":"The coupon will not be used until payment is completed.","info": {"percent": 30}}
Response codes¶
Code | Description | Message |
---|---|---|
103 | Available for use | The coupon will not be used until payment is completed. |
200 | Request parameter error | Some parameters are missing or parameter names are incorrect. |
202 | Usage limit exceeded for the account | You have exceeded the available coupon usage limit. |
203 | Usage restriction exceeded for group coupon | You have exceeded the available coupon usage limit! |
204 | Issued coupon and game information mismatch | This can only be used in the event coupon exchange of the corresponding game. |
205 | Unusable coupon | This coupon cannot be used. |
206 | Discount coupons cannot be used in the coupon exchange | The entered coupon can be used in the web store. |
300 | Incorrect coupon number length | The coupon number is not correct. Please re-enter. |
302 | Non-existent coupon | This is a non-existent coupon number. Please check again. |
303 | Coupon currently in use | This coupon has already been used. |
304 | Coupon already used | This coupon has already been used. |
305 | Coupon usage limit exceeded (all unique coupons used) | All issued coupons have been used. |
306 | Expired coupon | This coupon has expired. |
311 | Discontinued coupon | This coupon has been discontinued. |
312 | Pre-usage period coupon | It's not yet the coupon usage period. (Test coupons are excluded from verification) |
400 | Item transmission error (complete failure) | Coupon usage has failed. If it continues to fail, please contact customer service. |
401 | Item transmission error (partial failure) | Coupon usage has partially failed. Please contact customer service. |
500 | DB communication error | Coupon usage has failed. If it continues to fail, please contact customer service. |
501 | Server communication failure | Coupon usage has failed. If it continues to fail, please contact customer service. |