API ini digunakan untuk mendapatkan informasi saldo akun
URL: https://mypulsaku.com/api/v1/balance
Method: GET
<?php
$apiKey = "masukkan api key anda disini";
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
]
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"data": {
"balance": "150000"
}
}
API ini digunakan untuk mendapatkan daftar kategori produk prabayar
URL: https://mypulsaku.com/api/v1/product/prabayar/category
Method: GET
<?php
$apiKey = "masukkan api key anda disini";
$query = [
'id' => 19, // filter berdasarkan id kategori (tidak wajib)
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/product/prabayar/category?".http_build_query($query),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
]
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"data": [
{
"id": 19,
"name": "PULSA ALL OPERATOR",
"status": 1 // 1 = aktif, 0 = tidak aktif
},
{
"id": 20,
"name": "VOUCHER GAME",
"status": 1 // 1 = aktif, 0 = tidak aktif
}
]
}
{
"success": false,
"message": "Ini pesan errornya"
}
API ini digunakan untuk mendapatkan daftar operator produk prabayar
URL: https://mypulsaku.com/api/v1/product/prabayar/operator
Method: GET
<?php
$apiKey = "masukkan api key anda disini";
$query = [
'id' => 19, // filter berdasarkan id operator (tidak wajib)
'category_id' => 20, // filter berdasarkan id kategori (tidak wajib)
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/product/prabayar/operator?".http_build_query($query),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
]
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"data": [
{
"id": 19,
"code": "S",
"name": "TELKOMSEL",
"prefix": "0812,0853,0822",
"status": 1, // 1 = aktif, 0 = tidak aktif
"category_id": 1
},
{
"id": 35,
"code": "I",
"name": "INDOSAT",
"prefix": "0857,0815,0858",
"status": 1, // 1 = aktif, 0 = tidak aktif
"category_id": 1
},
]
}
{
"success": false,
"message": "Ini pesan errornya"
}
API ini digunakan untuk mendapatkan daftar produk prabayar
URL: https://mypulsaku.com/api/v1/product/prabayar
Method: GET
<?php
$apiKey = "masukkan api key anda disini";
$query = [
'id' => 19, // filter berdasarkan id produk (tidak wajib)
'code' => "S1", // filter berdasarkan kode produk (tidak wajib)
'operator_id' => 1, // filter berdasarkan id operator (tidak wajib)
'category_id' => 20, // filter berdasarkan id kategori (tidak wajib)
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/product/prabayar?".http_build_query($query),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
]
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"data": [
{
"id": 19,
"code": "S1",
"name": "TELKOMSEL 1.000",
"desc": "Pulsa Telkomsel 1.000",
"price": 1023,
"status": 1, // 1 = aktif, 0 = tidak aktif
"operator_id": 2,
"category_id": 1
},
{
"id": 24,
"code": "I5",
"name": "INDOSAT 5.000",
"desc": "Pulsa Indosat 5.000",
"price": 5200,
"status": 1, // 1 = aktif, 0 = tidak aktif
"operator_id": 3,
"category_id": 1
}
]
}
{
"success": false,
"message": "Ini pesan errornya"
}
API ini digunakan untuk mendapatkan daftar kategori produk pascabayar
URL: https://mypulsaku.com/api/v1/product/pascabayar/category
Method: GET
<?php
$apiKey = "masukkan api key anda disini";
$query = [
'id' => 19, // filter berdasarkan id kategori (tidak wajib)
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/product/pascabayar/category?".http_build_query($query),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
]
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"data": [
{
"id": 19,
"name": "PEMBAYARAN PLN PASCABAYAR",
"status": 1 // 1 = aktif, 0 = tidak aktif
},
{
"id": 20,
"name": "PEMBAYARAN INTERNET PASCABAYAR",
"status": 1 // 1 = aktif, 0 = tidak aktif
}
]
}
{
"success": false,
"message": "Ini pesan errornya"
}
API ini digunakan untuk mendapatkan daftar operator produk pascabayar
URL: https://mypulsaku.com/api/v1/product/pascabayar/operator
Method: GET
<?php
$apiKey = "masukkan api key anda disini";
$query = [
'id' => 19, // filter berdasarkan id operator (tidak wajib)
'category_id' => 20, // filter berdasarkan id kategori (tidak wajib)
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/product/pascabayar/operator?".http_build_query($query),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
]
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"data": [
{
"id": 19,
"name": "PLN PASCABAYAR",
"status": 1, // 1 = aktif, 0 = tidak aktif
"category_id": 1
},
{
"id": 35,
"name": "INTERNET PASCABAYAR",
"status": 1, // 1 = aktif, 0 = tidak aktif
"category_id": 1
},
]
}
{
"success": false,
"message": "Ini pesan errornya"
}
API ini digunakan untuk mendapatkan daftar produk pascabayar
URL: https://mypulsaku.com/api/v1/product/pascabayar
Method: GET
<?php
$apiKey = "masukkan api key anda disini";
$query = [
'id' => 19, // filter berdasarkan id produk (tidak wajib)
'code' => "BPJS", // filter berdasarkan kode produk (tidak wajib)
'operator_id' => 1, // filter berdasarkan id operator (tidak wajib)
'category_id' => 20, // filter berdasarkan id kategori (tidak wajib)
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/product/pascabayar?".http_build_query($query),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
]
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"data": [
{
"id": 19,
"code": "BPJS",
"name": "Pembayaran BPJS",
"admin": 1500,
"status": 1, // 1 = aktif, 0 = tidak aktif
"operator_id": 2,
"category_id": 1
},
{
"id": 24,
"code": "SPEEDY",
"name": "Pembayaran Speedy",
"admin": 1500,
"status": 1, // 1 = aktif, 0 = tidak aktif
"operator_id": 2,
"category_id": 1
}
]
}
{
"success": false,
"message": "Ini pesan errornya"
}
API ini digunakan untuk melakukan transaksi pembelian produk prabayar
URL: https://mypulsaku.com/api/v1/transaction/prabayar/create
Method: POST
<?php
$apiKey = "masukkan api key anda disini";
$data = [
"code" => "S1", // kode produk
"target" => "081234567890", // nomor tujuan,
"pin" => "1111", // PIN transaksi
"id_pelanggan" => "111111111", // id pelanggan (khusus transaksi token listrik)
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/transaction/prabayar/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
],
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($data)
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"message": "Transaksi anda berhasil diantrikan",
"data": {
"trx_id": 1547
}
}
{
"success": false,
"message": "PIN salah"
}
API ini digunakan untuk mendapatkan rincian transaksi pembelian produk prabayar
URL: https://mypulsaku.com/api/v1/transaction/prabayar/detail/{trx_id}
Method: GET
<?php
$apiKey = "masukkan api key anda disini";
$trx_id = 1547; // id transaksi (wajib)
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/transaction/prabayar/detail/".$trx_id,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
]
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"message": "Transaksi ditemukan",
"data": {
"trx_id": "1547",
"via": "API",
"code": "S1",
"produk": "TELKOMSEL 1.000",
"price": "1200",
"target": "081234567890",
"mtrpln": null,
"note": "Trx s1 081234567890 Sukses. SN : 221753xxxxxxxxx",
"token": "221753xxxxxxxxx",
"status": "1", // 0 = pending, 1 = sukses, 2 = gagal
"saldo_before_trx": "2000",
"saldo_after_trx": "800",
"created_at": "2020-08-18 21:16:04",
"updated_at": "2020-08-18 21:30:57"
}
}
{
"success": false,
"message": "Transaksi tidak ditemukan"
}
API ini digunakan untuk mendapatkan daftar riwayat transaksi pembelian produk prabayar (maks. 1000 data per request)
URL: https://mypulsaku.com/api/v1/transaction/prabayar/history
Method: GET
<?php
$apiKey = "masukkan api key anda disini";
$query = [
'trx_id' => 12345, // filter berdasarkan id transaksi (tidak wajib)
'date_start' => '2020-08-17 00:00:00', // filter berdasarkan tanggal awal transaksi (tidak wajib)
'date_end' => '2020-08-17 23:59:59', // filter berdasarkan tanggal akhir transaksi (tidak wajib)
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/transaction/prabayar/history?".http_build_query($query),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
]
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"data": [
{
"trx_id": "1546",
"via": "API",
"code": "S1",
"produk": "TELKOMSEL 1.000",
"price": "1200",
"target": "081234567890",
"mtrpln": null,
"note": "Trx s1 081234567890 Sukses. SN : 221753xxxxxxxxx",
"token": "221753xxxxxxxxx",
"status": "1", // 0 = pending, 1 = sukses, 2 = gagal
"saldo_before_trx": "2000",
"saldo_after_trx": "800",
"created_at": "2020-08-18 21:16:04",
"updated_at": "2020-08-18 21:30:57"
},
{
"trx_id": "1547",
"via": "API",
"code": "S1",
"produk": "TELKOMSEL 1.000",
"price": "1200",
"target": "081234567890",
"mtrpln": null,
"note": "Trx s1 081234567890 Sukses. SN : 221753xxxxxxxxx",
"token": "221753xxxxxxxxx",
"status": "1", // 0 = pending, 1 = sukses, 2 = gagal
"saldo_before_trx": "2000",
"saldo_after_trx": "800",
"created_at": "2020-08-18 21:16:04",
"updated_at": "2020-08-18 21:30:57"
},
]
}
API ini digunakan untuk melakukan pengecekan tagihan pascabayar sebelum melakukan pembayaran
URL: https://mypulsaku.com/api/v1/transaction/pascabayar/check
Method: POST
<?php
$apiKey = "masukkan api key anda disini";
$data = [
"code" => "PLN", // kode produk
"id_pelanggan" => "111111111", // id pelanggan
"phone" => "081234567890", // nomor hp pembeli
"pin" => "1111", // PIN transaksi
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/transaction/pascabayar/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
],
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($data)
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"message": "Berhasil melakukan pengecekan tagihan",
"data": {
"trx_id": 50,
"via": "API",
"code": "PLN",
"product_name": "Pembayaran PLN",
"nama": "Nama Pelanggan",
"periode": "202008",
"jumlah_tagihan": "100000",
"admin": "1250",
"jumlah_bayar": "101250",
"status": 0, // 0 = menunggu pembayaran, 1 = dalam proses, 2 = berhasil, 3 = gagal,
"created_at": "2020-08-18 21:16:04",
"updated_at": "2020-08-18 21:30:57"
}
}
{
"success": false,
"message": "Tagihan belum tersedia"
}
API ini digunakan untuk melakukan pembayaran tagihan pascabayar setelah melakukan pengecekan
URL: https://mypulsaku.com/api/v1/transaction/pascabayar/pay
Method: POST
<?php
$apiKey = "masukkan api key anda disini";
$data = [
"trx_id" => "50", // id transaksi dari pengecekan tagihan
"pin" => "1111", // PIN transaksi
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/transaction/pascabayar/pay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
],
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($data)
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"message": "Transaksi berhasil diproses"
}
{
"success": false,
"message": "Transaksi kadaluarsa atau sudah terbayar"
}
API ini digunakan untuk mendapatkan rincian transaksi pascabayar
URL: https://mypulsaku.com/api/v1/transaction/pascabayar/detail/{trx_id}
Method: GET
<?php
$apiKey = "masukkan api key anda disini";
$trx_id = 50;
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/transaction/pascabayar/detail/".$trx_id,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
]
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"message": "Transaksi ditemukan",
"data": {
"trx_id": 50,
"via": "API",
"code": "PLN",
"product_name": "Pembayaran PLN",
"no_pelanggan": "11111111111",
"nama": "Nama Pelanggan",
"periode": "202008",
"jumlah_tagihan": "100000",
"admin": "1250",
"jumlah_bayar": "101250",
"status": 0, // 0 = menunggu pembayaran, 1 = dalam proses, 2 = berhasil, 3 = gagal,
"token": "87465985937587590",
"created_at": "2020-08-18 21:16:04",
"updated_at": "2020-08-18 21:30:57"
}
}
{
"success": false,
"message": "Transaksi tidak ditemukan"
}
API ini digunakan untuk mendapatkan daftar riwayat transaksi pascabayar
URL: https://mypulsaku.com/api/v1/transaction/pascabayar/history
Method: GET
<?php
$apiKey = "masukkan api key anda disini";
$query = [
'trx_id' => 12345, // filter berdasarkan id transaksi (tidak wajib)
'date_start' => '2020-08-17 00:00:00', // filter berdasarkan tanggal awal transaksi (tidak wajib)
'date_end' => '2020-08-17 23:59:59', // filter berdasarkan tanggal akhir transaksi (tidak wajib)
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://mypulsaku.com/api/v1/transaction/pascabayar/history?".http_build_query($query),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ".$apiKey
]
]);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
{
"success": true,
"data": [
{
"trx_id": 50,
"via": "API",
"code": "PLN",
"product_name": "Pembayaran PLN",
"no_pelanggan": "11111111111",
"nama": "Nama Pelanggan",
"periode": "202008",
"jumlah_tagihan": "100000",
"admin": "1250",
"jumlah_bayar": "101250",
"status": 0, // 0 = menunggu pembayaran, 1 = dalam proses, 2 = berhasil, 3 = gagal,
"token": "87465985937587590",
"created_at": "2020-08-18 21:16:04",
"updated_at": "2020-08-18 21:30:57"
},
{
"trx_id": 51,
"via": "API",
"code": "PLN",
"product_name": "Pembayaran PLN",
"no_pelanggan": "11111111111",
"nama": "Nama Pelanggan",
"periode": "202008",
"jumlah_tagihan": "100000",
"admin": "1250",
"jumlah_bayar": "101250",
"status": 0, // 0 = menunggu pembayaran, 1 = dalam proses, 2 = berhasil, 3 = gagal,
"token": "87465985937587590",
"created_at": "2020-08-18 21:16:04",
"updated_at": "2020-08-18 21:30:57"
}
]
}