REST API v1

Jualan server, otomatis.

Integrasikan katalog paket, QRIS payment, cek status order, dan auto-deploy Pterodactyl ke aplikasi kamu.

GET

Daftar paket

Mengambil paket aktif yang tersedia untuk di-order.

curl https://pteroqshop.alxzyy.my.id/api/v1/products \
  -H "Authorization: Bearer sk_live_xxx"

Contoh Response:

{
  "data": [
    {
      "id": 1,
      "type": "nodejs",
      "name": "NodeJS 1GB",
      "memory": "1024",
      "price": 1500
    }
  ]
}
POST

Buat order

Harga selalu dihitung server. Pembayaran QRIS dibuat otomatis dan server dideploy setelah lunas.

curl -X POST https://pteroqshop.alxzyy.my.id/api/v1/create-order \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"productId":1,"username":"client01","password":"password-kuat","email":"[email protected]"}'

Contoh Response:

{
  "data": {
    "orderId": "abc-123-...",
    "status": "pending",
    "amount": 2000,
    "paymentUrl": "https://pteroqshop.alxzyy.my.id/payment/abc-123-...",
    "qrImage": "https://pteroqshop.alxzyy.my.id/api/qr?data=..."
  }
}
GET

Cek order

Gunakan endpoint ini untuk membaca status pending, deploying, done, atau failed.

curl https://pteroqshop.alxzyy.my.id/api/v1/check-payment/:orderId \
  -H "Authorization: Bearer sk_live_xxx"

Contoh Response:

{
  "data": {
    "orderId": "abc-123-...",
    "status": "paid"
  }
}
GET

Detail Order & Panel

Mengambil data lengkap pesanan, termasuk detail login Pterodactyl (hanya tersedia jika status done).

curl https://pteroqshop.alxzyy.my.id/api/v1/order-detail/:orderId \
  -H "Authorization: Bearer sk_live_xxx"

Contoh Response:

{
  "data": {
    "id": "abc-123-...",
    "status": "done",
    "serverDetails": {
      "panelUrl": "https://panel.pteroqshop.alxzyy.my.id",
      "username": "client01",
      "serverId": "12345678"
    }
  }
}