API (Application Programming Interface) adalah sekumpulan perintah, fungsi, dan protokol yang dapat digunakan oleh programmer saat membangun software, sehingga tercipta interkoneksi yang stabil dan cepat antar sistem.
API Server Pulsa H2H merupakan jalur yang dapat digunakan mitra server pulsa h2h untuk bertransaksi pulsa murah dengan cepat dan stabil. Dapat digunakan untuk cek saldo terakhir, cek harga produk pulsa termurah, cek update status transaksi, isi pulsa murah all operator, isi token pln prabayar, bayar tagihan, dll.
Metode transaksi pulsa via API ini memerlukan sedikit pengetahuan tentang pemrograman komputer. Jika Anda tidak paham tentang bahasa pemrograman sebaiknya tidak menggunakan metode transaksi pulsa ini.
Sedikit pengetahuan: IP Statis adalah IP server Anda yang tidak berubah-ubah, Jika server Adalah sebuah website maka IP Statis adalah IP Website Anda tersebut. Sedangkan callback url adalah alamat url yang harus Anda sediakan di server/website Anda yang berguna untuk menerima update status transaksi dari kami, Script / Isi dari callback sudah kami beri contohnya dihalaman ini.
<?php
$url = 'https://atlantispay.id/api/balance';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"balance": "150000",
"message": "Jumlah Saldo Anda adalah Rp 150.000"
}
<?php
$url = 'https://atlantispay.id/api/pembelian/categorie';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"data": [
{
"product_id": "pulsa",
"product_name": "Pulsa All Operator",
"status": "1" // 1 = Tersedia, 0 = Tidak Tersedia
},
{
"product_id": "plnpra",
"product_name": "Token PLN",
"status": "1"
},
{
"product_id": "paket",
"product_name": "Paket Internet",
"status": "1"
},
{
"product_id": "game",
"product_name": "Voucher Game",
"status": "0"
},
{
"product_id": "gojek",
"product_name": "Saldo GOJEK",
"status": "1"
},
{
"product_id": "grab",
"product_name": "Saldo GRAB",
"status": "0"
}
]
}
<?php
$url = 'https://atlantispay.id/api/pembelian/operator';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$data = array(
'product_id' => 'pulsa', // Kode Kategori (pulsa, plnpra, paket, dll)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"data": [
{
"product_id": "TSEL",
"product_name": "TELKOMSEL",
"prefix": "0811,0812,0813,0821,0822,0823,0852,0853,0851",
"status": "1" // 1 = Tersedia, 0 = Tidak Tersedia
},
{
"product_id": "ISAT",
"product_name": "INDOSAT",
"prefix": "0856,0857,0858,0815,0816,0855",
"status": "1"
},
{
"product_id": "AXIS",
"product_name": "AXIS",
"prefix": "0831,0832,0838",
"status": "1"
},
{
"product_id": "XL",
"product_name": "XL",
"prefix": "0817,0818,0819,0859,0877,0878",
"status": "1"
},
{
"product_id": "SMART",
"product_name": "SMARTFREN",
"prefix": "0881,0882,0883,0884,0885,0886,0887,0888,0889",
"status": "1"
},
{
"product_id": "THREE",
"product_name": "THREE",
"prefix": "0896,0897,0898,0899,0895",
"status": "1"
},
{
"product_id": "BOLT",
"product_name": "BOLT",
"prefix": "999",
"status": "1"
}
]
}
<?php
$url = 'https://atlantispay.id/api/pembelian/product';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$data = array(
'product_id' => 'TSEL', // Kode Operator (TSEL, ISAT, AXIS, dll)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"data": [
{
"product_id": "PLW20",
"product_name": "TOKEN PLN 20.000",
"ket": "",
"price": "19840", // Harga Produk Agent Biasa, Jika Status keagenan anda adalah member/agent biasa maka field yang muncul adalah "price"
"h2h_price": "19720", // Harga Produk MITRA, , Jika Status keagenan anda adalah MITRA maka field yang muncul adalah "h2h_price"
"status": "1" // 1 = Produk Tersedia, 0 = Produk Gangguan
},
{
"product_id": "PLW50",
"product_name": "TOKEN PLN 50.000",
"ket": "",
"price": "49840",
"h2h_price": "49720",
"status": "1"
},
{
"product_id": "PLW100",
"product_name": "TOKEN PLN 100.000",
"ket": "",
"price": "99840",
"h2h_price": "99720",
"status": "1"
},
{
"product_id": "PLW200",
"product_name": "TOKEN PLN 200.000",
"ket": "",
"price": "199840",
"h2h_price": "199720",
"status": "1"
},
{
"product_id": "PLW500",
"product_name": "TOKEN PLN 500.000",
"ket": "",
"price": "499840",
"h2h_price": "499720",
"status": "1"
},
{
"product_id": "PLW1000",
"product_name": "TOKEN PLN 1.000.000",
"ket": "",
"price": "999840",
"h2h_price": "999720",
"status": "1"
}
]
}
<?php
$url = 'https://atlantispay.id/api/pembelian/transaction';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$data = array(
'code' => 'PLN20', // Kode Produk
'target' => '14534234234', // Nomor Handphone / ID Pelanggan
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"transaksi_id": 12312,
"message": "Transaksi Pembelian Token PLN 20.000 14534234234 Berhasil Diproses."
}
<?php
$url = 'https://atlantispay.id/api/transaksi/history';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"data": [
{
"id": 2554, // ID Transaksi
"code": "IDPH2",
"produk": "Unlimited + 2GB - Promo (Ratu)",
"total": "29450",
"target": "0857966*****",
"mtrpln": "-",
"note": "Trx Unlimited + 2GB - Promo (Ratu) 0857966***** Sukses. Transaksi Berhasil SN : 011728000047918*****",
"token": "011728000047918*****",
"status": "1", // 0 = Proses, 1 = Sukses, 2 = Gagal, 3 = Refund
"saldo_before_trx": "461381",
"saldo_after_trx": "431781",
"created_at": "2018-03-18 21:18:09",
"updated_at": "2018-03-18 21:18:32"
},
{
"id": 2549,
"code": "SW25",
"produk": "TELKOMSEL 25.000",
"total": "24675",
"target": "0813567*****",
"mtrpln": "-",
"note": "Trx TELKOMSEL 25.000 0813567***** Sukses. Transaksi Berhasil SN : 80318205728015*****",
"token": "80318205728015*****",
"status": "1",
"saldo_before_trx": "486206",
"saldo_after_trx": "461381",
"created_at": "2018-03-18 20:57:11",
"updated_at": "2018-03-18 20:57:56"
}
]
}
<?php
$url = 'https://atlantispay.id/api/transaksi/history/detail';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$data = array(
'trxid' => '2554', // Masukkan Transaksi ID
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"data": {
"id": 2554,
"code": "IDPH2",
"produk": "Unlimited + 2GB - Promo (Ratu)",
"total": "29450",
"target": "0857966*****",
"mtrpln": "-",
"note": "Trx Unlimited + 2GB - Promo (Ratu) 0857966***** Sukses. Transaksi Berhasil SN : 011728000047918*****",
"token": "011728000047918*****",
"status": "1", // 0 = Proses, 1 = Sukses, 2 = Gagal, 3 = Refund
"saldo_before_trx": "461381",
"saldo_after_trx": "431781",
"created_at": "2018-03-18 21:18:09",
"updated_at": "2018-03-18 21:18:32"
}
}
<?php
$url = 'https://atlantispay.id/api/pembayaran/cektagihan';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$data = array(
'produk' => 'PLN', // Kode Produk (PLN, BPJSKS, TELKOM, SPEEDY)
'nomor_rekening' => '11111111', // Nomor Pelanggan yang akan di bayarkan (No Meter Dll)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"fee": 2500,
"jml_bayar": 30112,
"data": {
"tagihan_id": "123",
"code": "PLN",
"no_pelanggan": "111111",
"periode": "201906",
"nama": "ATLANTISPAY",
"jumlah_bulan": 1,
"jumlah_tagihan": "30112",
"admin": "2500",
"jumlah_bayar": "32612",
"detail": "PLN|ATLANTISPAY|111111111|JUN19|R1/000000450 VA|00001221-00001298|30112|2500|32612"
}
}
<?php
$url = 'https://atlantispay.id/api/pembayaran/categorie';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"data": [
{
"product_id": "PLN",
"product_name": "Tagihan PLN",
"status": "1" // 1 = Produk Tersedia, 0 = Produk Gangguan
"updated_at": "2018-06-09 19:29:53",
},
{
"product_id": "PDAM",
"product_name": "PDAM",
"status": "1" // 1 = Produk Tersedia, 0 = Produk Gangguan
"updated_at": "2018-06-09 19:29:53",
},
{
"product_id": "BPJS",
"product_name": "Asuransi (BPJS)",
"status": "1" // 1 = Produk Tersedia, 0 = Produk Gangguan
"updated_at": "2018-06-09 19:29:53",
},
{
"product_id": "MULTIFINANCE",
"product_name": "Multifinance",
"status": "1" // 1 = Produk Tersedia, 0 = Produk Gangguan
"updated_at": "2018-06-09 19:29:53",
},
{
"product_id": "TELKOM",
"product_name": "Tagihan Telkom",
"status": "1" // 1 = Produk Tersedia, 0 = Produk Gangguan
"updated_at": "2018-06-09 19:29:53",
},
{
"product_id": "TELEPON",
"product_name": "Tagihan Telepon",
"status": "1" // 1 = Produk Tersedia, 0 = Produk Gangguan
"updated_at": "2018-06-09 19:29:53",
},
{
"product_id": "TV",
"product_name": "TV Berbayar",
"status": "1" // 1 = Produk Tersedia, 0 = Produk Gangguan
"updated_at": "2018-06-09 19:29:53",
},
{
"product_id": "PGN",
"product_name": "Gas Negara (PGN)",
"status": "1" // 1 = Produk Tersedia, 0 = Produk Gangguan
"updated_at": "2018-06-09 19:29:53",
},
]
}
<?php
$url = 'https://atlantispay.id/api/pembayaran/product';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$data = array(
'product_id' => 'PLN', // Kode Kategori (PLN, BPJS, TELKOM, dll)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"data": [
{
"product_id": "PLN",
"product_name": "PLN",
"fee": "1900",
"status": "1" // 1 = Produk Tersedia, 0 = Produk Gangguan
"updated_at": "2018-06-09 19:29:53",
},
{
"product_id": "PLNNONTAGLIST",
"product_name": "PLN NON TAGLIST",
"fee": "1900",
"status": "1" // 1 = Produk Tersedia, 0 = Produk Gangguan
"updated_at": "2018-06-09 19:29:53",
}
]
}
<?php
$url = 'https://atlantispay.id/api/pembayaran/bayartagihan';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$data = array(
'tagihan_id' => '123', // ID Tagihan
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"tagihan_id": "123",
"reff": "86RLU54F5H5SGJ554F8",
"message": "Pembayaran Tagihan Anda Telah Berhasil dengan No. Referensi : 86RLU54F5H5SGJ554F8"
}
<?php
$url = 'https://atlantispay.id/api/smm/service';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"data": [
{
"id": "1",
"category_id": "2",
"service_name": "Facebook Video Views Super Cheap [Fast]",
"desc": "[Masukan Link Video] Kecepatan 500 - 2k / Hari! Instant - 24 Jam start",
"price": "52000",
"min": "100",
"max": "10000",
"type": "default",
"status": "1",
},
{
"id": "2",
"category_id": "3",
"service_name": "Facebook Page Likes Promo [Fast]",
"desc": "Layanan Like Halaman Facebook Termurah. Masukan Link Halaman Facebook. Tidak ada Refill, proses cepat LQ Max 500 per page. Per order 100",
"price": "45000",
"min": "200",
"max": "5000",
"type": "default",
"status": "1",
}
]
}
<?php
$url = 'https://atlantispay.id/api/smm/transaction';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$data = array(
'service_id' => '123', // ID Service
'link' => '123', // Target Pengisian
'quantity' => '123', // Jumlah Pengisian
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"transaksi_id": "123",
\
"message": "Pembelian Instagram Followers atlantispay Sedang diproses."
}
<?php
$url = 'https://atlantispay.id/api/smm/history';
$header = array(
'Accept: application/json',
'Authorization: Bearer [apikey]', // Ganti [apikey] dengan API KEY Anda
);
$data = array(
'trxid' => '123', // ID Transaksi
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
echo $result;
{
"status": "success",
"data": [
{
"id": "1",
"link": "atlantispay",
"quantity": "100",
"charge": "52000",
"start_count": "100",
"remains": "0",
"status": "Completed",
}
]
}
Contoh alamat callback url seperti ini: http://domainAnda.tld/script.php . Nama file atau alamat callback terserah Anda. Berikut contoh script untuk menerima update transaksi dari AtlantisPay
<?php
/* Script ini hanya membantu menyimpan dalam file saja
* Hasil yg tersimpan silakan dianalisa agar dapat diproses oleh sistem Anda.
*/
if($_SERVER['REMOTE_ADDR']=='172.104.32.244'){ // memastikan data terikirim dari server AtlantisPay
file_put_contents('save.txt', $_GET['content']); // menyimpan dalam file save.txt
}
{
"id":2885,
"code":"SW1",
"produk":"TELKOMSEL 1.000",
"total":"1395",
"target":"085281266667",
"mtrpln":"-",
"note":"Transaksi GAGAL, Produk Sedang Gangguan",
"token":"-",
"status":"2",
"saldo_before_trx":"29594",
"saldo_after_trx":"29594",
"created_at":"2018-03-27 10:30:20",
"updated_at":"2018-03-27 10:30:24"
}