GoAPI Documentation

Welcome to the official GoAPI documentation. GoAPI is a premium slot and casino game aggregator designed for fast, secure, and stable integration into your website.

Base URL: https://api.gotopup.shop

Authentication

All requests to the GoAPI require authentication using a unique agent_code and agent_token for each partner. These credentials must be sent in the JSON body of every request.

⚠️ Important: Never share your agent_token with third parties. Keep it on the server-side (backend) of your website, not in the frontend.

Rate & Pricing

GoAPI uses a 1 Balance (Nominal) system. The balance you see on the dashboard is the game nominal balance.

Provider List

Retrieve a list of all available game providers and their operational status.

POST /providers

Example Request

JSON
{
  "method": "provider_list",
  "agent_code": "YOUR_AGENT_CODE",
  "agent_token": "YOUR_AGENT_TOKEN"
}

Example Response (Success)

JSON 200 OK
{
  "status": 1,
  "msg": "SUCCESS",
  "providers": [
    {
      "code": "PRAGMATIC",
      "name": "Pragmatic Play",
      "status": 1
    }
  ]
}

Game List

Retrieve a list of games based on a specific provider code.

POST /games

Example Request

JSON
{
  "method": "game_list",
  "agent_code": "YOUR_AGENT_CODE",
  "agent_token": "YOUR_AGENT_TOKEN",
  "provider_code": "PRAGMATIC"
}

Game Launch

Open a game session for a player and return a game URL ready to be loaded (iframe).

POST /launch

Example Request

JSON
{
  "method": "game_launch",
  "agent_code": "YOUR_AGENT_CODE",
  "agent_token": "YOUR_AGENT_TOKEN",
  "user_code": "PLAYER_123",
  "provider_code": "PRAGMATIC",
  "game_code": "vs20doghouse",
  "lang": "id",
  "lobby_url": "https://your-site.com/lobby"
}

Transfer (Deposit / Withdraw)

Move balance between GoAPI Agent wallet and player wallet in the game.

POST /transfer

Example Request (Deposit)

JSON
{
  "method": "user_deposit",
  "agent_code": "YOUR_AGENT_CODE",
  "agent_token": "YOUR_AGENT_TOKEN",
  "user_code": "PLAYER_123",
  "amount": 100000.00,
  "agent_sign": "UNIQUE_UUID_STRING"
}

* agent_sign is optional but highly recommended (use UUID) to prevent duplicate transactions in case of network timeout.

Game Logs

Retrieve game transaction history (bet/win) within a specific time range.

POST /logs

Example Request

JSON
{
  "method": "get_game_log",
  "agent_code": "YOUR_AGENT_CODE",
  "agent_token": "YOUR_AGENT_TOKEN",
  "user_code": "PLAYER_123",
  "game_type": "slot",
  "start": "2023-10-01 00:00:00",
  "end": "2023-10-01 23:59:59",
  "page": 0,
  "perPage": 100
}

In-Game History

Get a direct URL to the provider's game history page (Currently only supported for Pragmatic Play Slot).

POST /history

Example Request

JSON
{
  "method": "get_game_history",
  "agent_code": "YOUR_AGENT_CODE",
  "agent_token": "YOUR_AGENT_TOKEN",
  "user_code": "PLAYER_123",
  "provider_code": "PRAGMATIC",
  "game_code": "vs20doghouse"
}

PHP Integration Example

Here is a complete example of GoAPI integration using Native PHP for your website.

1. Configuration & Helper Function

config.php
<?php
define('GOAPI_URL', 'https://api.gotopup.shop');
define('AGENT_CODE', 'YOUR_AGENT_CODE');
define('AGENT_TOKEN', 'YOUR_AGENT_TOKEN');

function callGoAPI($method, $params = []) {
    $url = GOAPI_URL . '/' . $method;
    $payload = array_merge([
        'agent_code' => AGENT_CODE,
        'agent_token' => AGENT_TOKEN
    ], $params);
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        'Content-Type: application/json'
    ]);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    $response = curl_exec($ch);
    curl_close($ch);
    return json_decode($response, true);
}
?>

2. Deposit Balance to Player

deposit.php
<?php
require_once 'config.php';
$result = callGoAPI('transfer', [
    'method' => 'user_deposit',
    'user_code' => 'player123',
    'amount' => 100000,
    'agent_sign' => uniqid('dep_', true)
]);
if ($result['status'] == 1) {
    echo "Success! Balance: " . $result['user_balance'];
}
?>

3. Launch Game

launch.php
<?php
require_once 'config.php';
$result = callGoAPI('launch', [
    'method' => 'game_launch',
    'user_code' => 'player123',
    'provider_code' => 'PRAGMATIC',
    'game_code' => 'vs20doghouse',
    'lang' => 'id',
    'lobby_url' => 'https://yoursite.com/lobby'
]);
if ($result['status'] == 1) {
    header('Location: ' . $result['launch_url');
    exit;
}
?>