Skip to content
On this page

Client API

1. Get Authrization Token

Method POST

Endpoint /api/client/token

Header xmplus-authorization md5(client api key)

  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "data": {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJodHRwczovL2RlbW8ueG1wbHVzLmRldiIsImF1ZCI6Imh0dHBzOi8vZGVtby54bXBsdXMuZGV2IiwiaWF0IjoxNjkxNjA0ODQ0LCJuYmYiOjE2OTE2MDQ4NDQsImV4cCI6MTY5MTY4OTQ0NH0.EcCnwVrAVgtuRCk5GwOrlRiNjy0DBotiVR0SXcx-DCUpW4FncblnYKuhoKG8LverzctrmOI8Gmc2hCpgY5mBkg#wF-lnG8Pe-sbJ4wAubIy0vHVJAYuooJbN25pqmWVhpE"
    }
}

2. Get Account Info

Method POST

Endpoint /api/client/account/info

Header Authorization: Bearer token_value

Body Parameters

json
{
    "email": "admin@xzy.com",
    "passwd" : "Qct8FMvn23",
	"serviceid": 4
}
Param NameTypeDescription
emailstringEmail
passwdstringPassword
serviceidintserviceid
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "data": {
        "uid": 1,
        "username": "Admin",
        "email": "admin@xyz.com",
        "money": "$ 49.00 ",
        "services": [{
            "sid": 4,
            "userid": 1,
            "email": "admin@xyz.com",
            "packageid": 1,
            "package": "StarterPack",
            "paid_date": "2023-08-03 00:47",
            "expire_date": "2023-11-01 00:47",
            "billing": "Quaterly",
            "amount": "$ 30.00 ",
            "iplimit": "0/2",
            "speedlimit": "100 Mb/s",
            "server_group": "VIP",
            "traffic": "150 GB",
            "used_traffic": "0 B",
            "today": "0 B",
            "recent_omline": null,
            "status": "Active",
            "reset_traffic": "Traffic will reset to 100 GB after 23 day(s)",
            "sublink": "https://xyz.com/link/LpYnkaUyEsshJTyYMaOA2b8ll5DYag1U"
        }]
    }
}

2. Account password reset

Method POST

Endpoint /api/client/account/password/reset

Header Authorization: Bearer token_value

Body Parameters

json
{
    "email": "admin@xzy.com",
}
Param NameTypeDescription
emailstringEmail
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "message": "A reset email has been sent to your email address. Check Spam folder if not found in Inbox."
}

3. Account registration

Method POST

Endpoint /api/client/register

Header Authorization: Bearer token_value

Body Parameters

json
{
    "name": "admin",
	"email": "admin@xzy.com",
	"passwd": "password",
	"aff": "Jk45ei",
	"code": "123456",
}
Param NameTypeDescription
namestringUsername
emailstringEmail
passwdstringPassword
affstringaffiliate code
codestringemail code
tokenstringBearer token
  • Successful Response
json
{
    "status": "sucess",
    "code": 100,
    "message": "Account successfully created."
}

4. Account registration email code

Method POST

Endpoint /api/client/register/sendcode

Header Authorization: Bearer token_value

Body Parameters

json
{
    "name": "admin",
	"email": "admin@xzy.com"
}
Param NameTypeDescription
namestringUsername
emailstringEmail
tokenstringBearer token
  • Successful Response
json
{
    "status": "sucess",
    "code": 100,
    "message": "Verfication code was sent to admin@xzy.com"
}

5 Packages (Full packages)

Method POST

Endpoint /api/client/packages

Header Authorization: Bearer token_value

Param NameTypeDescription
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "packages": [
        {
            "id": 1,
            "name": "StarterPack",
            "traffic": "100 GB",
            "desc": "",
            "iplimit": 2,
            "speedlimit": "100 Mb/s",
            "server_group": "VIP",
            "traffic_reset": true,
            "enable_stock": true,
            "stock_count": 79,
            "billing": {
                "month": "$ 10.00 ",
                "quater": "$ 30.00 ",
                "semiannual": "$ 6.00 ",
                "annual": "$ 120.00 "
            },
            "sort": 0
        },
        {
            "id": 3,
            "name": "100",
            "traffic": "200 GB",
            "desc": "",
            "iplimit": 2,
            "speedlimit": "100 Mb/s",
            "server_group": "VIP",
            "traffic_reset": false,
            "enable_stock": true,
            "stock_count": 100,
            "billing": {
                "month": "$ 10.00 ",
                "quater": "$ 15.00 ",
                "semiannual": "$ 6.00 ",
                "annual": "$ 120.00 "
            },
            "sort": 0
        }
    ]
}

6. Packages(Traffic packages)

Method POST

Endpoint /api/client/packages/traffic

Header Authorization: Bearer token_value

Param NameTypeDescription
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "packages": [
        {
            "id": 2,
            "name": "TOP50",
            "traffic": "50 GB",
            "desc": "",
            "enable_stock": true,
            "stock_count": 104,
            "billing": {
                "topup_traffic": "$ 5.00 "
            },
            "sort": 0
        }
    ]
}

7. Package Info

Method POST

Endpoint /api/client/package/info

Header Authorization: Bearer token_value

Body Parameters

json
{
 "pid" : "1"
}
Param NameTypeDescription
pidintPackage id
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "package": {
        "id": 1,
        "name": "StarterPack",
        "traffic": "100 GB",
        "desc": "",
        "type": "Full Package",
        "iplimit": 2,
        "speedlimit": 100,
        "server_group": 1,
        "traffic_reset": 1,
        "enable_stock": 1,
        "stock_count": 100,
        "billing": {
            "month": {
                "status": "on",
                "price": "10.00"
            },
            "quater": {
                "status": "on",
                "price": "30.00"
            },
            "semiannual": {
                "status": "on",
                "price": "6.00"
            },
            "annual": {
                "status": "on",
                "price": "120.00"
            }
        },
        "sort": 0
    }
}

8. Add New Service

Method POST

Endpoint /api/client/invoice/create

Header Authorization: Bearer token_value

Body Parameters

json
{
    "email": "admin@xzy.com",
    "passwd" : "Qct8FMvn23",
	"pid": 1,
	"billing":"month",
	"coupon":"",
	"qty": 1,
}
Param NameTypeDescription
emailstringEmail
passwdstringPassword
pidintPackage id
billingstringbilling cycle
couponstringcoupon code
qtyintservice quantity
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "invid": "5EGFZSVJA1JMA1S6NE0T",
    "message": "Invoice Created"
}

9. Service Info

Method POST

Endpoint /api/client/service/info

Header Authorization: Bearer token_value

Body Parameters

json
{
    "email": "admin@xzy.com",
    "passwd" : "Qct8FMvn23",
	"serviceid": 4
}
Param NameTypeDescription
emailstringEmail
passwdstringPassword
serviceidintservice id
tokenstringBearer token
  • Successful Response
json
{
    "code": 100,
    "status": "Active",
    "sid": 4,
    "userid": 1,
    "email": "admin@xzy.com",
    "packageid": 1,
    "package": "StarterPack",
    "paid_date": "2023-08-03 00:47",
    "expire_date": "2023-11-01 00:47",
    "billing": "quater",
    "amount": "$ 30.00 ",
    "iplimit": "0/2",
    "speedlimit": "100 Mb/s",
    "server_group": "VIP",
    "traffic": "150 GB",
    "used_traffic": "0 B",
    "today": "0 B",
    "recent_online": null,
    "reset_traffic": "Traffic will reset to 100 GB after 23 day(s)",
    "servers": [
        {
            "type": "vless",
            "remark": "🇺🇸 Test",
            "address": "google.com",
            "port": 443,
            "network": "tcp",
            "password": "4a6f9231-710e-5602-a410-c8a755cc3a2f",
            "encryption": "none",
            "sni": "www.lovelive-anime.jp",
            "security": "reality",
            "allowinsecure": false,
            "header": "none",
            "fingerprint": "chrome",
            "flow": "xtls-rprx-vision",
            "shortid": "6ba85179e30d4fc2",
            "spiderx": "",
            "publickey": "7xhH4b_VkliBxGulljcyPOH-bYUA2dl-XAdZAsfhk04",
            "uri": "vless://4a6f9231-710e-5602-a410-c8a755cc3a2f@google.com:443?encryption=none&headerType=none&type=tcp&security=reality&sni=www.lovelive-anime.jp&fp=chrome&pbk=7xhH4b_VkliBxGulljcyPOH-bYUA2dl-XAdZAsfhk04&sid=6ba85179e30d4fc2&flow=xtls-rprx-vision&xtls=2#%F0%9F%87%BA%F0%9F%87%B8%20Test"
        }
    ]
}

10. Service Renewal

Method POST

Endpoint /api/client/service/renew

Header Authorization: Bearer token_value

Body Parameters

json
{
    "email": "admin@xzy.com",
    "passwd" : "Qct8FMvn23",
	"sid": 4
}
Param NameTypeDescription
emailstringEmail
passwdstringPassword
sidintservice id
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "invid": "5EGFZSVJA1JMA1S6NE0T",
    "message": "Invoice Created"
}

11. Service Add traffic

Method POST

Endpoint /api/client/service/addtraffic

Header Authorization: Bearer token_value

Body Parameters

json
{
    "email": "admin@xzy.com",
    "passwd" : "Qct8FMvn23",
	"sid": 4,
	"pid": 1,
}
Param NameTypeDescription
emailstringEmail
passwdstringPassword
sidintservice id
pidintPackage id
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "invid": "5EGFZSVJA1JMA1S6NE0T",
    "message": "Invoice Created"
}

12. Gateway Lists

Method POST

Endpoint /api/client/gateways

Header Authorization: Bearer token_value

Param NameTypeDescription
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "gateways": {
        "id": 2,
        "gateway": "USDTTRC20",
        "name": "USDT TRC20",
        "currency": "USD",
        "uuid": "fc61c571-fd28-507e-b89d-2747ac198b10",
        "notify_url": "https://xzy.com",
        "fee_percent": "0",
        "fee_fixed": "0.00"
    }
}

12. Invoice Lists

Method POST

Endpoint /api/client/invoices

Header Authorization: Bearer token_value

Body Parameters

json
{
    "email": "admin@xzy.com",
    "passwd" : "Qct8FMvn23",
}
Param NameTypeDescription
emailstringEmail
passwdstringPassword
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "invoices": [
        {
            "id": 1,
            "invioce_id": "5EGFZSVJA1JMA1S6NE0T",
            "created_at": "2023-08-03 00:46",
            "currency": "USD",
            "amount": "30.00",
            "packageid": 1,
            "packagename": "StarterPack",
            "discount": 0,
            "status": "Paid",
            "userid": 1,
            "email": "admin@xzy.com",
            "quantity": 1,
            "billing": "quater",
            "serviceid": "",
            "paid_date": "2023-08-03 00:47"
        },
        {
            "id": 2,
            "invioce_id": "NMTSSHOPFYDBCJT37NM6",
            "created_at": "2023-08-03 00:54",
            "currency": "USD",
            "amount": "5.00",
            "packageid": 2,
            "packagename": "TOP50",
            "discount": 0,
            "status": "Paid",
            "userid": 1,
            "email": "admin@xzy.com",
            "quantity": 1,
            "billing": "topup_traffic",
            "serviceid": "4",
            "paid_date": "2023-08-03 00:55"
        }
    ]
}

13. Get Invoice

Method POST

Endpoint /api/client/invoice/view

Header Authorization: Bearer token_value

Body Parameters

json
{
    "email": "admin@xzy.com",
    "passwd" : "Qct8FMvn23",
	"invid": 5EGFZSVJA1JMA1S6NE0T,
}
Param NameTypeDescription
emailstringEmail
passwdstringPassword
invidstringinvoice id
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "invoice": {
        "id": 1,
        "invioce_id": "5EGFZSVJA1JMA1S6NE0T",
        "created_at": "2023-07-11 20:03",
        "currency": "USD",
        "amount": "15.00",
        "packageid": 3,
        "packagename": "100",
        "discount": "0.00",
        "status": "Pending",
        "userid": "1",
        "email": "admin@xzy.com",
        "quantity": 1,
        "billing": "month",
        "serviceid": "",
        "paid_date": ""
    }
}

14. Pay Invoice

Method POST

Endpoint /api/client/invoice/pay

Header Authorization: Bearer token_value

Body Parameters

json
{
    "email": "admin@xzy.com",
    "passwd" : "Qct8FMvn23",
	"invid": 5EGFZSVJA1JMA1S6NE0T,
	"gatewayid": 1
}
Param NameTypeDescription
emailstringEmail
passwdstringPassword
invidstringinvoice id
gatewayidintgateway id
tokenstringBearer token
  • Successful Response
json
{
    "status": "success",
    "code": 100,
    "id": 1,
    "orderid": "5EGFZSVJA1JMA1S6NE0T",
    "created": 1691865274,
    "amount": "¥ 509.07 ",
    "total": "509.07",
    "gateway": "VWechatPay",
    "data": "wxp://vvvvjj5u5iiieettyhhhghjjkkkkjkklklk",
    "qrcode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQMAAAEDCAIAAAC+s/acAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAE40lEQVR4nO3dQW7kOBAAwfRi///l2UNdddBCICmNI86eVo+NBIECSf38+fMn+PX+Of0F4BWUAKUEGEqAUgIMJUApAYYSoJQAQwlQSoChBCglwFAClBJgKAFKCTCUAKUEGEqAUgIMJUApAYYSoJQAQwlQSoDx74oP/fn5WfGxTzy8/vXyf3T/Mx/+Qi4fdP8rnf3yK6y4zNeaAKUEGEqAUgIMJUApAcaSKeqlba+xuj/1OzsfvD/xXPGgF37mpW1/I2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