REST API Reference

Automate your orders, manage deposits, and integrate ALxZen Clouds directly into your bots and applications.

Base URL http://localhost:3000/api/v1

Authentication

All API requests must include your secret API key in the headers. You can generate this key in your Reseller Profile.

Headers: {
  "x-api-key": "AOC-YOUR_SECRET_KEY_HERE",
  "Content-Type": "application/json"
}

Payment Types (paymentType)

When making an order, you can choose how it is funded using the paymentType parameter.

direct (Balance)

Mengurangi saldo di akun Anda secara langsung tanpa perlu scan QRIS lagi. Sangat cocok kalau Anda mau pakai Payment Gateway sendiri di website / bot Anda.

qris

API akan mengembalikan data QRIS yang bisa langsung dibayar oleh customer Anda. Cocok buat Anda yang ga mau ribet pakai payment gateway tambahan, cukup terintegrasi dengan web ini saja.

GET

/account

Retrieve your current balance and reseller margin configuration.

Response

{
  "success": true,
  "data": {
    "username": "AlxzyReseller",
    "role": "reseller",
    "balance": 150000,
    "margin": 5000
  }
}
GET

/products

List all active products available for purchase. The resellerPrice automatically includes your configured margin.

Response

{
  "success": true,
  "count": 12,
  "data": [
    {
      "_id": "60d5ecb8b392d7...123",
      "name": "VPS Node.js 1GB",
      "price": 15000, // Base Price
      "resellerPrice": 20000, // Base + Your Margin
      "stock": -1 // -1 means unlimited (Pterodactyl/Scripts)
    }
  ]
}
POST

/deposit

Generate a QRIS code to top up your dashboard balance.

Request Body

{
  "amount": 50000
}

Request Parameters

Parameter Type Mandatory Description
amount Number Yes Jumlah saldo yang ingin diisi (min Rp 1.000)

Request Example

{
  "amount": 50000
}

Response

{
  "success": true,
  "message": "Deposit QRIS generated successfully",
  "data": {
    "depositId": "DEP-XYZ123",
    "amount": 50000,
    "qris_data": "00020101021126570011ID.ESPAY.W..."
  }
}
POST

/order

Place an order for a Pterodactyl server, Premium App, or Script.

Request Parameters

Parameter Type Mandatory Description
productId String Yes ID Produk dari endpoint GET /products
paymentType String Yes Pilih "direct" (saldo) atau "qris" (bayar instan)
serverUsername String Optional Username panel (Khusus Pterodactyl. Jika kosong, default ke email/username user)
serverPassword String Optional Password panel (Khusus Pterodactyl. Jika kosong, sistem generate password acak)
otpNumberId String Optional ID Nomor SMS OTP (Khusus pembelian produk OTP / Nokos)
voucherCode String Optional Kode voucher diskon untuk potongan harga

Request Payload Examples

Pterodactyl (Direct)
{
  "productId": "60d5ecb8b392d7...",
  "paymentType": "direct",
  "serverUsername": "user_bot_123"
}
App / Script (Direct)
{
  "productId": "60d5ecb8b392d7...",
  "paymentType": "direct"
}

Response (Direct Type - Success)

{
  "success": true,
  "message": "Order placed successfully via balance.",
  "data": {
    "orderId": "API-XYZ123",
    "status": "completed",
    "data": {
      // Returns Panel Login if Pterodactyl
      "serverUsername": "user_bot_123",
      "serverPassword": "abc123xyz",
      "panelUrl": "https://panel.yourdomain.com",
      // Or Returns Account details if App Premium
      "accountEmail": "user@netflix.com",
      "accountPassword": "pass123",
      // Or Returns Download details if Script
      "downloadUrl": "https://link.to/script.zip"
    }
  }
}

Response (QRIS Type)

{
  "success": true,
  "message": "QRIS generated successfully. Order is pending payment.",
  "data": {
    "orderId": "API-XYZ123",
    "amount": 20000,
    "status": "pending",
    "qris_data": "00020101021126570011ID.ESPAY.W..."
  }
}
GET

/order/:id

Check the status and details of a specific order by its ID. Contains provisioned credentials if completed.

Response

{
  "success": true,
  "data": {
    "orderId": "API-XYZ123",
    "status": "completed",
    "amount": 20000,
    "data": {
      // Contains Panel URL & Password, or Account Login
      "serverPassword": "...",
      "panelUrl": "..."
    }
  }
}