Reseller API for the bot's public services, wallet and order history.
Base URL: /api/v1
Send X-API-Key on every request. API access must be enabled manually by the administrator before use. Use HTTPS only; never put the key in URLs, public frontend code or logs.
curl -H "X-API-Key: YOUR_BOT_API_KEY" https://YOUR_DOMAIN/api/v1/me
{
"ok": true,
"code": "SUCCESS"
}{
"ok": false,
"code": "INSUFFICIENT_BALANCE",
"error": "Insufficient balance."
}Use one clientOrderId/shopOrderId per order and reuse it when resending a create request. Reusing an ID with a different payload returns 409 IDEMPOTENCY_CONFLICT.
| Method | Endpoint | Description |
|---|---|---|
| GET | /me | Profile, tier, Point balance and referrals |
| GET | /balance | Canonical Point balance and display equivalents |
| GET | /purchases?limit=50 | Bot purchase history |
| GET | /deposits?limit=50 | Deposit history |
| GET | /referrals | Referral statistics |
{
"ok": true,
"success": true,
"code": "SUCCESS",
"shopId": "TG123",
"wallet": {
"point": 1.5,
"usd": 1.5,
"vnd": 39000,
"credit": 2
}
}Point is the single wallet unit: 1 Point = 1 USD = 26,000 VND. Telegram Stars are only used to top up Point in the bot; wallet.usd and wallet.vnd are display equivalents.
| Method | Endpoint | Description |
|---|---|---|
| GET | /products?page=1&limit=50 | Products, prices and stock |
| POST | /orders | Buy by productId or code |
| POST | /products/{id}/buy | Buy by ID |
| GET | /orders?limit=50 | Shop API orders |
| GET | /orders/{orderCode} | Order details |
POST /orders
{
"productId": 123,
"qty": 1,
"currency": "point",
"shopOrderId": "shop-001"
}{
"ok": true,
"order": {
"orderCode": "ORDER123",
"shopOrderId": "shop-001",
"qty": 1,
"total": 1.5,
"currency": "point",
"status": "completed",
"accounts": [
"delivered-content"
]
}
}
| Method | Endpoint | Description |
|---|---|---|
| GET | /sheerid/service_info | Price and availability |
| POST | /sheerid/verify | Create verification with a SheerID URL |
| GET | /sheerid/jobs | List jobs |
| GET | /sheerid/jobs/{job_id} | Progress and result |
POST /sheerid/verify
{
"sheerid_url": "https://services.sheerid.com/verify/...",
"client_order_id": "student-001",
"discount_code": "API5"
}{
"job": {
"job_id": "SJ123",
"client_order_id": "student-001",
"status": "pending",
"progress": 0,
"result_link": null
}
}
| Method | Endpoint | Description |
|---|---|---|
| GET | /xiaomi3/services | Xiaomi Full price and availability |
| POST | /xiaomi3/orders | Create a 1β200 account batch |
| GET | /xiaomi3/orders | Order list |
| GET | /xiaomi3/orders/{id} | Details/result |
Xiaomi Full is the only mode. Each account becomes an independent order for tracking and refunds. By default, reseller pricing uses wallet-equivalent tiers: 5% off from 30 USD and 10% off from 60 USD. If an administrator assigns a reseller-specific price, that fixed price takes priority and tier discounts do not apply. The price is locked when the order is created.
Read availability, base price, effective price and the current pricing tier before creating an order. customPrice=true means this API account is using a reseller-specific fixed price.
{
"ok": true,
"pricingTiers": [
{
"minimumUsd": 0,
"discountPercent": 0
},
{
"minimumUsd": 30,
"discountPercent": 5
},
{
"minimumUsd": 60,
"discountPercent": 10
}
],
"services": [
{
"taskType": "default",
"name": "Xiaomi Full",
"basePriceUsd": 2,
"basePriceVnd": 50000,
"priceUsd": 1.7,
"priceVnd": 43000,
"discountPercent": 0,
"customPrice": true,
"walletEquivalentUsd": 35,
"enabled": true
}
]
}
| Field | Type | Requirements / Meaning |
|---|---|---|
taskType | string | Required: only default is accepted. |
currency | string | Recommended: point. Legacy usd/vnd are accepted and converted to Point. |
clientOrderId | string | Required, 8β80 letters, digits, underscores or hyphens. Reuse the same value after a timeout. |
accounts | string[] | Required, 1β200 lines. Each line uses an exact 32-character Base32 2FA secret or one 8-digit backup code. |
POST /xiaomi3/orders
Content-Type: application/json
X-API-Key: YOUR_BOT_API_KEY
{"taskType":"default","currency":"point","clientOrderId":"xiaomi-001","accounts":["email@gmail.com|password|12345678","second@gmail.com|password|JBSWY3DPEHPK3PXPJBSWY3DPEHPK3PXP"]}
A new request returns HTTP 202. Replaying the same clientOrderId with the same payload returns HTTP 200 and duplicated=true without charging twice. Reusing it with different accounts or currency returns HTTP 409 IDEMPOTENCY_CONFLICT.
{
"ok": true,
"duplicated": false,
"orders": [
{
"id": 812,
"clientOrderId": "xiaomi-001",
"email": "email@gmail.com",
"taskType": "default",
"status": "pending",
"amount": 47500,
"currency": "vnd",
"resultLink": null,
"errorCode": null,
"errorEn": null,
"createdAt": "2026-11-16 10:20:00",
"updatedAt": "2026-11-16 10:20:01"
}
]
}
Returns up to the latest 50 orders for the current API key, newest first. A multi-account batch appears as separate orders sharing one clientOrderId.
{
"ok": true,
"orders": [
{
"id": 812,
"clientOrderId": "xiaomi-001",
"email": "email@gmail.com",
"taskType": "default",
"status": "running",
"amount": 47500,
"currency": "vnd",
"resultLink": null,
"errorCode": null,
"errorEn": null,
"createdAt": "2026-11-16 10:20:00",
"updatedAt": "2026-11-16 10:21:10"
}
]
}
Reads one order owned by the current API key. A successful order returns resultLink when available; a failed order returns normalized errorCode and errorEn, and that order's charge is refunded automatically.
{
"ok": true,
"order": {
"id": 812,
"clientOrderId": "xiaomi-001",
"email": "email@gmail.com",
"taskType": "default",
"status": "success",
"amount": 47500,
"currency": "vnd",
"resultLink": "https://one.google.com/...",
"errorCode": null,
"errorEn": null,
"createdAt": "2026-11-16 10:20:00",
"updatedAt": "2026-11-16 10:23:00"
}
}{
"ok": true,
"order": {
"id": 813,
"clientOrderId": "xiaomi-001",
"email": "second@gmail.com",
"taskType": "default",
"status": "failed",
"amount": 47500,
"currency": "vnd",
"resultLink": null,
"errorCode": "wrong_password",
"errorEn": "Incorrect password.",
"createdAt": "2026-11-16 10:20:00",
"updatedAt": "2026-11-16 10:22:00"
}
}
Order fields:
| Field | Type | Requirements / Meaning |
|---|---|---|
id | integer | Order ID used by the detail endpoint. |
clientOrderId | string | Reseller-supplied idempotency ID. |
email | string | Order account; password/2FA is never returned. |
status | string | submitting | pending | running | success | failed | cancelled |
amount | number | Point locked for this order. |
currency | string | point |
resultLink | string|null | Result link when completed and available. |
errorCode | string|null | Stable machine-readable error code. |
errorEn | string|null | Customer-safe English error message. |
createdAt / updatedAt | string | Creation and latest update timestamps. |
Poll every 5β10 seconds. Stop on success, failed or cancelled. If the system does not return a valid task ID, the order fails and the wallet is refunded automatically.
submitting β pending β running β successfailed, cancelled
| Method | Endpoint | Description |
|---|---|---|
| 400 | INVALID_TASK_TYPE / INVALID_CURRENCY / INVALID_CLIENT_ORDER_ID / INVALID_ACCOUNTS / INVALID_ORDER_ID | Invalid request |
| 401 | MISSING_API_KEY / INVALID_API_KEY | Authentication error |
| 402 | INSUFFICIENT_BALANCE / INSUFFICIENT_CREDIT | Insufficient funds |
| 403 | API_NOT_UNLOCKED / SERVICE_DISABLED | Admin approval is missing or the service is disabled |
| 404 | ORDER_NOT_FOUND / INVALID_PRODUCT | Not found |
| 409 | IDEMPOTENCY_CONFLICT | Same ID, different payload |
| 410 | XIAOMI_LINK_DISABLED | Link mode is not available |
| 500 | INTERNAL_ERROR | Temporary internal error; retry with the same clientOrderId |
| 503 | SERVICE_UNAVAILABLE / PRICE_UNAVAILABLE | Temporarily unavailable |
Passwords, 2FA secrets and internal task identifiers are never returned. Do not log credentials or share X-API-Key.
GET /api/v1/openapi.json