API Docs

Dokumentasi API Terpadu

Selamat datang di Pusat Developer WarungNokos. Gunakan API Host-to-Host (H2H) ini untuk mengintegrasikan layanan Nomor Virtual, OTP otomatis, dan Sistem Saldo ke dalam website atau bot WhatsApp Anda secara White-Label (tanpa identitas pihak ketiga).

base-url
https://warungnokos.web.id

Seluruh endpoint API membutuhkan otorisasi. Anda WAJIB menggunakan API Key yang didapat dari halaman Profil Anda, dikirim melalui header request.

ParameterTipeLokasiDiperlukanDeskripsi
x-api-keystringheadersYaKunci API autentikasi (contoh: wn-123xyz...)

Users Profile & Balance

Mengambil informasi detail tentang profil akun WarungNokos Anda dan saldo terkini yang dapat digunakan untuk transaksi H2H.

GET /api/user/profile
profile.js
const options = {
method: 'GET',
url: '{{BASE}}/api/user/profile',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Accept': 'application/json'
}
};
const response = await axios(options);
profile.json
{
"success": true,
"data": {
"username": "developer_pro",
"email": "dev@mail.com",
"balance": 150000,
"referralCode": "A1B2C3"
}
}
Live Request Tester
GET

Services Available

Daftar lengkap layanan aplikasi (WhatsApp, Telegram, dll) yang tersedia di server kami untuk keperluan OTP.

GET /api/otp/services
services.js
const options = {
method: 'GET',
url: '{{BASE}}/api/otp/services',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Accept': 'application/json'
}
};
const response = await axios(options);
services.json
{
"success": true,
"data": [
{
"service_code": 14,
"service_name": "WhatsApp",
"service_img": "https://link/wa.png"
},
{
"service_code": 86,
"service_name": "Telegram",
"service_img": "https://link/tg.png"
}
]
}
Live Request Tester
GET

Countries Available

Mengambil daftar negara beserta pricelist (harga & stok) yang tersedia secara spesifik berdasarkan ID Layanan yang dipilih.

GET /api/otp/countries/:serviceId
ParameterTipeLokasiDiperlukanDeskripsi
serviceIdstringURL PathYaID layanan (contoh: 14 untuk WhatsApp)
countries.js
const options = {
method: 'GET',
// Ganti :serviceId dengan ID layanan (contoh 14)
url: '{{BASE}}/api/otp/countries/:serviceId',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Accept': 'application/json'
}
};
const response = await axios(options);
countries.json
{
"success": true,
"data": [
{
"number_id": 340437,
"name": "Indonesia",
"prefix": "+62",
"stock_total": 103,
"pricelist": [
{
"provider_id": "3837",
"server_id": 3,
"stock": 103,
"rate": 81.6,
"price": 1100
}
]
}
]
}
Live Request Tester
GET

List Operator

Daftar lengkap operator seluler berdasarkan negara dan provider_id yang dipilih.

GET /api/otp/operators/:country/:providerId
ParameterTipeLokasiDiperlukanDeskripsi
countrystringURL PathYaNama Negara (contoh: "indonesia")
providerIdstringURL PathYaProvider ID dari list pricelist (contoh: "3837")
operators.js
const options = {
method: 'GET',
url: '{{BASE}}/api/otp/operators/:country/:providerId',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Accept': 'application/json'
}
};
const response = await axios(options);
operators.json
{
"success": true,
"data": [
{
"id": "any",
"name": "any",
"image": "https://link/any.ico"
},
{
"id": "telkomsel",
"name": "telkomsel",
"image": "https://link/telkomsel.jpg"
}
]
}
Live Request Tester
GET

Create Order OTP

Endpoint untuk membeli nomor virtual. Saldo akan otomatis terpotong. (Sistem V2: Atomic & White-Label)

POST /api/otp/order
ParameterTipeLokasiDiperlukanDeskripsi
number_idstringbodyYanumber_id dari list negara
provider_idstringbodyYaprovider_id dari pricelist server
operator_idstringbodyYaid dari list operator (contoh: "any")
price_jualnumberbodyYaHarga modal + markup Anda
service_namestringbodyOpsionalNama layanan untuk label (contoh: "WhatsApp")
orders.js
const options = {
method: 'POST',
url: '{{BASE}}/api/otp/order',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Content-Type': 'application/json'
},
data: {
"number_id": "340437",
"provider_id": "3837",
"operator_id": "any",
"price_jual": 3500,
"service_name": "WhatsApp"
}
};
const response = await axios(options);
orders.json
{
"success": true,
"data": {
"trxId": "WN0000000125",
"serviceName": "WhatsApp",
"phoneNumber": "+62 812 3456 7890",
"amount": 3500,
"status": "waiting",
"createdAt": "2026-04-02T12:00:00.000Z"
}
}
Live Request Tester
POST
Edit langsung body JSON di atas sebelum mengirim request.

Check Order Status

Periksa status pesanan nomor Anda (apakah SMS sudah masuk). Lakukan polling setiap 4–5 detik pada endpoint ini. (Sistem Race-Condition Safe)

GET /api/otp/status/:orderId
ParameterTipeLokasiDiperlukanDeskripsi
orderIdstringURL PathYaID Trx Lokal (contoh: "WN0000000125")
get-status.js
const options = {
method: 'GET',
// Masukkan trxId WN... di URL
url: '{{BASE}}/api/otp/status/WN0000000125',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Accept': 'application/json'
}
};
const response = await axios(options);
get-status.json
{
"success": true,
"status": "completed", // waiting, completed, canceled
"otp_code": "949708"
}
Live Request Tester
GET

Set Order Status

Ubah status pesanan secara manual (contoh: batalkan OTP jika kelamaan). Saldo akan dikembalikan jika dibatalkan.

POST /api/otp/set_status
ParameterTipeLokasiDiperlukanDeskripsi
trxIdstringbodyYaID Trx Lokal (contoh: "WN0000000125")
action_statusstringbodyYaAksi: cancel, done, resend
set-status.js
const options = {
method: 'POST',
url: '{{BASE}}/api/otp/set_status',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Content-Type': 'application/json'
},
data: {
"trxId": "WN0000000125",
"action_status": "cancel"
}
};
const response = await axios(options);
set-status.json
{
"success": true,
"message": "Status berhasil diubah menjadi cancel"
}
Live Request Tester
POST

Create Deposit (V2)

Buat kode tagihan pembayaran untuk top-up saldo user. Mendukung metode QRIS dan Crypto USDT. Maksimal 3 transaksi pending.

POST /api/deposit/create
ParameterTipeLokasiDiperlukanDeskripsi
amountnumberbodyYaJumlah deposit (Min: 2000)
methodstringbodyOpsionalMetode: qris, usdt-trc-20, dll. (Default: qris)
depo-create.js
const options = {
method: 'POST',
url: '{{BASE}}/api/deposit/create',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Content-Type': 'application/json'
},
data: {
"amount": 50000,
"method": "qris"
}
};
const response = await axios(options);
depo-create.json
{
"success": true,
"trxId": "WN0000000050",
"qr_string": "00020101021126600015...",
"qr_image": "https://qris.url/img.png",
"total": 50200,
"expired_at": 1775022865340
}
Live Request Tester
POST

Deposit Status (V2)

Periksa status pembayaran deposit. Jika berhasil, objek detail akan terisi nama brand pembayaran (misal DANA, OVO, TRON).

GET /api/deposit/status/:trxId
ParameterTipeLokasiDiperlukanDeskripsi
trxIdstringURL PathYaID Deposit (contoh: "WN0000000050")
depo-status.js
const options = {
method: 'GET',
url: '{{BASE}}/api/deposit/status/WN0000000050',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Accept': 'application/json'
}
};
const response = await axios(options);
depo-status.json
{
"success": true,
"status": "success", // pending, success, cancel
"amount": 50000,
"detail": {
"created_at": "2026-04-02 12:34:25",
"total": 50200,
"fee": 200,
"diterima": 50000,
"brand_name": "DANA",
"buyer_reff": "1js8mUeShBIw"
}
}
Live Request Tester
GET

Deposit Cancel

Batalkan status tagihan pembayaran deposit yang masih berstatus tertunda (pending).

POST /api/deposit/cancel
ParameterTipeLokasiDiperlukanDeskripsi
trxIdstringbodyYaID Deposit (contoh: "WN0000000050")
depo-cancel.js
const options = {
method: 'POST',
url: '{{BASE}}/api/deposit/cancel',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
'Content-Type': 'application/json'
},
data: {
"trxId": "WN0000000050"
}
};
const response = await axios(options);
depo-cancel.json
{
"success": true,
"message": "Deposit dibatalkan",
"detail": {
"created_at": "2026-04-02 12:34:25",
"total": 50200,
"fee": 200,
"diterima": 50000,
"brand_name": "QRIS",
"buyer_reff": "-"
}
}
Live Request Tester
POST