Order

Kami menyediakan API untuk melakukan transaksi Top Up Games.

POST/orders

Create Order

Berikut adalah endpoint API untuk melakukan transaksi.

Params

ParamTypeDescription
member_codestringMember Code Anda.
ref_idstringID Transaksi Anda.
codestringKode Produk.
tujuanstringTujuan Transaksi.
server_idstringIsi string kosong "" jika tujuan tidak memiliki Server.

Request

POST
/orders
$curl_data = [
    "member_code" => "member kode anda",
    "ref_id" => "ref id unik anda",
    "code" => "kode produk",
    "tujuan" => "tujuan pengisian"
    "server_id" => "",
];

$ch = curl_init();
    curl_setopt_array($ch, array(
    CURLOPT_URL             => "https://api.gotopup.id/v1/orders",
    CURLOPT_POST            => true,
    CURLOPT_RETURNTRANSFER  => true,
    CURLOPT_HEADER          => false,
    CURLOPT_POSTFIELDS      => $curl_data,
    CURLOPT_IPRESOLVE	=> CURL_IPRESOLVE_V4,
));

$json = curl_exec($ch);
$result = json_decode($json, true);
curl_close($ch);

Response

{
    "status": true,
    "message": "Pesanan dalam proses",
    "data": {
        "ref_id": "TRX240309356326",
        "order_id": "GOTO240309435836",
        "games": "Mobile Legends",
        "product": "10 Diamond",
        "status": "Processing",
        "note": "03118856072837846990",
    }
}
POST/status

Check Status

Berikut adalah endpoint API untuk melakukan cek status transaksi.

Params

ParamTypeDescription
member_codestringMember Code Anda.
ref_idstringID Transaksi Anda.

Request

POST
/status
$curl_data = [
    "member_code" => "member kode anda",
    "ref_id" => "ref id unik anda",
];

$ch = curl_init();
    curl_setopt_array($ch, array(
    CURLOPT_URL             => "https://api.gotopup.id/v1/status",
    CURLOPT_POST            => true,
    CURLOPT_RETURNTRANSFER  => true,
    CURLOPT_HEADER          => false,
    CURLOPT_POSTFIELDS      => $curl_data,
    CURLOPT_IPRESOLVE	=> CURL_IPRESOLVE_V4,
));

$json = curl_exec($ch);
$result = json_decode($json, true);
curl_close($ch);

Response

{
    "status": true,
    "message": "Ref ID ditemukan",
    "data": {
        "status": "Success",
        "note": "03118856072837846990",
        "ref_id": "TRX240309356326",
        "order_id": "API-GOTO240309435836"
    }
}

Was this page helpful?