API chuẩn cho reseller. Mọi giá trị tiền khách hàng trả về bằng USD.
POST https://subgiare.top/api/v2Gửi API key trong trường POST key. Bạn có thể tạo, sao chép hoặc thu hồi key tại trang Hồ sơ.
curl -X POST 'https://subgiare.top/api/v2' \
-d 'key=sg_example_key_not_real' \
-d 'action=balance'action=services — chỉ trả dịch vụ đang hoạt động và hiển thị cho khách hàng. Rate là USD trên 1.000.
[{"service":3574,"name":"Example service","type":"default","category":"X","rate":0.152761,"min":100,"max":10000,"refill":false,"cancel":false}]action=add&service=3574&link=https://example.com/post&quantity=100
Có thể gửi request_id (8–64 ký tự) để retry an toàn, không tạo trùng. Đơn đi qua kiểm tra số dư/dịch vụ và Worker bình thường.
{"order":12345,"replayed":false}action=status&order=12345
{"order":12345,"status":"Processing","charge":0.015276,"start_count":0,"remains":100,"currency":"USD"}action=balance
{"balance":12.5,"currency":"USD"}// PHP
$response = file_get_contents('https://subgiare.top/api/v2', false, stream_context_create([
'http' => ['method' => 'POST', 'header' => "Content-Type: application/x-www-form-urlencoded\r\n", 'content' => http_build_query(['key' => 'sg_example_key_not_real', 'action' => 'services'])]
]));
// JavaScript
fetch('https://subgiare.top/api/v2', {method:'POST', headers:{'Content-Type':'application/x-www-form-urlencoded'}, body:new URLSearchParams({key:'sg_example_key_not_real', action:'services'})});Lỗi có dạng {"error":"message"}. HTTP 400/401/402/404/409/422/429/500 được dùng phù hợp. Giới hạn ban đầu: 60 request/phút/API key.