Socks5 VPN Developer

經銷商訂單查詢 API

以購買者信箱及訂單編號查詢 VPN 狀態、購買與到期時間、流量用量,以及受保護的配置查閱網址。

快速開始

  1. 登入官網並開啟「維護」;若帳號尚無 Key,系統會自動建立。完整 Key 可隨時在維護頁查看及複製。
  2. 把 Key 放入 HTTP Authorization 標頭,送出查詢。

API Key 代表您的帳號,可查詢該帳號旗下所有經銷連結的訂單。請只保存在伺服器端,勿放入瀏覽器 JavaScript、App 或公開版本庫。

更換 Key:在維護頁點擊「更換 API Key」並確認後,舊 Key 會立即失效。所有串接網站、伺服器與程式都必須同步換成新 Key。

查詢訂單

POSThttps://socks5.online/api/reseller/order-query.php

標頭

Authorization: Bearer rvpn_live_YOUR_API_KEY
Content-Type: application/json
Accept: application/json

JSON 參數

欄位類型說明
customer_emailstring購買時使用的完整 Email,精確比對、不分大小寫。
order_idstringSocks5 VPN 訂單編號,精確比對。

cURL 範例

curl -X POST 'https://socks5.online/api/reseller/order-query.php' \
  -H 'Authorization: Bearer rvpn_live_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "customer_email": "buyer@example.com",
    "order_id": "ORDER202607260001"
  }'

成功回應

{
  "success": true,
  "order": {
    "order_id": "ORDER202607260001",
    "customer_email": "buyer@example.com",
    "payment_status": "paid",
    "vpn_status": "active",
    "plan": "50 Mbps",
    "bandwidth": "50Mbps",
    "purchased_at": "2026-07-26 14:30:00",
    "started_at": "2026-07-26",
    "expires_at": "2027-07-26 23:59:59",
    "traffic": {
      "total_gb": 200,
      "used_gb": 36.42,
      "remaining_gb": 163.58,
      "usage_percent": 18.21
    },
    "config_url": "https://socks5.online/wireguard-config.php?..."
  }
}

config_url 內含配置查閱權杖,請視同機密資料。尚未產生配置時此欄位為 null

狀態碼與限制

HTTP代碼原因
400invalid_json請求不是有效 JSON。
401unauthorizedAPI Key 無效、過期或已停用。
404not_found資料不符,或訂單不屬於此經銷商。
422validation_errorEmail 或訂單編號格式不正確。
429rate_limited每組 Key 每分鐘最多 60 次請求。
500internal_error系統暫時無法處理請求。

所有時間皆採 Asia/Taipei 時區;流量數據依節點最近一次同步結果為準。