Memuat…
Memuat…
Developer
Beli nomor virtual dan ambil OTP dari aplikasi atau bot kamu sendiri. Semua respons berformat JSON.
Download dokumentasi (.md)Base URL: https://rexyzotpid.com/api/v1
/catalog.POST /orders. Saldo terpotong sebesar harga API.GET /orders/{id} tiap 3-5 detik sampai otpCode terisi.Kirim API key di setiap request, lewat salah satu header:
Authorization: Bearer rxz_xxxxxxxxxxxxxxxx
# atau
X-API-Key: rxz_xxxxxxxxxxxxxxxxKey hanya tampil sekali saat dibuat dan bisa dicabut kapan saja. Simpan di server kamu, jangan ditaruh di aplikasi yang dipakai publik (web atau APK). Batas 120 request per menit per key; lewat dari itu kamu dapat HTTP 429 dan header Retry-After.
GET /balance
Saldo wallet pemilik key.
{ "success": true, "balance": 125000 }GET /catalog
Katalog bertingkat. Parameter server wajib (1 = SMSCODE, 2 = Grizzly) kecuali admin memakai satu server saja.
| Parameter | Hasil |
|---|---|
| server | tanpa parameter lain: daftar negara (countries, tiap item punya id dan name) |
| server + country_id | daftar layanan (services) |
| + service_id | operator + produk (products). Kolom price = harga API yang kamu bayar |
| + operator_id | opsional, menyaring produk per operator |
POST /orders
Beli nomor. Body JSON:
| Field | Keterangan |
|---|---|
| productId | wajib, id produk dari katalog |
| countryId | wajib, id negara |
| platformId | wajib, id layanan (service_id di katalog) |
| operatorId | opsional |
| server | 1 atau 2 (wajib kalau admin memakai dua server) |
| quantity | opsional, 1-5 nomor sekaligus. Hasilnya ada di array orders |
| idempotencyKey | sangat disarankan: teks unik (huruf, angka, _ atau -, maks 128). Request yang diulang dengan key sama tidak membuat order ganda |
{
"success": true,
"order": {
"id": "b3f1c0de-1111-2222-3333-444455556666",
"status": "PROCESSING",
"productName": "WhatsApp - Indonesia",
"phoneNumber": "628123456789",
"otpCode": null,
"otpMessage": null,
"price": 3372,
"notes": null,
"expiresAt": "2026-10-30T12:30:00.000Z",
"createdAt": "2026-10-30T12:20:00.000Z",
"updatedAt": "2026-10-30T12:20:01.000Z"
}
}GET /orders/{id}
Status dan OTP satu order. Bentuk respons sama seperti di atas; saat OTP masuk, status jadi OTP_RECEIVED dan otpCode terisi.
POST /orders/{id}
Body {"action":"cancel"}. Aksi lain: finish (selesai) dan resend (minta kirim ulang SMS, jika didukung). Pembatalan hanya bisa setelah jeda minimum dari provider; sebelum itu kamu dapat HTTP 409 berisi sisa detiknya.
GET /orders
Riwayat order milik key ini (array orders).
| Status | Arti | Akhir? |
|---|---|---|
| PENDING | Order dibuat, sedang diverifikasi sistem / belum dapat nomor | Tidak |
| PROCESSING | Nomor sudah didapat, menunggu OTP | Tidak |
| OTP_RECEIVED | OTP sudah masuk, baca di otpCode | Tidak |
| SUCCESS | Selesai, OTP terpakai | Ya |
| CANCELLED | Dibatalkan sebelum OTP masuk, saldo kembali | Ya |
| EXPIRED | Waktu habis tanpa OTP, saldo kembali | Ya |
| FAILED | Gagal diproses provider, saldo kembali | Ya |
| REFUNDED | Saldo sudah dikembalikan | Ya |
Kalau status akhir tanpa otpCode (CANCELLED, EXPIRED, FAILED, REFUNDED), berhenti menunggu: tidak akan ada OTP dan kamu tidak dikenai biaya.
Saat gagal, respons berbentuk { "success": false, "message": "..." } dengan kode HTTP berikut:
| HTTP | Penyebab | Yang dilakukan |
|---|---|---|
| 400 | Data tidak valid (field kurang/salah) | Periksa body dan parameter |
| 401 | API key salah, dicabut, atau akun nonaktif | Cek key; buat yang baru jika perlu |
| 402 | Saldo tidak cukup | Deposit dulu, lalu ulangi |
| 404 | Order tidak ditemukan / bukan milik key ini | Cek id order |
| 409 | Aksi belum bisa (mis. batal terlalu cepat, status tidak mendukung) | Coba lagi setelah beberapa detik (lihat pesan) |
| 429 | Melebihi 120 request/menit atau terlalu banyak order | Tunggu sesuai header Retry-After |
| 502 | Provider gagal / stok habis; saldo sudah dikembalikan | Coba produk atau server lain |
| 503 | API dimatikan, server tidak tersedia, atau maintenance | Coba lagi nanti |
| 500 | Gangguan di sisi server | Ulangi dengan idempotencyKey yang sama |
curl
# 1) saldo
curl -H "Authorization: Bearer $KEY" https://rexyzotpid.com/api/v1/balance
# 2) negara -> layanan -> produk (server 1 = SMSCODE, 2 = Grizzly)
curl -H "Authorization: Bearer $KEY" "https://rexyzotpid.com/api/v1/catalog?server=1"
curl -H "Authorization: Bearer $KEY" "https://rexyzotpid.com/api/v1/catalog?server=1&country_id=6"
curl -H "Authorization: Bearer $KEY" "https://rexyzotpid.com/api/v1/catalog?server=1&country_id=6&service_id=1"
# 3) beli nomor
curl -X POST https://rexyzotpid.com/api/v1/orders -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"server":1,"countryId":6,"platformId":1,"productId":123,"idempotencyKey":"order-0001"}'
# 4) cek status + OTP
curl -H "Authorization: Bearer $KEY" https://rexyzotpid.com/api/v1/orders/ORDER_ID
# 5) batalkan (saldo kembali kalau OTP belum masuk)
curl -X POST https://rexyzotpid.com/api/v1/orders/ORDER_ID -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{"action":"cancel"}'Python
import time, uuid, requests
BASE = "https://rexyzotpid.com/api/v1"
H = {"Authorization": "Bearer rxz_KEYKAMU"}
def beli(server, country_id, service_id, product_id):
r = requests.post(BASE + "/orders", headers=H, timeout=30, json={
"server": server, "countryId": country_id, "platformId": service_id,
"productId": product_id, "idempotencyKey": str(uuid.uuid4()),
})
data = r.json()
if not data.get("success"):
raise RuntimeError(data.get("message"))
return data["order"]
def tunggu_otp(order_id, batas=300):
mulai = time.time()
while time.time() - mulai < batas:
order = requests.get(BASE + "/orders/" + order_id, headers=H, timeout=30).json()["order"]
if order["otpCode"]:
return order["otpCode"]
if order["status"] in ("FAILED", "CANCELLED", "EXPIRED", "REFUNDED"):
return None # tidak akan ada OTP, saldo sudah kembali
time.sleep(4) # jangan lebih rapat dari 3-5 detik
return None
order = beli(1, 6, 1, 123)
print("Nomor:", order["phoneNumber"])
print("OTP:", tunggu_otp(order["id"]))Node.js (18+)
const BASE = "https://rexyzotpid.com/api/v1";
const HEADERS = { Authorization: "Bearer rxz_KEYKAMU", "Content-Type": "application/json" };
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
async function beli(server, countryId, platformId, productId) {
const res = await fetch(BASE + "/orders", {
method: "POST", headers: HEADERS,
body: JSON.stringify({ server, countryId, platformId, productId, idempotencyKey: crypto.randomUUID() }),
});
const data = await res.json();
if (!data.success) throw new Error(data.message);
return data.order;
}
async function tungguOtp(id, batasMs = 300000) {
const mulai = Date.now();
while (Date.now() - mulai < batasMs) {
const { order } = await (await fetch(BASE + "/orders/" + id, { headers: HEADERS })).json();
if (order.otpCode) return order.otpCode;
if (["FAILED", "CANCELLED", "EXPIRED", "REFUNDED"].includes(order.status)) return null;
await sleep(4000);
}
return null;
}
const order = await beli(1, 6, 1, 123);
console.log("Nomor:", order.phoneNumber);
console.log("OTP:", await tungguOtp(order.id));idempotencyKey unik tiap order. Kalau koneksi putus, ulangi request dengan key yang sama; kamu tidak akan dikenai biaya dua kali./catalog sebelum membeli.