결제 완료 후 STOVE 빌링 미들웨어가 게임서버로 전달하는 아이템지급 요청에 대한 데이터 처리 방법을 안내 합니다.
본 기능은 스토브 빌링 시스템 사용시 게임 서버에서 필수로 구현해야 합니다.
호출 방식은 RESTful API 형태로 호출되며, 전달되는 정보는 아래 API 기본 정보를 참고해 주세요.
유저 결제가 완료되면 STOVE 빌링 미들웨어는 파트너스에 등록 된 게임 서버 URL 주소로 아이템 지급에 필요한 상품정보 와 게임 아이템 정보(json)를 전달 합니다.
게임 서버는 해당 지급 정보를 수신 -> 유저에게 지급 처리 -> 빌링 미들웨어 지급 결과를 응답 해줘야 합니다.
•
상품 구매 시 지급 재화/아이템 구성 중 아이템이 있을 경우 결제 완료 알림 API로 결제 완료 된 상품 정보와 지급해야 할 게임 아이템 정보를 전달합니다.
주의) API로 전달한 TID(스토브 빌링 결제 주문번호)는 게임 서버에서 저장 후 관리하여 중복지급이나 미지급이 발생되지 않도록 해야 합니다.
기본정보
POST 파트너스 통해 URL 등록
Host:
https://I-api.onstove.com (LIVE)
https://I-api.gate8.com (SB)
Content-Type: application/json
JavaScript
복사
Request
Header
Name | Type | Required | Default Value | Example | Description |
caller-id | String | Y | - | clientapp | API 호출자 정보 |
Path Variable
Name | Type | Required | Default Value | Example | Description |
service_id | String | Y | - | STOVE_QA | 게임코드 (STOVE에서 발급 - game_id) |
Body
Name | Type | Required | Default Value | Example | Description |
bill_platform_type | string(16) | Y | - | 결제한 플랫폼 타입(유효성 체크 시 필요)
-ONLINE : 온라인 빌링
-SHOP: 상점 | |
noti_type | string(32) | Y | - | notification 구분
-ONLINE_PURCHASE : 온라인일반상품 구매 | |
world_id | string(30) | N | - | 월드(서버) 구분 | |
guid | string(50) | Y | - | - | 스토브 회원 GUID(게임별 유저 유니크 아이디). GUID가 없는 게임(싱글플레이 게임)을 제외하고 필수 |
member_no | long | Y | - | 회원 번호 | |
character_no | string(20) | N | - | 게임 캐릭터 별로 발급되는 유일키(STOVE에서 발급) | |
txn_time | long | Y | - | 결제 시각(Unix Timestamp UTC-0) | |
data | json object | Y | - | 상세 데이터 |
data(온라인 일반상품)
Name | Type | Required | Default Value | Example | Description |
tid | string(20) | Y | - | T202202103125 | 스토브 빌링에서 발급한 주문번호 |
product_id | string(20) | Y | - | p1002 | 스토브 플랫폼에 등록한 상품 코드 |
product_currency | string(3) | Y | - | KRW, USD | 해당 금액의 통화 |
product_price | decimal | Y | - | 1100, 0.99 | 거래 금액 |
inservice_item_id | string(30) | Y | - | cp7892 | 게임내 아이템ID |
service_order_id | string(20) | N | - | 결제요청시 결제 서버에 전달한 게임 payload(현재 미지원 Spec) |
supply_items
Name | Type | Required | Default Value | Example | Description |
service_item_code | string(30) | Y | - | - | 아이템 코드-게임내에 제공하는 아이템 코드 |
total_amount | String | Y | - | - | 지급 수량-최소 1이상 |
item_desc | string(100) | N | - | - | 아이템 부가정보/설명-파트너스에 등록한 아이템 부가정보/설명 |
Response
Body
Name | Type | Required | Default Value | Example | Description |
code | Integer | Y | - | 0 | - 응답 코드 (0 : 성공)- 중복 수신(이미 처리된 건)인 경우 -1 이나 0 응답 |
message | String | Y | - | OK | 응답 메시지 |
Sample
Request
curl --location --request POST'파트너스 통해 URL 등록' \
--header 'caller-id: {{caller-id}}'
온라인 일반상품
{
"bill_platform_type": "ONLINE",
"noti_type": "ONLINE_PURCHASE",
"member_no": "265265",
"txn_time" : 1644807685000,
"data": {
"tid": "1909091033503333452",
"product_id": "test_1",
"product_price": 5000.0,
"product_currency": "KRW",
"inservice_item_id": "test_1",
"service_order_id": "testtest_1234"
}
모바일 일반상품 / OOAP 상품
{
"bill_platform_type": "MOBILE",
"noti_type": "IAP_PURCHASE",
"character_no": "67891",
"member_no": "67891",
"world_id": "world_1",
"txn_time" : 1644807685000,
"data": {
"tid": "1909091033503333452",
"pay_type": "INAPP",
"market_code": "GOOGLE_PLAY",
"market_product_id": "google_test_1",
"product_id": "test_1",
"product_price": 5000.0,
"product_currency": "KRW",
"product_tier": 1,
"inservice_item_id": "test_1",
"service_order_id": "testtest_1234",
"supply_items": [
{
"service_item_code": "potion_h",
"total_amount": 2,
"item_desc": ""
}]
}
}
모바일 구독상품
{
"bill_platform_type": "MOBILE",
"noti_type" : "IAP_SUBSCRIPT",
"character_no" : "67891"
"member_no" : "67891",
"world_id" : "world_1",
"txn_time" : 1644807685000,
"data":{
"tid": "1909091033503333452",
"original_tid": "o1909091033503333452",
"pay_type":"SUBSCRIPTION",
"market_code":"GOOGLE_PLAY",
"market_product_id":"google_test_1",
"product_id": "test_1",
"product_price":5000.0,
"product_currency":"KRW",
"product_tier" : 1,
"inservice_item_id":"test_1",
"subs_status_code" : "PURCHASE",
"expire_time" : 2478329479,
"market_subscript_status":"7"
}
}
Plain Text
복사
Response
{
"code": 0,
"message": "OK"
}
Plain Text
복사
Return Code
HTTP Status code | response_code | response_message | Description |
200 | 0 | OK | 성공 |
500 | 500 | Internal Server Error | 서버 내부 오류 |