Available in Classic and VPC
This page describes how to set the delivery of server to server requests for item provision and login validation.
Request purchased item
You can set to deliver HTTP requests through webhooks to proceed with the provision of items according to the purchase or use of coupons.
The following describes how to set the delivery of HTTP requests through a webhook for the item provision.
- Log in to the dashboard with the admin account.
- Click the Project settings > General menus, in that order.
- In the Purchased item (service) or Coupon item (service) field in the Webhook area, enter the HTTP/HTTPS URL by referring to the following guide.
- See Request and response after purchase for item provision after purchase.
- See Request and response after coupon use for item provision after coupon use.
- When providing items to test users, enter the request in the field marked with (Test user).
- Click the [Modify] button.
Request and response after purchase
Set HTTP request and response by referring to the following table and code.
- information
https://{domain}? userId={uuid}&orderId={orderId}&projectId={projectId}&platform={platform}&productId={productId}&store={store}&payment={payment}&transactionId={transactionId}&gamepotOrderId={gamepotOrderId}&uniqueId={uniqueId}&tp={tp}Property Type Maximum length Description userIdString128 User ID transactionIdString512 Order number (GPA-xxxx-xxxx-) storeString64 Store information ( apple,google,one)projectIdString128 Project ID productIdString256 Product ID registered in Google Play Store, Apple App Store, and ONE Store platformString128 Operating platform information ( android,ios)paymentString64 Payment method uniqueIdString512 Unique ID ( uniqueIdentered when calling purchase API)gamepotOrderIdString512 GAMEPOT Order ID serverIdString- serverId ( serverIdentered when calling purchase API)playerIdString- playerId ( playerIdentered when calling purchase API)tpInteger- 1: test payment
0: regular paymentetcString- etc ( etcentered when calling purchase API)
- Response
{ "status": 1, "message" : "" }Property Type Description statusIntegerResult value
0: failure,1: successmessageStringError message
Request and response after gifting and coupon use
Set HTTP request and response by referring to the following table and code.
-
information
https://{domain}? userId={userId}&projectId={projectId}&platform={platform}&store={store}&userData={userData}&itemId=[{itemData}, {itemData}, ...]Property Type Maximum length Description userIdString128 User ID ( allif the Game > Gift > Target value in the dashboard is All)projectIdString128 Project ID platformString128 Operating platform information ( android,ios)storeString64 Store information ( apple,google,one)titleString- The value entered in Dashboard > Game > Gift > Title contentString- The value entered in Dashboard > Game > Gift > Description targetString- GAMEPOT Dashboard > Game > Gift > Target value - All: all/User ID: user expireMsString- The value's timestamp entered in Dashboard > Game > Gift > Expiration date (GMT+9) userDataString- The value entered in the second parameter when calling the client SDK coupon API, or the value entered in Dashboard > Game > Gift > UserData itemIdArray- itemData Array - itemData(JSON) {"item_id" : String, "store_item_id" : String, "count" : Number}item_id: unique ID of the item created in Game > Item in the dashboardstore_item_id: ID of the item to be providedcount: number of items to be provided -
Response
{ "status": 1, "message" : "" }Property Type Description statusIntegerResult value
0: failure,1: successmessageStringError message
Request login validation (optional)
You can request login validation to the GAMEPOT server with the information acquired when the member completed login.
Login validation is processed in two steps: Step 1 is GAMEPOT token validation, and Step 2 is social media account validation. If the validation fails in Step 2 during the validation process, then the GAMEPOT blocking feature turns on to block the account.
Do not process the Step 1 GAMEPOT token validation feature synchronously. If you apply synchronous processing for the Step 1 token validation feature, then it is highly likely to interfere with the network communication, therefore causing game play issues for the member. Thus, process the Step 1 token validation feature asynchronously, and implement the application of blocking feature in the subsequent procedure.
- Log in to the dashboard with the admin account.
- Click the Project settings > General menus, in that order, and then enter the ID and key value acquired from each development console in the Auth key area.
- If you do not wish to use the Step 2 validation process and the blocking feature, then skip this procedure.
- Request login validation by referring to the following request, response, and error codes.
Request, response, and error codes
Set login validation request, response, and error codes by referring to the following table and code.
-
information
POST url : https://gamepot.apigw.ntruss.com/gpapps/v1/loginauth Header : 'content-type: application/json' data: { "projectId": {GamePot SDK's projectId}, "memberId": {GamePot SDK's memberid (user ID)}, "token": {GamePot SDK's Token} "remoteip": {IP information of the logged in account}, "platform": "" }Property Type Maximum length Description projectIdString128 GAMEPOT SDK's project ID memberIdString128 GAMEPOT SDK's user ID tokenString2048 GAMEPOT SDK's token remoteipString- IP information of the logged in account (e.g., XXX.XXX.XXX.XXX) platformString- Set to pc only when using a PC platform
- Response
{ "status": 1, "message" : "" }Property Type Description statusIntegerResult value
1: success
See error codes shown below for failuremessageStringError message
- Error codes
Code Description 0There's missing data in the body
Check ifprojectId,memberId,tokenwere all entered when making the HTTP request-1Token validation failed
A fake token is used-2MemberId validation failed
The token’s user ID does not match the user ID in the body-3Token expired
There's a time difference of more than 60 minutes from the time when the SDK login API was successful and the time when the authentication check was requested
External payment
You can set server to server request for external payment linkage.
Before using this feature, make sure to contact NAVER Cloud Platform for detailed instructions.
Request, response, and error codes
-
information
POST url : https://gamepot.apigw.ntruss.com/gpapps/v2/thirdparty/purchase Header : 'content-type: application/json' Header : 'x-api-key: xxxxxxxxxxx' data: { "projectId": "e948e5bc-dccd-4729-b9b0-b547ae34b85d", "store": "tpay", "productId": "purchase_001", "transactionId": "t-123412812-sadl-2384-75847", "memberId":"89a907ed-0e1d-42fb-ae4d-75e95581220d", "currency": "KRW", "price":1000, "paymentId": "prepaid", "uniqueId": "" }header Type Requirement Status Description x-api-keyStringRequirement Status Authentication key issued by GAMEPOT Property Type Maximum length Description projectIdString128 GAMEPOT SDK's project ID storeString64 Purchased store productIdString256 Purchased item ID transactionIdString512 Unique ID of the payment memberIdString128 GAMEPOT SDK's user ID currencyString64 Payment currency priceNumber- Amount of payment paymentIdString64 Payment method uniqueIdString512 Unique ID of the in-game payment
- Response
{ "status": 1, "message" : "" }Property Type Description statusIntegerResult value
1: success
See error codes shown below for failuremessageStringError message
- Error codes
Code Description -1There's missing data in the body
Check ifprojectId,transactionId,productId,store,memberIdwere all entered when making the HTTP request-2price's value is not in thenumbertype-3projectIdis missing-4The project does not support the API
Contact GAMEPOT-5transactionIdalready exists-6DB error.
Contact GAMEPOT