Loading…
API dùng để bán lại hàng của shop trên hệ thống của bạn: lấy danh sách hàng, đặt đơn, rồi nhận nội dung tài khoản. Tiền trừ thẳng từ ví, đúng như khi bấm mua trên trang — nạp ví trước rồi mới gọi được.
https://clone81.com/api/v1Gửi key ở header X-API-Key, hoặc Authorization: Bearer. Lấy key ở trang Cài đặt tài khoản. Mọi tài khoản đều có sẵn một key; bấm con mắt để xem, bấm Đổi key mới khi cần thay.
X-API-Key: sk_xxxxxxxxxxxxxxxxxxxxMọi phản hồi đều bọc chung một lớp vỏ. Thành công thì có data, hỏng thì có error — kiểm success trước khi đọc.
{ "success": true, "data": { ... } }
{ "success": false, "error": { "code": "OUT_OF_STOCK", "message": "..." } }Whether your site runs CMSNT software (SHOPCLONE 5/6, SHOPPREMIUM…) or anything else, it can connect to this shop and resell its products: the shop speaks three API formats — pick the one your software supports.
/api/v1/products · /api/v1/orders/api/v1/products/list · /api/v1/orders/create/api/ListResource.php · /api/BResource.phpEvery account already has an API key on the Account settings page: click the eye icon to reveal it and the copy button to copy it. All three formats use the same key, and payments come straight from your wallet.
Clicking “Change key” disables the old key IMMEDIATELY on every connected site — remember to paste the new key into each one.
/api/v1/balanceSố dư ví của bạn
curl -H "X-API-Key: $KEY" https://clone81.com/api/v1/balance{ "success": true, "data": { "balance": "1250000", "currency": "VND",
"tier": { "name": "Bạc", "discountPercent": 3 } } }tier.name là tên hạng do shop đặt, trả nguyên văn — không đổi theo ngôn ngữ.
/api/v1/productsDanh sách hàng đang bán, kèm giá của chính bạn
curl -H "X-API-Key: $KEY" \
"https://clone81.com/api/v1/products?q=gmail&con_hang=1"{ "success": true, "data": { "page": 1, "pageSize": 50, "total": 2, "items": [
{ "slug": "gmail-da-xac-minh", "name": "Gmail đã xác minh",
"price": "24000", "listPrice": "24000", "stock": 1240,
"type": "STOCK", "minQuantity": 1, "maxQuantity": 50,
"country": null, "twoFactor": false,
"friendCount": null, "createdYear": null }
] } }price đã áp cấp bậc của bạn — đó chính là số tiền sẽ bị trừ. Hàng type: "STOCK" và "PROVIDER" đều đặt được qua API; đơn hàng PROVIDER (lấy từ nhà cung cấp) có thể về PROCESSING — hỏi lại GET /api/v1/orders/{code} sau vài giây để lấy hàng. Hàng MANUAL phải liên hệ.
/api/v1/ordersĐặt hàng, trừ tiền ví ngay
curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"slug":"gmail-da-xac-minh","quantity":2,"idempotencyKey":"don-00001"}' \
https://clone81.com/api/v1/orders{ "success": true, "data": { "order": {
"code": "DH8K2M4QX1", "status": "COMPLETED",
"product": "gmail-da-xac-minh", "quantity": 2, "delivered": 2,
"unitPrice": "24000", "total": "48000", "balance": "1202000",
"items": ["[email protected]|MatKhau1", "[email protected]|MatKhau2"]
} } }Gửi lại cùng một khoá sẽ trả về đúng đơn cũ kèm duplicate: true, KHÔNG tạo đơn thứ hai và không trừ tiền lần nữa. Mạng chập chờn mà thiếu khoá này là bạn mua hai lần cho một đơn.
Kho thiếu giữa chừng thì đơn về PARTIAL và chỉ thu tiền phần giao được — đọc delivered chứ đừng giả định bằng quantity.
/api/v1/orders/{code}Tra đơn và lấy lại hàng đã giao
curl -H "X-API-Key: $KEY" https://clone81.com/api/v1/orders/DH8K2M4QX1{ "success": true, "data": { "order": {
"code": "DH8K2M4QX1", "status": "COMPLETED", "total": "48000",
"expiresAt": "2026-10-02T...",
"items": [ { "product": "gmail-da-xac-minh", "quantity": 2,
"delivered": 2, "data": ["...", "..."] } ]
} } }Lịch sử đơn chỉ giữ 30 ngày. Lưu hàng về hệ thống của bạn ngay sau khi đặt, đừng coi API này là nơi lưu trữ.
INVALID_API_KEYKey sai, đã thu hồi hoặc hết hạnACCOUNT_SUSPENDEDTài khoản đang bị khoáIP_NOT_ALLOWEDIP gọi không nằm trong danh sách cho phépNOT_FOUNDKhông có sản phẩm hoặc đơn với mã đóCONFLICTHàng này không đặt tự động được (phải liên hệ), hoặc hàng nhà cung cấp đang tạm ngừng bán / đang cập nhật giá — thử lại sauPAYLOAD_TOO_LARGEThân request quá lớn (mặc định 1 MB; nhập kho và tạo sản phẩm 2 MB; úp hàng loạt 8 MB). Riêng nội dung kho còn trần 600.000 ký tự và 20.000 dòng mỗi lượt — vượt thì trả 400 VALIDATION_ERROR, không phải 413INSUFFICIENT_BALANCEVí không đủ tiềnOUT_OF_STOCKKho hết hàng. Hàng nhà cung cấp: có details.refunded = true nghĩa là đơn details.orderCode đã tạo rồi được hoàn đủ về víRATE_LIMITEDGọi quá nhanh, chờ rồi thử lạiPROVIDER_ERRORNhà cung cấp không nhận đơn — tiền đã hoàn về ví (details.refunded = true, mã đơn ở details.orderCode). Không cần hoàn tayMAINTENANCEHệ thống đang bảo trìSERVICE_UNAVAILABLEQuá tải tạm thời — chờ vài giây rồi gửi lại với CÙNG idempotencyKeyMặc định 60 lượt/phút cho mỗi key. Vượt thì nhận 429 RATE_LIMITED kèm retryAfter (giây) trong body và header chuẩn Retry-After — chờ đúng ngần đó rồi gọi lại, đừng thử lại ngay.
Mọi request có body phải gửi Content-Type: application/json; thiếu header này là 400 VALIDATION_ERROR.
Cần hạn mức cao hơn, hoặc muốn khoá key theo IP, thì nhắn Hỗ trợ.
Call with GET (or a form POST). Always returns HTTP 200 — read the status field: “success”, or “error” with an explanatory msg.
Products that need a live check before delivery, and supplier products that are not delivered instantly, are not listed in this format because it has no way to fetch goods later — buy those through API v1 or the shop's own API.
/api/ListResource.phpThe whole catalog grouped by category, priced at your tier
curl "https://clone81.com/api/ListResource.php?username=ten_cua_ban&password=$KEY"{ "status": "success", "categories": [
{ "id": "7", "name": "Gmail", "image": "https://clone81.com/uploads/gmail.png",
"accounts": [
{ "id": "19", "name": "Gmail đã xác minh", "price": "24000",
"amount": 1240, "country": "vn", "description": "..." }
] }
] }id and price are STRINGS, amount is a NUMBER (stock). Sold-out products still appear with amount 0.
/api/InfoResource.phpOne product by id
curl "https://clone81.com/api/InfoResource.php?username=ten_cua_ban&password=$KEY&id=19"{ "status": "success", "msg": "Lấy thông tin thành công", "data": [
{ "id": "19", "name": "Gmail đã xác minh", "price": "24000",
"amount": 1240, "country": "vn", "description": "..." }
] }/api/BResource.phpBuy — charges your wallet immediately and returns the goods in lists
curl "https://clone81.com/api/BResource.php?username=ten_cua_ban&password=$KEY&id=19&amount=2"{ "status": "success", "msg": "Thanh toán đơn hàng thành công.", "data": {
"trans_id": "DH8K2M4QX1", "category": "Gmail", "name": "Gmail đã xác minh",
"amount": "2", "time": 1790000000,
"lists": [ { "account": "[email protected]|MatKhau1" },
{ "account": "[email protected]|MatKhau2" } ] } }
{ "status": "error", "msg": "Số dư không đủ" }amount in the result is the number DELIVERED; if stock runs short you are only charged for what was delivered. This format has no idempotency key: calling again buys again.
/api/GetBalance.phpWallet balance
curl "https://clone81.com/api/GetBalance.php?username=ten_cua_ban&password=$KEY"1.234.567đGetBalance returns a PLAIN STRING (e.g. 1.234.567đ), not JSON.
Send your key in the X-API-Key header. X-API-Secret is optional — if present, the shop ignores it. Every response has success, message, timestamp, request_id and data.
X-API-Key: sk_xxxxxxxxxxxxxxxxxxxx
X-API-Secret: sk_xxxxxxxxxxxxxxxxxxxx/api/v1/products/listProduct list — each product has exactly one plan, and plan.id is the product id
curl -H "X-API-Key: $KEY" "https://clone81.com/api/v1/products/list?search=gmail&limit=20"{ "success": true, "message": "OK", "timestamp": 1790000000,
"request_id": "9f2c41d07ab3e815", "data": {
"products": [ { "id": 19, "name": "Gmail đã xác minh", "slug": "gmail-da-xac-minh",
"category": { "id": 7, "name": "Gmail", "slug": "gmail", "image": "..." },
"min_price": 24000, "max_price": 24000, "sold": 530,
"plans": [ { "id": 19, "name": "Gmail đã xác minh",
"price": 25000, "sale_price": 24000, "final_price": 24000,
"is_instant": true, "stock_count": 1240, "in_stock": true,
"min_quantity": 1, "max_quantity": 50 } ] } ],
"pagination": { "current_page": 1, "per_page": 20, "total": 1,
"total_pages": 1, "has_more": false } } }/api/v1/categories/listCategory list
curl -H "X-API-Key: $KEY" https://clone81.com/api/v1/categories/list{ "success": true, ..., "data": { "categories": [
{ "id": 7, "name": "Gmail", "slug": "gmail", "image": "...",
"parent_id": null, "product_count": 4 }
] } }/api/v1/orders/createPlace an order (up to 10 items per call), charged to your wallet immediately
curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"items":[{"plan_id":19,"quantity":2}],"idempotency_key":"don-00001"}' \
https://clone81.com/api/v1/orders/create{ "success": true, "message": "Đặt hàng thành công", ..., "data": {
"orders": [ { "trans_id": "DH8K2M4QX1", "product_name": "Gmail đã xác minh",
"plan_name": "Gmail đã xác minh", "quantity": 2, "delivered": 2,
"status": "completed", "total": 48000 } ],
"summary": { "total_amount": 48000, "new_balance": 1202000 } } }
{ "success": false, "message": "Số dư không đủ, vui lòng nạp tiền", ...,
"data": { "error_code": "INSUFFICIENT_BALANCE" } }Re-sending the same idempotency_key returns the original order with duplicate: true and never charges again. A multi-item batch stops at the first failing item: items that succeeded are still returned, with failed[] for the failing one.
/api/v1/orders/statusLook up an order and fetch the delivered goods
curl -H "X-API-Key: $KEY" "https://clone81.com/api/v1/orders/status?trans_id=DH8K2M4QX1"{ "success": true, ..., "data": {
"order": { "trans_id": "DH8K2M4QX1", "product": { "id": 19, "name": "Gmail đã xác minh" },
"quantity": 2, "final_amount": 48000, "refunded_amount": 0,
"status": "completed", "payment_status": "paid" },
"delivery": { "items": ["[email protected]|MatKhau1", "[email protected]|MatKhau2"],
"delivered_count": 2, "expected_count": 2 } } }Partially delivered orders show completed with delivered_count lower than expected_count — you are only charged for what was delivered. For processing orders (being checked or fetched from a supplier), ask again in a few seconds.
Order history is kept for 30 days only — save the goods to your own system as soon as you receive them.
/api/v1/orders/listOrder history, without goods
curl -H "X-API-Key: $KEY" "https://clone81.com/api/v1/orders/list?status=completed"/api/v1/account/balanceWallet balance
curl -H "X-API-Key: $KEY" https://clone81.com/api/v1/account/balance{ "success": true, ..., "data": {
"user": { "id": "clx...", "username": "daily01", "email": null },
"balance": { "current": 1202000, "total_deposited": 5000000,
"currency": "VND", "formatted": "1.202.000đ" } } }/api/v1/account/infoAccount and tier information
curl -H "X-API-Key: $KEY" https://clone81.com/api/v1/account/infoOn error, success is false and data.error_code tells you why.
INVALID_API_KEYWrong, revoked or expired keyPERMISSION_DENIEDAccount is suspendedIP_NOT_ALLOWEDCalling IP is not on the allow listRATE_LIMIT_EXCEEDEDToo many calls — wait the number of seconds in the Retry-After headerINSUFFICIENT_BALANCEInsufficient wallet balanceOUT_OF_STOCKOut of stockPRODUCT_NOT_FOUNDNo product with that idORDER_NOT_FOUNDNo order with that code (orders/status)INVALID_PARAMSMissing or invalid parametersPRODUCT_UNAVAILABLEProduct temporarily unavailable, or the supplier refused the orderMAINTENANCESystem under maintenanceINTERNAL_ERRORSystem error — send the error code shown in message to Support