Server to server settings
    • PDF

    Server to server settings

    • PDF

    Article Summary

    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.

    1. Log in to the dashboard with the admin account.
    2. Click the Project settings > General menus, in that order.
    3. 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.
    4. 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}
      
      PropertyTypeMaximum lengthDescription
      userIdString128User ID
      transactionIdString512Order number (GPA-xxxx-xxxx-)
      storeString64Store information (apple, google, one)
      projectIdString128Project ID
      productIdString256Product ID registered in Google Play Store, Apple App Store, and ONE Store
      platformString128Operating platform information (android, ios)
      paymentString64Payment method
      uniqueIdString512Unique ID (uniqueId entered when calling purchase API)
      gamepotOrderIdString512GAMEPOT Order ID
      serverIdString-serverId (serverId entered when calling purchase API)
      playerIdString-playerId (playerId entered when calling purchase API)
      tpInteger-1: test payment
      0: regular payment
      etcString-etc (etc entered when calling purchase API)


    • Response
      {
          "status": 1,
          "message" : ""
      }
      
      PropertyTypeDescription
      statusIntegerResult value
      0: failure, 1: success
      messageStringError 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}, ...]
      
      PropertyTypeMaximum lengthDescription
      userIdString128User ID (all if the Game > Gift > Target value in the dashboard is All)
      projectIdString128Project ID
      platformString128Operating platform information (android, ios)
      storeString64Store 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 dashboard
      store_item_id: ID of the item to be provided
      count: number of items to be provided
    • Response

      {
          "status": 1,
          "message" : ""
      }
      
      PropertyTypeDescription
      statusIntegerResult value
      0: failure, 1: success
      messageStringError 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.

    Caution

    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.

    1. Log in to the dashboard with the admin account.
    2. 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.
    3. 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": ""
      }
      
      PropertyTypeMaximum lengthDescription
      projectIdString128GAMEPOT SDK's project ID
      memberIdString128GAMEPOT SDK's user ID
      tokenString2048GAMEPOT 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" : ""
      }
      
      PropertyTypeDescription
      statusIntegerResult value
      1: success
      See error codes shown below for failure
      messageStringError message


    • Error codes
      CodeDescription
      0There's missing data in the body
      Check if projectId, 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": ""
      }
      
      headerTypeRequirement StatusDescription
      x-api-keyStringRequirement StatusAuthentication key issued by GAMEPOT
      PropertyTypeMaximum lengthDescription
      projectIdString128GAMEPOT SDK's project ID
      storeString64Purchased store
      productIdString256Purchased item ID
      transactionIdString512Unique ID of the payment
      memberIdString128GAMEPOT SDK's user ID
      currencyString64Payment currency
      priceNumber-Amount of payment
      paymentIdString64Payment method
      uniqueIdString512Unique ID of the in-game payment


    • Response
      {
          "status": 1,
          "message" : ""
      }
      
      PropertyTypeDescription
      statusIntegerResult value
      1: success
      See error codes shown below for failure
      messageStringError message


    • Error codes
      CodeDescription
      -1There's missing data in the body
      Check if projectId, transactionId, productId, store, memberIdwere all entered when making the HTTP request
      -2price's value is not in the numbertype
      -3projectId is missing
      -4The project does not support the API
      Contact GAMEPOT
      -5transactionId already exists
      -6DB error.
      Contact GAMEPOT

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.