Set Server to Server

Prev Next

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 Purchase item (operation) or Coupon item (operation) field in the Webhook area, enter the HTTP/HTTPS URL by referring to the following guide.
  4. Click the [Save] button.

Request and response after purchase

Set HTTP request and response by referring to the following table and code.

  • Request

    https://{domain}?
    userId={userId}&orderId={orderId}&projectId={projectId}&platform={platform}&productId={productId}&store={store}&payment={payment}&transactionId={transactionId}&gamepotOrderId={gamepotOrderId}&uniqueId={uniqueId}&tp={tp}&server_id={server_id}&player_id={player_id}&status={status}&remoteip={remoteip}&userdata={userdata}
    
    Property Type Maximum length Description
    userId String 128 User ID
    transactionId String 512 Order number (GPA-xxxx-xxxx-)
    store String 64 Store information (apple, google, one)
    projectId String 128 Project ID
    productId String 256 Product ID registered in Google Play Store, Apple App Store, and ONE Store
    platform String 128 Operating platform information (android, ios)
    payment String 64 Payment method
    uniqueId String 512 Order ID managed in GAMEPOT
    gamepotOrderId String 512 Order ID managed in GAMEPOT
    orderId String 512 Order ID managed in GAMEPOT
    serverId String - serverId (serverId entered when calling setServerId API)
    playerId String - playerId (playerId entered when calling setPlayerId API)
    tp Integer -
    • 1: test payment
    • 0: general payment
    remoteip String - IP Address
    userdata String - User data (JSON format) - {"player_id" : String, "server_id" : String, "metadata" : String, "options" : String}
    • player_id: Player ID value (playerId)
    • server_id: Server ID value (serverId)
    • metadata: metadata (metadata value entered at the time of purchase)
    • options: options (additional option value entered at the time of purchase)
  • Response

    {
        "status": 1,
        "message" : ""
    }
    
    Property Type Description
    status Integer Result value
    • 0: failure, 1: Succeeded
    message String Error message

Request and response after gifting and coupon use

Set HTTP request and response by referring to the following table and code.

  • Request

    https://{domain}?
    userId={userId}&projectId={projectId}&platform={platform}&store={store}&userData={userData}&itemId=[{itemData}, {itemData}, ...]&title={title}&content={content}&serverId={serverId}&playerId={playerId}
    
    Property Type Maximum length Description
    userId String 128 User ID (If the Game > Gift > Target value in the dashboard is All,all )
    projectId String 128 Project ID
    platform String 128 Operating platform information (android, ios)
    store String 64 Store information (apple, google, one)
    title String - The value entered in Dashboard > Game > Gift > Title
    content String - The value entered in Dashboard > Game > Gift > Description
    target String - GAMEPOT Dashboard > Game > Gift > Target value - All: all/User ID: user
    userData String - The value entered in the second parameter when calling the client SDK coupon API, or the value entered in Dashboard > Game > Gift > UserData
    serverId String - Server ID value (serverId entered when calling setServerId API)
    playerId String - Player ID value (playerId entered when calling setPlayerId API)
    itemId Array - 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" : ""
    }
    
    Property Type Description
    status Integer Result value
    • 0: failure, 1: Succeeded
    message String Error message