Tài liệu API

API URL
https://vip.likesubrevn.com/api/v2
API Key
e676a*********
Phương thức HTTP POST
Kiểu nội dung application/x-www-form-urlencoded
Định dạng phản hồi JSON
API Sandbox

Gửi request thật tới API URL và xem JSON phản hồi ngay tại đây.

Live
Chưa có API Key. Tạo key ở bảng phía trên rồi thử lại, hoặc dán key vào form.
Phản hồi
JSON
Chưa có phản hồi. Chọn action rồi gửi request.
Danh sách dịch vụ
Tham số Mô tả
key API Key
action "services"
currency Mã tiền tệ (tuỳ chọn): VND, USD...
Code mẫu Request:
cURL
curl -X POST "https://vip.likesubrevn.com/api/v2" \
  -d "key=YOUR_API_KEY" \
  -d "action=services"
PHP
<?php
$ch = curl_init("https://vip.likesubrevn.com/api/v2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    "key" => "YOUR_API_KEY",
    "action" => "services"
]);
$response = curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response, true));
Phản hồi mẫu:
JSON
[
    {
        "service": 1,
        "name": "Youtube views",
        "type": "Default",
        "category": "Youtube | Views",
        "platform": "Youtube",
        "rate": "2.5",
        "min": "200",
        "max": "10000",
        "refill": true
    },
    {
        "service": 2,
        "name": "Facebook comments",
        "type": "Custom Comments",
        "category": "Facebook | Comments",
        "platform": "Facebook",
        "rate": "4",
        "min": "10",
        "max": "1500",
        "refill": false
    }
]
Tạo đơn hàng
Tham số Mô tả
key API Key
action "add"
service ID dịch vụ
link Liên kết
quantity Số lượng cần
Code mẫu Request:
cURL
curl -X POST "https://vip.likesubrevn.com/api/v2" \
  -d "key=YOUR_API_KEY" \
  -d "action=add"
PHP
<?php
$ch = curl_init("https://vip.likesubrevn.com/api/v2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    "key" => "YOUR_API_KEY",
    "action" => "add"
]);
$response = curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response, true));
Phản hồi mẫu:
JSON
{
    "order": 123456
}
Trạng thái đơn hàng
Tham số Mô tả
key API Key
action "status"
order ID đơn hàng
Code mẫu Request:
cURL
curl -X POST "https://vip.likesubrevn.com/api/v2" \
  -d "key=YOUR_API_KEY" \
  -d "action=status"
PHP
<?php
$ch = curl_init("https://vip.likesubrevn.com/api/v2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    "key" => "YOUR_API_KEY",
    "action" => "status"
]);
$response = curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response, true));
Phản hồi mẫu:
JSON
{
    "charge": "2.50000",
    "start_count": "150",
    "status": "Completed",
    "remains": "0",
    "currency": "VND"
}
Trạng thái nhiều đơn hàng
Tham số Mô tả
key API Key
action "status"
orders Các ID đơn hàng, cách nhau bằng dấu phẩy (tối đa 100)
Code mẫu Request:
cURL
curl -X POST "https://vip.likesubrevn.com/api/v2" \
  -d "key=YOUR_API_KEY" \
  -d "action=multistatus"
PHP
<?php
$ch = curl_init("https://vip.likesubrevn.com/api/v2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    "key" => "YOUR_API_KEY",
    "action" => "multistatus"
]);
$response = curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response, true));
Phản hồi mẫu:
JSON
{
    "123456": {
        "charge": "2.5",
        "start_count": "150",
        "status": "Completed",
        "remains": "0"
    },
    "123457": {
        "charge": "5.0",
        "start_count": "0",
        "status": "In progress",
        "remains": "1000"
    }
}
Tạo hoàn đơn (refill)
Tham số Mô tả
key API Key
action "refill"
order ID đơn hàng
Code mẫu Request:
cURL
curl -X POST "https://vip.likesubrevn.com/api/v2" \
  -d "key=YOUR_API_KEY" \
  -d "action=refill"
PHP
<?php
$ch = curl_init("https://vip.likesubrevn.com/api/v2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    "key" => "YOUR_API_KEY",
    "action" => "refill"
]);
$response = curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response, true));
Phản hồi mẫu:
JSON
{
    "refill": "123456"
}
Tạo nhiều hoàn đơn
Tham số Mô tả
key API Key
action "refill"
orders Các ID đơn hàng, cách nhau bằng dấu phẩy (tối đa 100)
Code mẫu Request:
cURL
curl -X POST "https://vip.likesubrevn.com/api/v2" \
  -d "key=YOUR_API_KEY" \
  -d "action=refills"
PHP
<?php
$ch = curl_init("https://vip.likesubrevn.com/api/v2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    "key" => "YOUR_API_KEY",
    "action" => "refills"
]);
$response = curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response, true));
Phản hồi mẫu:
JSON
[
    { "order": 123456, "refill": 1 },
    { "order": 123457, "refill": 2 }
]
Trạng thái hoàn đơn
Tham số Mô tả
key API Key
action "refill_status"
refill ID hoàn đơn
Code mẫu Request:
cURL
curl -X POST "https://vip.likesubrevn.com/api/v2" \
  -d "key=YOUR_API_KEY" \
  -d "action=refill_status"
PHP
<?php
$ch = curl_init("https://vip.likesubrevn.com/api/v2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    "key" => "YOUR_API_KEY",
    "action" => "refill_status"
]);
$response = curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response, true));
Phản hồi mẫu:
JSON
{
    "status": "Completed"
}
Trạng thái nhiều hoàn đơn
Tham số Mô tả
key API Key
action "refill_status"
refills Các ID hoàn đơn, cách nhau bằng dấu phẩy
Code mẫu Request:
cURL
curl -X POST "https://vip.likesubrevn.com/api/v2" \
  -d "key=YOUR_API_KEY" \
  -d "action=refills_status"
PHP
<?php
$ch = curl_init("https://vip.likesubrevn.com/api/v2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    "key" => "YOUR_API_KEY",
    "action" => "refills_status"
]);
$response = curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response, true));
Phản hồi mẫu:
JSON
[
    { "refill": 1, "status": "Completed" },
    { "refill": 2, "status": "Rejected" }
]
Số dư tài khoản
Tham số Mô tả
key API Key
action "balance"
currency Mã tiền tệ (tuỳ chọn): VND, USD...
Code mẫu Request:
cURL
curl -X POST "https://vip.likesubrevn.com/api/v2" \
  -d "key=YOUR_API_KEY" \
  -d "action=balance"
PHP
<?php
$ch = curl_init("https://vip.likesubrevn.com/api/v2");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    "key" => "YOUR_API_KEY",
    "action" => "balance"
]);
$response = curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response, true));
Phản hồi mẫu:
JSON
{
    "balance": "111111.108",
    "currency": "VND"
}