有效性验证

用于验证用户输入的游戏 ID 和服务器信息是否有效,并确认道具是否可购买。

Request URI

HTTP Type

HTTPS

HTTP Method

POST

URL

可在 Developer Center > Webshop > Integration Mgmt. 中注册要接收通知的服务器 URL。 详细设置方法请参考《Integration Management Guide》。

Header

Content-Type: application/json; charset=UTF-8

Accept: application/json

Request

Name
Type
Mandatory
Description

param.clientId

String

M

ONE webshop 标题 ID(商品 ID)

param.prodId

String

M

ONE webshop 道具ID(In-App 商品 ID)

param.serviceUserId

String

M

用户游戏 ID

param.serviceServerId

String

Optional

用户服务器 ID ※ 当 Purchase Input Information = “Purchase Identifier + Server” 时为必填。

Example

curl -X POST \
  'https://example.com/gameuser/check' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "param": {
      "clientId": "WS00000001",
      "prodId": "item1000",
      "serviceUserId": "USR1234567890",
      "serviceServerId": "asia01"
    }
  }'

Response

Name
Type
Mandatory
Description

result.code

String

M

"0000":成功 "1000":非会员 "1001":不可购买

result.message

String

M

  • result.code1001 时,该消息将显示给用户。

  • 建议以适合目标用户的语言提供该消息。

  • 示例消息

    • "구매 가능한 횟수를 초과하였습니다."(已超过可购买次数。)

    • "이미 구매한 상품입니다."(该商品已购买。)

    • "이벤트 기간이 종료된 상품입니다."(该商品的活动时间已结束。)

Example

Last updated