Reseller API
Wholesale API documentation
Connect your website or Telegram bot to OTT24x7. Fetch your wholesale catalogue and buy stock with a Bearer token. Unlocked resellers only.
Base URL: https://ott24x7.com Β· OpenAPI: /reseller/openapi.json
Authentication
Issue a key in the reseller panel β API. The raw token is shown once. Send it on every request:
Authorization: Bearer rs_live_xxxxxxxx_secret
Or: X-Reseller-Token: YOUR_TOKEN
POST /reseller/check-token
curl -s -X POST https://ott24x7.com/reseller/check-token \ -H "Authorization: Bearer YOUR_TOKEN"
Products
price is what you pay (admin wholesale rate). Charge your buyers whatever you want.
GET /reseller/products
curl -s https://ott24x7.com/reseller/products \ -H "Authorization: Bearer YOUR_TOKEN"
{
"ok": true,
"products": [
{
"id": 12,
"name": "ChatGPT Go 3 months",
"category": "ai",
"price": 149,
"retail_price": 199,
"delivery_type": "auto",
"stock": 36,
"in_stock": true
}
]
}
GET /reseller/products/{id}
curl -s https://ott24x7.com/reseller/products/12 \ -H "Authorization: Bearer YOUR_TOKEN"
Purchase
Debits spendable wallet (not 7-day activation holds). Auto products return keys in delivery_payload. Manual products return status: pending.
POST /reseller/purchase
curl -s -X POST https://ott24x7.com/reseller/purchase \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"product_id":12,"quantity":1}'
{
"ok": true,
"order_id": 1042,
"status": "delivered",
"product_id": 12,
"product_name": "ChatGPT Go 3 months",
"quantity": 1,
"amount_charged": 149,
"formatted_amount": "βΉ149",
"delivery_type": "auto",
"delivered_qty": 1,
"delivery_payload": ["CODE-123"],
"balance": 2351,
"held": 5000
}
Optional: qty instead of quantity, buyer_info object, voucher_code for a 100% product voucher.
Python
import requests
BASE = "https://ott24x7.com"
H = {"Authorization": "Bearer YOUR_TOKEN"}
products = requests.get(BASE + "/reseller/products", headers=H).json()["products"]
buy = requests.post(BASE + "/reseller/purchase", headers=H, json={"product_id": 12, "quantity": 1}).json()
print(buy.get("delivery_payload"))
Wallet
GET /reseller/balance
curl -s https://ott24x7.com/reseller/balance \ -H "Authorization: Bearer YOUR_TOKEN"
{
"ok": true,
"balance": 7351,
"spendable": 2351,
"held": 5000,
"formatted_balance": "βΉ7,351",
"formatted_spendable": "βΉ2,351",
"formatted_held": "βΉ5,000",
"discount_pct": 20
}
Purchases fail with funds_on_hold if spendable is too low. Top up at /reseller/wallet.
Orders
GET /reseller/orders
Query ?filter=today|7d|30d|delivered|pending|failed|refunded
curl -s "https://ott24x7.com/reseller/orders?filter=7d" \ -H "Authorization: Bearer YOUR_TOKEN"
GET /reseller/orders/{order_id}
Includes keys / delivery_payload when delivered.
curl -s https://ott24x7.com/reseller/orders/1042 \ -H "Authorization: Bearer YOUR_TOKEN"
Errors
| HTTP | error | Meaning |
|---|---|---|
| 401 | missing_token | No Bearer header |
| 401 | invalid_token | Unknown or rotated key |
| 403 | token_disabled | You disabled the key |
| 403 | activation_locked | Pay βΉ activation to unlock |
| 403 | reseller_disabled | Account not approved |
| 402 | funds_on_hold / insufficient_balance | Need spendable wallet |
| 404 | product_not_found | Inactive or missing SKU |
| 403 | product_hidden | Hidden for your account |
| 409 | out_of_stock | Not enough auto stock |
| 429 | rate_limited | Slow down (120 req/min) |
Also: GET /reseller/categories, GET /reseller/settings, POST /reseller/rotate-token, POST /reseller/disable-token.