Tài liệu API V2
REST API cho reseller / bot. Trừ tiền ví, xác thực bằng X-API-Key.
Đấu nối trong 5 bước
- Nạp tiền vào ví (API trừ tiền ví, không có cổng thanh toán riêng).
- Tạo API key tại Thông tin cá nhân, gửi mọi request với header
X-API-Key. GET /v1/services— lấy fieldid, dùng làmserviceIdkhi tạo đơn.POST /v1/orders— gửiserviceId+ field phụ của đúng loại dịch vụ.- Lưu
orderCodetrong response, dùngGET /v1/orders/:orderCodeđể theo dõi.
Thông tin chung
- Base URL:
https://api.sub247.net/v1 - Xác thực: header
X-API-Key: YOUR_KEY - Thành công:
{ "data": ..., "message": "" }— payload nằm trongdata - Lỗi:
{ "statusCode": 400, "message": "..." }—messagelà string hoặc mảng - Rate limit: 100 request / phút / API key
- Không gửi field lạ (kể cả
serviceTypekhi tạo đơn).
Danh sách endpoint
GET
/v1/balanceSố dư ví hiện tạiGET
/v1/servicesDanh sách dịch vụ (?serviceType=)POST
/v1/ordersTạo đơnGET
/v1/ordersDanh sách đơn (page, pageSize, status, serviceType)GET
/v1/orders/:orderCodeChi tiết / trạng thái đơnPOST
/v1/orders/:orderCode/buff-cancelYêu cầu hủy đơn buffPOST
/v1/orders/:orderCode/buff-refillYêu cầu bảo hành đơn buffVí dụ nhanh (curl)
curl -H "X-API-Key: YOUR_KEY" https://api.sub247.net/v1/balance