Tích hợp API
Tích hợp toàn bộ danh mục dịch vụ SMM của BuffXịn vào hệ thống của bạn.
Một endpoint duy nhất, gọi bằng tham số action, trả về
JSON. Tương thích với hầu hết hệ thống có sẵn.
https://api.buffxin.com/api/v2 Xác thực
Mỗi yêu cầu cần một API key, gửi qua tham số
key. Tạo và quản lý key tại
Tích hợp API trong tài khoản.
Key chỉ hiển thị một lần khi tạo, nên lưu lại nơi an toàn.
Mỗi key gắn với tài khoản và số dư của bạn. Key bị thu hồi sẽ ngừng hoạt động ngay lập tức.
Quy ước chung
- Phương thức:
POST. - Định dạng: phản hồi luôn là JSON.
- Lỗi: trả về
{ "error": "..." }. Luôn kiểm tra trườngerrortrước khi xử lý. - Đơn giá (
rate): là giá cho một đơn vị (1 like, 1 follow), tính theo VND. - Tiền tệ: VND.
- Idempotency: thêm
idempotency_keykhiaddđể chống tạo trùng nếu phải gửi lại. - Giới hạn tần suất: gửi quá nhanh sẽ nhận lỗi giới hạn.
POST Danh sách dịch vụ services
Trả về tất cả dịch vụ đang bán, kèm đơn giá và giới hạn số lượng.
Tham số
| Tham số | Bắt buộc | Mô tả |
|---|---|---|
key | Có | API key của bạn |
action | Có | services |
Ví dụ
curl https://api.buffxin.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=services Phản hồi
[
{
"service": "a1b2c3d4-5e6f-7890-abcd-ef1234567890",
"name": "TikTok Followers",
"category": "Followers",
"rate": "30.0000000",
"min": 10,
"max": 100000,
"refill": true,
"cancel": false
}
] POST Số dư balance
Tham số
| Tham số | Bắt buộc | Mô tả |
|---|---|---|
key | Có | API key của bạn |
action | Có | balance |
Phản hồi
{ "balance": "1500000.0000", "currency": "VND" } POST Tạo đơn add
Tạo đơn và tự động xử lý, trừ vào số dư của bạn.
Tham số
| Tham số | Bắt buộc | Mô tả |
|---|---|---|
key | Có | API key của bạn |
action | Có | add |
service | Có | ID dịch vụ (từ services) |
link | Có | Link công khai cần tăng tương tác |
quantity | Có | Số lượng (trong khoảng min và max) |
idempotency_key | Không | Chuỗi tùy chọn chống tạo trùng khi gửi lại |
Ví dụ
curl https://api.buffxin.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=add \
-d service=a1b2c3d4-5e6f-7890-abcd-ef1234567890 \
-d link=https://www.tiktok.com/@user/video/123 \
-d quantity=1000 Phản hồi
{ "order": "LK-AB12CD" }
Gửi lại cùng một idempotency_key sẽ trả về đơn cũ thay
vì tạo đơn trùng.
POST Trạng thái đơn status
Tra cứu một đơn qua order, hoặc nhiều đơn cùng lúc bằng
orders (các ID cách nhau bằng dấu phẩy).
Tham số
| Tham số | Bắt buộc | Mô tả |
|---|---|---|
key | Có | API key của bạn |
action | Có | status |
order | Có* | Mã đơn (vd LK-AB12CD) |
orders | Có* | Nhiều mã đơn, cách nhau bằng dấu phẩy |
* Dùng order cho một đơn, hoặc orders cho nhiều đơn.
Phản hồi (một đơn)
{
"charge": "30000.0000",
"start_count": 1200,
"status": "In progress",
"remains": 400,
"currency": "VND"
} Giá trị trạng thái
| status | Ý nghĩa |
|---|---|
Pending | Đã nhận đơn, chưa bắt đầu |
In progress | Đang giao |
Processing | Đang xử lý |
Completed | Hoàn tất |
Partial | Giao một phần (phần còn lại được hoàn) |
Canceled | Đã hủy / hoàn tiền |
refill và cancel sẽ được bổ sung trong bản
cập nhật tới.
Mã lỗi thường gặp
| error | Nguyên nhân |
|---|---|
Incorrect API key | Key sai, bị thu hồi, hoặc không đúng thương hiệu |
Invalid action | action không hợp lệ |
Service not found | Không tìm thấy dịch vụ |
Service temporarily unavailable | Dịch vụ tạm hết nguồn cung |
Invalid quantity | quantity không phải số hợp lệ |
Quantity must be between … | Số lượng ngoài khoảng cho phép |
Link is required | Thiếu link |
Insufficient balance | Số dư không đủ để tạo đơn |
Incorrect order ID | Mã đơn không tồn tại hoặc không thuộc tài khoản |
Rate limit exceeded, slow down | Gửi quá nhanh |
Ví dụ theo ngôn ngữ
Cùng một luồng (danh sách dịch vụ → tạo đơn → trạng thái) trong các ngôn ngữ phổ biến. Sao chép và thay YOUR_API_KEY.
# Danh sách dịch vụ
curl https://api.buffxin.com/api/v2 -d key=YOUR_API_KEY -d action=services
# Tạo đơn
curl https://api.buffxin.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=add \
-d service=a1b2c3d4-5e6f-7890-abcd-ef1234567890 \
-d link=https://www.tiktok.com/@user/video/123 \
-d quantity=1000
# Trạng thái đơn
curl https://api.buffxin.com/api/v2 -d key=YOUR_API_KEY -d action=status -d order=LK-AB12CD <?php
$api = new BuffXịnApi('YOUR_API_KEY');
$services = $api->services();
$order = $api->add([
'service' => 'a1b2c3d4-5e6f-7890-abcd-ef1234567890',
'link' => 'https://www.tiktok.com/@user/video/123',
'quantity' => 1000,
]);
$status = $api->status($order->order);
class BuffXịnApi {
private $key;
private $url = 'https://api.buffxin.com/api/v2';
public function __construct($key) { $this->key = $key; }
public function services() { return $this->connect(['action' => 'services']); }
public function balance() { return $this->connect(['action' => 'balance']); }
public function add($params) { return $this->connect(['action' => 'add'] + $params); }
public function status($order) { return $this->connect(['action' => 'status', 'order' => $order]); }
private function connect($data) {
$data['key'] = $this->key;
$ch = curl_init($this->url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($data),
]);
$res = curl_exec($ch);
curl_close($ch);
return json_decode($res);
}
} import requests
ENDPOINT = "https://api.buffxin.com/api/v2"
KEY = "YOUR_API_KEY"
def call(params):
params["key"] = KEY
return requests.post(ENDPOINT, data=params).json()
services = call({"action": "services"})
order = call({
"action": "add",
"service": "a1b2c3d4-5e6f-7890-abcd-ef1234567890",
"link": "https://www.tiktok.com/@user/video/123",
"quantity": 1000,
})
status = call({"action": "status", "order": order["order"]}) const ENDPOINT = "https://api.buffxin.com/api/v2";
const KEY = "YOUR_API_KEY";
async function call(params) {
const body = new URLSearchParams({ ...params, key: KEY });
const res = await fetch(ENDPOINT, { method: "POST", body });
return res.json();
}
const services = await call({ action: "services" });
const order = await call({
action: "add",
service: "a1b2c3d4-5e6f-7890-abcd-ef1234567890",
link: "https://www.tiktok.com/@user/video/123",
quantity: 1000,
});
const status = await call({ action: "status", order: order.order }); package main
import (
"encoding/json"
"net/http"
"net/url"
)
const (
endpoint = "https://api.buffxin.com/api/v2"
apiKey = "YOUR_API_KEY"
)
func call(params url.Values) (any, error) {
params.Set("key", apiKey)
resp, err := http.PostForm(endpoint, params)
if err != nil {
return nil, err
}
defer resp.Body.Close()
var out any
err = json.NewDecoder(resp.Body).Decode(&out)
return out, err
}
func main() {
call(url.Values{
"action": {"add"},
"service": {"a1b2c3d4-5e6f-7890-abcd-ef1234567890"},
"link": {"https://www.tiktok.com/@user/video/123"},
"quantity": {"1000"},
})
}