InstallPeak
Bảng Giá Giải Pháp Tài Liệu Tích Hợp & API Liên Hệ Hỗ Trợ Đăng Nhập / Quản Lý
Tài Liệu Kỹ Thuật & Đo Lường

Tích Hợp Tracking S2S, SDK & Wholesale API v2

Mọi đơn Qualified Redirects chạy ngay không cần code và tặng kèm cổng postback S2S miễn phí. Sử dụng tài liệu chuẩn production dưới đây cho Extension MV3, Telegram HMAC, Android Play Referrer / MMP, cửa sổ đối soát iOS AdAttributionKit, bảng mã /pb/ev và Wholesale API v2 có idempotency.

PHẦN 01

Browser Extensions (MV3) — Cầu Nối Same-Origin & /sdk/v1.js

Yêu cầu kỹ thuật (Same-Origin, JSON Parser & Node 18+): /lp, /welcome và POST /api/install-hook BẮT BUỘC dùng chung chính xác cùng origin (scheme + host + port) để cookie và localStorage đọc được xuyên suốt các bước. Backend yêu cầu Node 18+ (hỗ trợ sẵn fetch) và express.json(). TUYỆT ĐỐI KHÔNG đưa &tok= vào HTML phía trình duyệt.
1a. Trang Đệm Same-Origin Trên Domain Của Bạn (https://your-domain.com/lp)

Đặt URL đích là https://your-domain.com/lp (hệ thống tự nối ?dr_cid=<cid> chuẩn [A-Za-z0-9_-]{6,48}). /sdk/v1.js với data-capture-only="1" lưu dr_cid thời hạn 7 ngày vào cả 1st-party cookie (Max-Age=604800) lẫn localStorage trước khi chuyển hướng sang Chrome Web Store:

<!-- https://your-domain.com/lp -->
<script src="https://installpeak.com/sdk/v1.js" data-order="YOUR_ORDER_CODE" data-capture-only="1"></script>
<script>
  location.replace("https://chromewebstore.google.com/detail/your-extension/YOUR_32_CHAR_ID");
</script>
1b. background.js (Manifest V3 — chỉ kích hoạt khi cài mới)
// background.js (Manifest V3)
chrome.runtime.onInstalled.addListener((details) => {
  if (details.reason === "install") {
    chrome.tabs.create({ url: "https://your-domain.com/welcome" });
  }
});
1c. welcome.html (https://your-domain.com/welcome — KHÔNG chứa secret trong HTML; chỉ chốt dr_sent sau khi nhận 2xx/409)
<!-- https://your-domain.com/welcome (same origin as /lp and /api/install-hook) -->
<script async src="https://installpeak.com/sdk/v1.js"
  data-order="YOUR_ORDER_CODE"
  data-endpoint="/api/install-hook"></script>
1d. backend/install-hook.js (Node 18+ Express — ghim ORDER &amp; TOK từ process.env phía server, trả 502/503 khi lỗi để SDK tự retry an toàn)
// backend/install-hook.js (Node 18+, Express)
import express from "express";
const app = express();
app.use(express.json());

app.post("/api/install-hook", async (req, res) => {
  const cid = String(req.body?.cid || "").trim();
  if (!/^[A-Za-z0-9_-]{6,48}$/.test(cid)) {
    return res.status(400).json({ ok: false, error: "Invalid cid" });
  }
  // Pin ORDER_CODE and S2S_TOKEN strictly from server env (NEVER blindly trust req.body.order!)
  const orderCode = process.env.INSTALLPEAK_ORDER;
  const s2sToken = process.env.INSTALLPEAK_TOK;
  if (!orderCode || !s2sToken) return res.status(500).json({ ok: false });

  try {
    const qs = new URLSearchParams({ o: orderCode, cid, e: "install", tok: s2sToken });
    const pb = await fetch("https://installpeak.com/pb/ev?" + qs.toString(), {
      method: "GET",
      signal: AbortSignal.timeout(5000),
    });
    if (pb.ok || pb.status === 409) {
      // 200 confirmed or 409 already converted -> safe for /sdk/v1.js to mark dr_sent=1 & clear dr_cid
      return res.status(pb.status === 409 ? 409 : 200).json({ ok: true, duplicate: pb.status === 409 });
    }
    if (pb.status === 403 || pb.status === 404 || pb.status === 410) {
      return res.status(pb.status).json({ ok: false, permanent: true });
    }
    // Upstream 5xx/429 -> return 502 so /sdk/v1.js does NOT set dr_sent and can retry cleanly
    return res.status(502).json({ ok: false, retryable: true });
  } catch (err) {
    return res.status(503).json({ ok: false, retryable: true });
  }
});
Lưu ý độ tin cậy đo lường & kiểm duyệt link: Tín hiệu từ trang /welcome là chỉ báo cài đặt gọn nhẹ rất phù hợp cho Qualified Redirects; với hợp đồng Managed S2S CPA ($500+), SOW có thể yêu cầu thêm sự kiện xác nhận extension đang hoạt động. Các trang pre-lander HTTPS tùy chỉnh đi qua bộ quét tuân thủ tự động và chạy ở pool tách biệt cho tới khi xác minh — luôn hoàn tất bước Test S2S 1 chạm (TEST_) trong Order Portal trước khi nạp ngân sách CPA.
PHẦN 02

Telegram Bot (?start=cid_) & Mini App (?startapp=cid_ + HMAC initData)

Giới hạn nền tảng & quy ước InstallPeak: Telegram giới hạn tham số Bot ?start= tối đa 64 ký tự ([A-Za-z0-9_-], không dấu =), còn Mini App ?startapp= cho phép tới 512 ký tự theo tài liệu hệ sinh thái. Để tương thích an toàn trên cả hai, InstallPeak sinh CID gọn (<=36 ký tự) và khuyến nghị kiểm tra toàn bộ payload bằng regex /^(?:.+__)?cid_([A-Za-z0-9_-]{6,48})$/.

2a. Lược Đồ SQL Chạy Ngay (Tách Biệt User Mới Toàn Hệ Thống & Chống Trùng Theo Đơn)

Bảng bot_users xác định người dùng lần đầu mở bot (isNewUser), còn tg_attributed_users chống trùng theo từng đơn hàng kèm trạng thái postback rõ ràng (pending / confirmed / failed_permanent). TUYỆT ĐỐI KHÔNG xóa dòng dedup khi nhận HTTP 409!

-- Standard SQL schema (PostgreSQL / relational DB compatible)
CREATE TABLE IF NOT EXISTS bot_users (
  tg_user_id TEXT PRIMARY KEY,
  first_seen_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS tg_attributed_users (
  tg_user_id TEXT NOT NULL,
  order_code TEXT NOT NULL,
  click_id   TEXT NOT NULL,
  pb_status  TEXT NOT NULL DEFAULT 'pending', -- pending | confirmed | failed_permanent
  attempts   INTEGER NOT NULL DEFAULT 0,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (tg_user_id, order_code)
);
2b. Node.js Bot & Mini App — Xác Thực HMAC-SHA256 initData (auth_date <= 300s) & Xử Lý Đúng HTTP 409/5xx
import crypto from "node:crypto";

const CID_PAYLOAD_RE = /^(?:.+__)?cid_([A-Za-z0-9_-]{6,48})$/;

function verifyTelegramInitData(rawInitData, botToken, maxAgeSec = 300) {
  const params = new URLSearchParams(rawInitData);
  const hash = params.get("hash") || "";
  params.delete("hash");
  const checkStr = [...params.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([k, v]) => k + "=" + v).join("\n");
  const secretKey = crypto.createHmac("sha256", "WebAppData").update(botToken).digest();
  const calc = crypto.createHmac("sha256", secretKey).update(checkStr).digest("hex");
  if (!hash || hash.length !== calc.length || !crypto.timingSafeEqual(Buffer.from(hash), Buffer.from(calc))) return null;
  const authDate = Number(params.get("auth_date") || 0);
  if (!authDate || Math.abs(Math.floor(Date.now() / 1000) - authDate) > maxAgeSec) return null;
  return Object.fromEntries(params.entries());
}

// Explicit isNewUser check (first-ever bot user) + per-order dedup + status-safe /pb/ev delivery
async function attributeTelegramStart(db, tgUserId, rawPayload, orderCode, orderTok) {
  const m = String(rawPayload || "").trim().match(CID_PAYLOAD_RE);
  if (!tgUserId || !m) return { attributed: false };
  const cid = m[1];

  // 1. Atomic transaction: check first-ever bot user & reserve per-order dedup row as 'pending'
  const reserved = await db.transaction(async (tx) => {
    const newUserRes = await tx.query(
      "INSERT INTO bot_users (tg_user_id) VALUES ($1) ON CONFLICT (tg_user_id) DO NOTHING",
      [tgUserId]
    );
    const isNewUser = newUserRes.rowCount === 1;
    if (!isNewUser) return false; // Existing bot user — skip acquisition credit
    const ins = await tx.query(
      "INSERT INTO tg_attributed_users (tg_user_id, order_code, click_id, pb_status) VALUES ($1, $2, $3, 'pending') ON CONFLICT (tg_user_id, order_code) DO NOTHING",
      [tgUserId, orderCode, cid]
    );
    return ins.rowCount === 1;
  });
  if (!reserved) return { attributed: false };

  // 2. Deliver S2S postback and transition pb_status by HTTP code (NEVER delete on 409!)
  try {
    const qs = new URLSearchParams({ o: orderCode, cid, e: "install", tok: orderTok });
    const resp = await fetch("https://installpeak.com/pb/ev?" + qs.toString(), { signal: AbortSignal.timeout(5000) });
    if (resp.ok || resp.status === 409) {
      await db.query(
        "UPDATE tg_attributed_users SET pb_status = 'confirmed', attempts = attempts + 1, updated_at = CURRENT_TIMESTAMP WHERE tg_user_id = $1 AND order_code = $2",
        [tgUserId, orderCode]
      );
      return { attributed: true, duplicate: resp.status === 409 };
    }
    if (resp.status === 403 || resp.status === 404 || resp.status === 410) {
      await db.query(
        "UPDATE tg_attributed_users SET pb_status = 'failed_permanent', attempts = attempts + 1, updated_at = CURRENT_TIMESTAMP WHERE tg_user_id = $1 AND order_code = $2",
        [tgUserId, orderCode]
      );
      console.error("[S2S] Permanent failure status=" + resp.status + " order=" + orderCode); // NEVER log orderTok!
      return { attributed: false, permanent: true };
    }
    // 429 or 5xx -> keep pb_status = 'pending' for bounded background worker retry
    await db.query(
      "UPDATE tg_attributed_users SET attempts = attempts + 1, updated_at = CURRENT_TIMESTAMP WHERE tg_user_id = $1 AND order_code = $2",
      [tgUserId, orderCode]
    );
  } catch (err) {
    // Network timeout -> keep pb_status = 'pending' for bounded retry
    await db.query(
      "UPDATE tg_attributed_users SET attempts = attempts + 1, updated_at = CURRENT_TIMESTAMP WHERE tg_user_id = $1 AND order_code = $2",
      [tgUserId, orderCode]
    );
  }
  return { attributed: false, retryPending: true };
}
2c. Python Mini App & Bot — HMAC-SHA256 initData + DB Commit & Xử Lý Chuẩn 409/5xx
import hashlib, hmac, json, re, time, requests
from urllib.parse import parse_qsl

CID_PAYLOAD_RE = re.compile(r"^(?:.+__)?cid_([A-Za-z0-9_-]{6,48})$")

def verify_tg_init_data(raw_init_data: str, bot_token: str, max_age_sec: int = 300) -> dict | None:
    pairs = dict(parse_qsl(raw_init_data, keep_blank_values=True))
    got_hash = pairs.pop("hash", "")
    check_str = "\n".join(f"{k}={v}" for k, v in sorted(pairs.items()))
    secret_key = hmac.new(b"WebAppData", bot_token.encode(), hashlib.sha256).digest()
    calc = hmac.new(secret_key, check_str.encode(), hashlib.sha256).hexdigest()
    if not got_hash or not hmac.compare_digest(got_hash, calc):
        return None
    auth_date = int(pairs.get("auth_date") or 0)
    if auth_date <= 0 or abs(int(time.time()) - auth_date) > max_age_sec:
        return None
    return pairs

def fire_verified_start(conn, data: dict, order_code: str, order_tok: str):
    tg_user = json.loads(data.get("user") or "{}")
    tg_user_id = str(tg_user.get("id") or "")
    m = CID_PAYLOAD_RE.match((data.get("start_param") or "").strip())
    if not (tg_user_id and m):
        return
    cid = m.group(1)

    with conn:  # Explicit DB transaction & commit
        cur = conn.cursor()
        cur.execute("INSERT INTO bot_users (tg_user_id) VALUES (%s) ON CONFLICT (tg_user_id) DO NOTHING", (tg_user_id,))
        if cur.rowcount != 1:
            return  # Returning user — not a first-ever bot start
        cur.execute(
            "INSERT INTO tg_attributed_users (tg_user_id, order_code, click_id, pb_status) VALUES (%s, %s, %s, 'pending') ON CONFLICT (tg_user_id, order_code) DO NOTHING",
            (tg_user_id, order_code, cid),
        )
        if cur.rowcount != 1:
            return

    try:
        resp = requests.get("https://installpeak.com/pb/ev", params={"o": order_code, "cid": cid, "e": "install", "tok": order_tok}, timeout=5)
        if resp.status_code < 300 or resp.status_code == 409:
            new_status = "confirmed"  # NEVER delete dedup row on 409 duplicate!
        elif resp.status_code in (403, 404, 410):
            new_status = "failed_permanent"  # Alert ops; never log order_tok!
        else:
            new_status = "pending"  # 429 / 5xx -> retry via bounded worker queue
    except requests.RequestException:
        new_status = "pending"  # Network failure -> keep pending for bounded retry

    with conn:
        conn.execute(
            "UPDATE tg_attributed_users SET pb_status = %s, attempts = attempts + 1, updated_at = CURRENT_TIMESTAMP WHERE tg_user_id = %s AND order_code = %s",
            (new_status, tg_user_id, order_code),
        )
PHẦN 03

Android Play Install Referrer & Mobile MMP (Adjust, AppsFlyer, AppMetrica)

Router tự động thay thế macro {cid} / {click_id} trên MỌI link đích (không gắn thêm dr_cid dư thừa). Với link sạch play.google.com/store/apps/details?id=... không chứa macro, router tự động gắn referrer=utm_source%3Dinstallpeak%26cid%3D<cid> cho Google Play Install Referrer.

3a. Android Kotlin — Đọc Google Play InstallReferrerClient (first_open -> Backend -> /pb/ev)

Đọc Play Install Referrer một lần ở sự kiện first_open, bỏ qua tự nhiên nếu lượt cài organic (không có cid), và chống trùng lượt cài lại (reinstall) trên backend trước khi gọi /pb/ev:

// build.gradle: implementation("com.android.installreferrer:installreferrer:2.2")
import android.content.Context
import android.net.Uri
import com.android.installreferrer.api.InstallReferrerClient
import com.android.installreferrer.api.InstallReferrerStateListener

fun reportPlayReferrerOnce(context: Context, onSendToBackend: (cid: String) -> Unit) {
    val prefs = context.getSharedPreferences("ip_attr", Context.MODE_PRIVATE)
    if (prefs.getBoolean("first_open_sent", false)) return // Guard against repeat launches

    val client = InstallReferrerClient.newBuilder(context).build()
    client.startConnection(object : InstallReferrerStateListener {
        override fun onInstallReferrerSetupFinished(code: Int) {
            try {
                if (code == InstallReferrerClient.InstallReferrerResponse.OK) {
                    val rawRef = client.installReferrer.installReferrer ?: ""
                    val cid = Uri.parse("https://dummy.local/?" + rawRef).getQueryParameter("cid")?.trim()
                    if (!cid.isNullOrEmpty() && Regex("^[A-Za-z0-9_-]{6,48}$").matches(cid)) {
                        // Send cid to YOUR backend (never embed &tok= inside the APK!);
                        // Backend deduplicates reinstalls, fires /pb/ev?...&tok=, then returns 200/409
                        onSendToBackend(cid)
                    }
                    // Mark checked even on organic null-CID installs so Play Referrer isn't re-queried
                    prefs.edit().putBoolean("first_open_sent", true).apply()
                }
            } finally {
                client.endConnection()
            }
        }
        override fun onInstallReferrerServiceDisconnected() { /* Retry on next app launch */ }
    })
}
3b. Cấu Hình 2 Chiều Cho MMP — Adjust, AppsFlyer & AppMetrica (Chiều Đi & Chiều Về)
# 1. Adjust (pass click ID in ?label={cid}; configure server callback with cid={label})
Outbound: https://app.adjust.com/YOUR_TRACKER?label={cid}
Callback: https://installpeak.com/pb/ev?o=YOUR_ORDER_CODE&cid={label}&e=install&tok=YOUR_ORDER_TOK

# 2. AppsFlyer (replace <your_media_source> with your own partner/custom pid configured in AppsFlyer)
Outbound: https://app.appsflyer.com/com.example.app?pid=<your_media_source>&af_sub1={cid}
Callback: https://installpeak.com/pb/ev?o=YOUR_ORDER_CODE&cid={af_sub1}&e=install&tok=YOUR_ORDER_TOK

# 3. AppMetrica (2-way: outbound ?click_id={cid} + postback macro {click_id})
# Note: Yandex AppMetrica distinguishes {click_id} (from tracker URL) vs {external_click_id};
# verify which macro your tracker template forwards and note user consent / restricted callbacks.
Outbound: https://redirect.appmetrica.yandex.com/serve/YOUR_TRACKER_ID?click_id={cid}
Callback: https://installpeak.com/pb/ev?o=YOUR_ORDER_CODE&cid={click_id}&e=install&tok=YOUR_ORDER_TOK

# 4. Direct Google Play Store URL (clean URL auto-receives referrer=utm_source%3Dinstallpeak%26cid%3D<cid>,
#    or pass explicit macro below — never appends bogus &dr_cid=)
Outbound: https://play.google.com/store/apps/details?id=com.example.app&referrer=cid%3D{cid}
Lưu ý AppsFlyer & AppMetrica: Trên AppsFlyer, pid=<your_media_source> phụ thuộc vào tên nguồn tùy chỉnh/đối tác mà bạn tự cấu hình trong tài khoản AppsFlyer (không mặc định dùng một mã pid chung). Trên AppMetrica, hãy đối chiếu rõ click_id và external_click_id trong template tracker cũng như thiết lập consent/hạn chế callback theo khu vực.
PHẦN 04

Phân Biệt iOS ATT / IDFA với AdAttributionKit & Cửa Sổ Đối Soát

iOS 14.5+ ATT / IDFA (Chỉ Đo Click-ID Khi Có Đồng Ý ATT)

Đo lường 1:1 theo từng click trên iOS chỉ hoạt động khi người dùng đồng ý qua hộp thoại App Tracking Transparency (ATT) để MMP đối chiếu IDFA. Với người dùng từ chối ATT, không có định danh click cá nhân.

iOS / iPadOS 17.4+ AdAttributionKit (Chỉ Đo Cohort Tổng Hợp)

AdAttributionKit / SKAdNetwork chỉ gửi postback tổng hợp theo nhóm (cohort) tuân thủ ngưỡng ẩn danh đám đông (crowd anonymity) và bộ đếm trễ ngẫu nhiên của Apple. TUYỆT ĐỐI KHÔNG suy diễn click_id cá nhân từ postback cohort.

Tách biệt rõ cửa sổ đối soát (24h so với 24–48h của Apple): Cửa sổ attribution_review 24 giờ trên cổng /pb/ev chỉ áp dụng riêng cho đơn S2S theo click_id (Extension, Telegram, Android). Đơn Managed iOS S2S CPA ($500+) dùng cohort postback KHÔNG BAO GIỜ bị cắt ở mốc 24h — thời gian chốt số liệu tuân theo quy tắc giao nhận 24–48 giờ sau cửa sổ chuyển đổi của Apple ghi rõ trong SOW Managed CPA.
PHẦN 05 · HỢP ĐỒNG API & B2B

Bảng Mã /pb/ev Postback &amp; Tài Liệu Đầy Đủ Wholesale Panel API v2

Cảnh báo bảo mật — Che giấu &tok= ở mọi nơi: Mỗi đơn có khóa hex 24 ký tự riêng. Giữ &tok= hoàn toàn phía server và LUÔN che &tok=*** trong log máy chủ, hệ thống APM, log proxy và khi gửi ticket hỗ trợ.
5a. Bảng Mã Trạng Thái HTTP /pb/ev, Sự Kiện Hợp Lệ & Vòng Đời Click

Endpoint: GET|POST ${esc(origin)}/pb/ev?o=<ORDER_CODE>&cid=<CLICK_ID>&e=<EVENT>&tok=<SECRET>. Sự kiện hợp lệ: install (tối đa 1 lần/CID, bắt buộc &tok=), uninstall (bắt buộc &tok=), engaged, redirect. Bản ghi click phía server được lưu xuyên suốt vòng đời chiến dịch đang mở (cộng thêm 24h cho đơn click-level attribution_review; TTL phía trình duyệt của /sdk/v1.js là 7 ngày).

HTTP Ý Nghĩa Hành Động Khuyến Nghị
200Ghi nhận thành công (hoặc TEST_ S2S đạt)Đánh dấu confirmed; không gửi lại.
400Thiếu/sai cid hoặc tên sự kiện không hợp lệLỗi cố định — kiểm tra lại tham số.
403Thiếu/sai khóa &tok= hoặc lệch click/orderLỗi cố định — kiểm tra biến môi trường &tok=; cảnh báo vận hành.
404Không tìm thấy click_id, mã TEST_ hoặc đơn hàngLỗi cố định — không retry lặp vô hạn.
409Click đã ghi nhận install trước đó (duplicate: true)Coi như đã xác nhận! TUYỆT ĐỐI KHÔNG xóa dòng dedup.
410Đơn đã đóng hoặc hết cửa sổ trễ 24h attribution_reviewLỗi cố định — đánh dấu failed_permanent.
429Vượt giới hạn tốc độ theo IPLỗi tạm thời — giữ pending & thử lại có giãn cách.
5b. Wholesale Panel API v2 (POST /api/v2) — Idempotency client_ref & Tra Cứu Hàng Loạt

Dành cho Agency & Reseller Panel đã duyệt (hỗ trợ JSON và application/x-www-form-urlencoded). Truyền thêm client_ref (hoặc idempotency_key, 4–64 ký tự [A-Za-z0-9_.-]) ở lệnh action=add để khi retry do timeout mạng KHÔNG BAO GIỜ bị trừ tiền 2 lần — lần gọi trùng trả HTTP 200 kèm "idempotent": true. Đơn giá tính theo 1.000 lượt USD (currency: "USD").

# 1. List calibrated services (rate = USD per 1,000 Qualified Redirects)
curl -X POST https://installpeak.com/api/v2 -H "Content-Type: application/json" \
  -d '{"key":"YOUR_API_KEY","action":"services"}'
# Response 200:
# [{"service":211,"name":"Browser Extension Qualified Redirects (Chrome/Firefox/Edge · Global 110+ Countries — Per 1k Redirects)","type":"Default",
#   "category":"Browser Extensions","rate":"1.60","min":"1000","max":"250000","refill":false,"cancel":false}, ...]

# 2. Check Prepaid USD wallet balance
curl -X POST https://installpeak.com/api/v2 -d "key=YOUR_API_KEY&action=balance"
# Response 200: {"balance":"142.5000","currency":"USD"}

# 3. Create order with client_ref idempotency (safe to retry on timeout!)
curl -X POST https://installpeak.com/api/v2 -H "Content-Type: application/json" \
  -d '{"key":"YOUR_API_KEY","action":"add","service":211,"link":"https://chromewebstore.google.com/detail/...","quantity":5000,"client_ref":"panel-ord-90142"}'
# First call 200:  {"order":42,"order_code":"DR8A92F1","charge":"8.0000","currency":"USD"}
# Retry call 200:  {"order":42,"order_code":"DR8A92F1","charge":"8.0000","currency":"USD","idempotent":true}

# 4. Single order status (numeric id or order_code)
curl -X POST https://installpeak.com/api/v2 -H "Content-Type: application/json" \
  -d '{"key":"YOUR_API_KEY","action":"status","order":"DR8A92F1"}'
# Response 200: {"charge":"8.0000","start_count":"0","status":"In progress","remains":"1840","delivered":"3160","currency":"USD","order_code":"DR8A92F1"}

# 5. Bulk order status (comma-separated, up to 50 IDs per request)
curl -X POST https://installpeak.com/api/v2 -H "Content-Type: application/json" \
  -d '{"key":"YOUR_API_KEY","action":"status","orders":"42,DR8A92F1,999999"}'
# Response 200:
# {"42":{"charge":"8.0000","start_count":"0","status":"In progress","remains":"1840","delivered":"3160","currency":"USD","order_code":"DR8A92F1"},
#  "DR8A92F1":{"charge":"8.0000","start_count":"0","status":"In progress","remains":"1840","delivered":"3160","currency":"USD","order_code":"DR8A92F1"},
#  "999999":{"error":"Incorrect order ID"}}

# Error format (400 / 401 / 404 / 429): {"error":"Insufficient balance"}
Trạng Thái API v2 Trạng Thái Nội Bộ Tương Ứng
Pendingpending_payment, paid, provisioning
In progressrunning, active, delivering, trial_active
Completedcompleted
Partialpaused, client_paused, cost_capped, attribution_review, s2s_stalled, compliance_paused
Canceledexpired, cancelled, refunded