PPOB API Documentasi
API Pulsa & PPOB
| Method | POST |
| API URL | https://jagoanpedia.com/api/ppob |
| Parameter | Deskripsi |
|---|---|
| key | API Key anda |
| action | services |
Example Request (PHP cURL)
<?php
$url = "https://jagoanpedia.com/api/ppob";
$data = [
"key" => "API Key" ,
"action" => "services"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
echo "Response: " . $response;
?>
Success Response:
{
"success": true,
"data": {
"id": TSEL10,
"name": "Telkomsel 10000",
"operator": "Telkomsel",
"category": "Pulsa",
"note": "Keterangan produk",
"price": 10500,
"status": "Active"
}
}
Failed Response:
{
success: false,
error: "Wrong API Key"
}
| Parameter | Deskripsi |
|---|---|
| key | API Key anda |
| action | order |
| service | Id layanan, bisa dilihat di Daftar layanan |
| target | Nomor tujuan target. |
Example Request (PHP cURL)
<?php
$url = "https://jagoanpedia.com/api/ppob";
$data = [
"key" => "API Key" ,
"action" => "order",
"service => "TSEL10"
"target => "08123xxxx"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
echo "Response: " . $response;
?>
Success Response:
{
"success": true,
"data": {
"id": 2413,
"target": "081xxxx",
"price": 10000,
"status": "Pending"
}
}
Failed response:
{
success: false,
error: "Service not active"
}
| Parameter | Deskripsi |
|---|---|
| key | API Key anda |
| action | status |
| order_id | ID Pesanan |
Example Request (PHP cURL)
<?php
$url = "https://jagoanpedia.com/api/ppob";
$data = [
"key" => "API Key" ,
"action" => "status",
"order_id => "1234"
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
curl_close($ch);
echo "Response: " . $response;
?>
Success Response:
{
"success": true,
"data": {
"id": 2413,
"target": "081xxxx",
"status": "Pending",
"sn": "3627xxxxx"
}
}
Failed response:
{
success: false,
error: "Order id tidak ditemukan"
}