v1
Reseller API
Connect your website, bot or reseller panel. Check your balance, fetch products, place orders from your balance and receive product keys instantly.
Contents
Base URL
https://bot.prmast.website/api/public/reseller
Authentication
Open the bot, tap Reseller API (or send /api) and create a key. The key is shown once and stored hashed — it never appears in responses or logs. Send it on every request:
Authorization: Bearer rsk_live_xxxxxxxxxxxxxxxx # or X-Api-Key: rsk_live_xxxxxxxxxxxxxxxx
Limit: 60 requests per minute per key. Exceeding it returns 429 rate_limited.
Endpoints
Check the reseller account and current balance.
Response 200
{
"ok": true,
"account": {
"user_id": "0f2b…",
"telegram_id": 123456789,
"username": "reseller1",
"balance_usdt": 154.20,
"currency": "USDT"
}
}Example
curl "https://bot.prmast.website/api/public/reseller/me" \ -H "Authorization: Bearer $API_KEY"
Errors
Every failure returns { ok: false, error: { code, message } } with a matching HTTP status.
| Code | HTTP | Meaning |
|---|---|---|
| missing_api_key | 401 | No Authorization header was sent. |
| invalid_api_key | 401 | The key does not exist. |
| revoked_api_key | 403 | The key was revoked or regenerated. |
| account_suspended | 403 | The reseller account is banned. |
| rate_limited | 429 | More than 60 requests in one minute. |
| invalid_json | 400 | Body is not valid JSON. |
| invalid_product_id | 400 | product_id missing or malformed. |
| invalid_quantity | 400 | quantity must be an integer 1–100. |
| invalid_since | 400 | since is not a valid ISO 8601 timestamp. |
| invalid_items | 400 | Catalog items array is missing or empty. |
| too_many_items | 400 | More than 200 catalog items in one call. |
| invalid_price | 400 | selling_price_usd must be a positive number. |
| invalid_markup | 400 | markup_percent must be a positive number. |
| product_not_found | 404 | One or more product_ids do not exist. |
| product_unavailable | 404 | Product not found or inactive. |
| insufficient_stock | 409 | Not enough keys in stock. You are not charged. |
| insufficient_balance | 402 | Balance too low for this order. |
| balance_conflict | 409 | Balance changed mid-request. Retry the call. |
| order_not_found | 404 | The order does not belong to this account. |
| order_failed | 500 | Order could not be created. Balance is refunded. |
| catalog_failed | 500 | Catalog pricing could not be saved. |
Full integration example
const API = "https://bot.prmast.website/api/public/reseller";
const KEY = process.env.RESELLER_API_KEY;
const h = { Authorization: `Bearer ${KEY}`, "Content-Type": "application/json" };
// 1. Balance
const me = await (await fetch(`${API}/me`, { headers: h })).json();
// 2. Products
const { products } = await (await fetch(`${API}/products`, { headers: h })).json();
const item = products.find(p => p.status === "in_stock");
// 3. Order (charged from balance, keys returned instantly)
const res = await fetch(`${API}/orders`, {
method: "POST",
headers: h,
body: JSON.stringify({ product_id: item.product_id, quantity: 1, reference: "shop-1042" }),
});
const data = await res.json();
if (!data.ok) throw new Error(data.error.code);
console.log(data.order.keys); // deliver to your customerConnect with AI
— no coding neededUsing Claude Code, Cursor or any AI coding agent? Copy the prompt below, replace the last two lines, and let it build your integration for you.
I want to integrate the Premium Asset Bot Reseller API into my project.
API base URL: https://bot.prmast.website/api/public/reseller
Auth: send my key on EVERY request in the header -> Authorization: Bearer <MY_KEY>
(I get the key from the Telegram bot: tap "API" -> Generate.)
Endpoints:
- GET /me -> { "ok": true, "account": { "balance_usdt": number, "currency": "USDT" } }
- GET /products -> { "ok": true, "products": [ { "product_id", "name", "price_usdt", "stock", "status" } ] }
- POST /orders -> buy a product using my wallet balance
body: { "product_id": "<id from /products>", "quantity": 1, "reference": "<any-unique-id>" }
note: "reference" is the idempotency key (makes retries safe, never double-charges)
success -> { "ok": true, "order": { "order_id", "keys": [...], "balance_after" } }
- GET /orders/:id -> fetch a previous order and its keys
Rules to follow:
- Send the Authorization: Bearer header on every request.
- Branch on the JSON "error.code" field for errors:
unauthorized (401), invalid_quantity (400), insufficient_balance (402),
product_unavailable (404), order_not_found (404), insufficient_stock (409),
balance_conflict (409 -> retry), rate_limited (429 -> wait then retry).
- Rate limit: max 60 requests per minute.
- A purchase only works if my wallet has enough balance (I top up inside the bot).
Now please build this for me:
>>> DESCRIBE WHAT YOU WANT, e.g. "a Node.js script that lists products and lets me buy one by id" <<<
Use my API key: >>> PASTE_YOUR_API_KEY_HERE <<<How to use: open your AI coding tool in an empty folder → paste this prompt → replace the two
>>> … <<< lines with what you want and your key → send. The AI writes, runs and fixes the code for you.