GC MMO DEVELOPER PORTAL
Tài liệu Tích hợp API Hệ thống
Kết nối tự động hóa 100% cho Gian hàng (Seller API) và Khách mua sỉ (Buyer API).
1. Đồng bộ Tồn kho & Đẩy Key tự động (Seller Inventory API)
Dùng để đẩy danh sách tài khoản/key từ máy chủ riêng của bạn lên gian hàng GC MMO, hệ thống tự động lọc trùng lặp.
POST https://cnstest.store/api/v1/seller/inventory/push
Headers:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Body:
{
"product_id": 1001,
"deduplicate": true,
"keys": [
"account1@gmail.com|Pass123|2FA_KEY_1",
"account2@gmail.com|Pass456|2FA_KEY_2"
]
}
2. API Hoàn tiền theo ngày chưa sử dụng (Seller Refund API)
Hoàn tiền tự động cho khách theo số ngày chưa dùng hoặc hoàn 100% nếu hết hàng bảo hành.
POST https://cnstest.store/api/v1/seller/orders/refund
Headers:
Authorization: Bearer YOUR_API_KEY
Body:
{
"order_id": "ORD-88219A",
"refund_type": "days",
"unused_days": 20,
"total_days": 30,
"reason": "Hoàn tiền 20 ngày còn lại tự động"
}
1. Mua sản phẩm & Nhận Key tức thì (Buyer Purchase API)
Dành cho đại lý, website con hoặc tool tự động kết nối mua tài khoản/key trực tiếp bằng số dư ví.
POST https://cnstest.store/api/v1/buyer/orders/create
Headers:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Body:
{
"product_id": 1001,
"quantity": 5
}
Response (200 OK):
{
"ok": true,
"order_id": "ORD-99201B",
"escrow_protection": "72h",
"keys": [
"user1@gmail.com|pass1",
"user2@gmail.com|pass2"
]
}
2. Kiểm tra Số dư Ví & Trạng thái Đơn hàng (Buyer Balance API)
GET https://cnstest.store/api/v1/buyer/balance Headers: Authorization: Bearer YOUR_API_KEY