Skip to content
Store Dev
Last Updated

Integrated Coupon Box Redemption API

Introduction

Redeems a coupon from the coupon box.

Basic Information

text
POST /coupon/v3.0/{user_token_type}/couponbox/use
Host:
   https://api.onstove.com (LIVE)    
   https://api.gate8.com (SB)
Content-Type: application/json

Request

NameTypeRequiredDefault ValueExampleDescription
AuthorizationStringY-Access token issued through user authentication.

Path Variable

NameTypeRequiredDefault ValueExampleDescription
user_token_typestringY-webUser token type; all token types are supported.

Parameter

NameTypeRequiredDefault ValueExampleDescription
game_codestringY-STOVE_IDGame ID assigned by the platform.
coupon_box_idInt64Y-10169Coupon box serial number
world_noStringN-1Game world number
character_noStringN-52345642Member character number
client_ipaddrStringY-10.5.24.52Member's access IP address
lang_codeStringY-koLanguage code

Response

Body

NameTypeRequiredDefault ValueExampleDescription
resultStringY-000Response code
messageStringY-OKResponse message
valueBooleanY-trueResponse value

Sample

Request

text
curl --location --request POST 'https://api.onstove.com/coupon/v3.0/web/couponbox/use' \
--header 'Authorization: Bearer {{access_token}}'
{
    "lang_code": "KO",
    "game_code" : "STOVE_ID",
    "coupon_box_id":3,
    "world_no":"world1",
    "character_no":"456",
    "client_ipaddr": "127.0.0.1"
}

Response

Successful response example

text
{
    "value": true,
    "result": "000",
    "message": "OK"
}

Failed response example

text
{
    "result": "5105",
    "message": "Invalid coupon code. Please check the coupon code. (1 failed attempt)"
}

Return Code

HTTP Status codeCodeMessageDescription
200999unexpected errorSystem error
401999Authorization has been denied for this request
40140101invalid tokenToken cannot be decrypted.
40140102invalid tokenToken was decrypted, but the format is invalid.
40140103expired tokenToken has expired.
40140104expired tokenToken expired because an administrator invalidated it.
50050000internal errorService failure, such as a database connection failure.
2006007Coupon not found (coupon box ID does not exist).-
2006008This coupon does not belong to the user.-
2006009The coupon cannot be redeemed on this date.-
2006032The coupon redemption limit has been exceeded.-
2007014Please select a character.Coupon requires character selection.
2006010This coupon cannot be redeemed in this world.-
2005162This coupon cannot be redeemed in this country.-
200OtherInternal ErrorInternal error: Contact the STOVE technical PM team.

Contact Us


If you have any questions, please contact us on Discord or by email at store.support@smilegate.com.