API Developer Guide
Persiapan Awal
Beberapa hal yang harus diperhatikan sebelum integrasi :
- Dapatkan Secret Key & Member Code di halaman Pengaturan Secret Key
- Silahkan set Content-Type pada header menjadi application/json jika menggunakan method POST
- Seluruh transaksi via API akan menggunakan method POST
⚠️ Penting !!!
- Semua HTTP Error harus diset sebagai transaksi PENDING
- NETWORK TIMEOUT harus diset sebagai transaksi PENDING
- Pastikan menunggu callback final dari kami untuk mendapatkan status transaksi
- Atau bisa mengecek status transaksi secara berkala setiap 10 menit untuk mendapatkan status transaksi
Cek Saldo
Untuk mengecek sisa saldo Anda.
Request
Method | POST |
---|---|
URL | https://topupffml.com/api/deposit |
Field | Jenis | Wajib | Keterangan |
---|---|---|---|
member_code | string | 1 | |
signature | string | 1 |
# PHP example
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://topupffml.com/api/deposit',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"member_code": "12345"
"signature": "12345"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
Response
{
"success": true,
"message": "",
"data": {
"deposit": 48688015
}
}
Daftar Produk
Request
Method | POST |
---|---|
URL | https://topupffml.com/api/product-list |
Field | Jenis | Wajib | Keterangan |
---|---|---|---|
member_code | string | 1 | |
signature | string | 1 |
# PHP example
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://topupffml.com/api/product-list',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"member_code": "12345"
"signature": "12345"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
Response
{
"success": 1,
"message": "",
"data": [
{
"id": 51,
"nama_produk": "Hago Diamond ID",
"category": "Topup",
"min_karakter": "4",
"max_karakter": "8",
"gambar": "",
"status": 1
},
...
]
}
Daftar Harga
Request
Method | POST |
---|---|
URL | https://topupffml.com/api/price-list |
Field | Jenis | Wajib | Keterangan |
---|---|---|---|
member_code | string | 1 | |
signature | string | 1 | |
product_id | integer |
# PHP example
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://topupffml.com/api/price-list',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"member_code": "12345"
"signature": "12345"
"product_id": "12345"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
Response
{
"success": 1,
"message": "",
"data": [
{
"id": 40,
"code": "ZFF355",
"category": "",
"nama_produk": "Free Fire & FFMAX",
"nama_item": "Freefire Jalur Promo 355 Diamond",
"deskripsi": "",
"price": 46051,
"status": 1
},
...
]
}
Topup
Request
Method | POST |
---|---|
URL | https://topupffml.com/api/order |
Field | Jenis | Wajib | Keterangan |
---|---|---|---|
member_code | string | 1 | |
signature | string | 1 | |
code | string | 1 | |
ref_id | string | 1 | |
user_id | string | 1 | |
server_id | string | 1 |
# PHP example
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://topupffml.com/api/order',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"member_code": "12345"
"signature": "12345"
"code": "12345"
"ref_id": "12345"
"user_id": "12345"
"server_id": "12345"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
Response
{
"success": true,
"message": "",
"data": {
"ref_id": "TRX24122800259",
"user_id": "1234",
"server": "",
"code": "MLBB5",
"status": "success",
"message": "",
"sn": "",
"price": 1568
}
}
{
"success": true,
"message": "",
"data": {
"ref_id": "TRX24122800259",
"user_id": "1234",
"server": "",
"code": "MLBB5",
"status": "gagal",
"message": "",
"sn": "",
"price": 1568
}
}