📚 MakerGames Reseller API

Dokumentasi API untuk reseller dan integrasi pihak ketiga.

🔐 Autentikasi

Semua request harus menyertakan API Key di header. Dapatkan API Key dari halaman profil dashboard.

Header:
X-API-Key: your_api_key_here

(Opsional) IP Whitelist:
Hubungi admin untuk whitelist IP address Anda.

🌐 Base URL

https://makergames.id/api/reseller

GET /api/reseller?action=services

Mendapatkan daftar semua layanan dan produk yang tersedia.

Request

GET /api/reseller?action=services
X-API-Key: your_api_key

Response

{
  "success": true,
  "data": [
    {
      "id": "service_id",
      "name": "Mobile Legends",
      "category": "Voucher Game",
      "products": [
        {
          "id": "product_id",
          "name": "86 Diamonds",
          "price": 20000,
          "isActive": true
        }
      ]
    }
  ]
}

POST /api/reseller?action=order

Membuat pesanan baru. Saldo akan dipotong otomatis.

Request Body

POST /api/reseller?action=order
Content-Type: application/json
X-API-Key: your_api_key

{
  "productId": "product_id",
  "targetId": "123456789",       // User ID / Nomor HP
  "targetServer": "1234"         // Server ID (opsional)
}

Response

{
  "success": true,
  "data": {
    "invoiceId": "MG-20240101-XXXX",
    "productName": "86 Diamonds",
    "targetId": "123456789",
    "price": 20000,
    "status": "PROCESSING",
    "createdAt": "2024-01-01T00:00:00.000Z"
  }
}

GET /api/reseller?action=status&invoiceId=XXX

Mengecek status transaksi berdasarkan invoice ID.

Request

GET /api/reseller?action=status&invoiceId=MG-20240101-XXXX
X-API-Key: your_api_key

Response

{
  "success": true,
  "data": {
    "invoiceId": "MG-20240101-XXXX",
    "status": "SUCCESS",
    "serialNumber": "xxxx-xxxx-xxxx",
    "productName": "86 Diamonds",
    "price": 20000,
    "createdAt": "2024-01-01T00:00:00.000Z"
  }
}

GET /api/reseller?action=deposit_history

Mendapatkan riwayat deposit.

GET /api/reseller?action=deposit_history
X-API-Key: your_api_key

Response:
{
  "success": true,
  "data": {
    "balance": 500000,
    "deposits": [
      {
        "amount": 100000,
        "method": "Midtrans",
        "status": "SUCCESS",
        "createdAt": "2024-01-01T00:00:00.000Z"
      }
    ]
  }
}

📊 Status Transaksi

PENDINGMenunggu pembayaran
PROCESSINGSedang diproses vendor
SUCCESSBerhasil
FAILEDGagal
REFUNDEDSaldo dikembalikan

⚠️ Error Response

{
  "success": false,
  "message": "Deskripsi error"
}

HTTP Status Codes:
- 200: Success
- 400: Bad Request
- 401: Unauthorized (API Key invalid)
- 403: Forbidden (IP not whitelisted)
- 404: Not Found
- 500: Internal Server Error

⏱️ Rate Limit

Maksimum 60 request per menit. Hubungi admin untuk meningkatkan limit.