TSR Store API
Resell digital subscriptions, AI accounts, and keys directly from your balance on any bot, website, or service. Authenticate with your API key, list available products, create orders deducted automatically from your USDT balance, and receive instant key delivery.
API Key Auth
Send your key in the X-API-Key header with every request.
Balance-based
Orders are deducted directly from your USDT balance — no checkout redirect needed.
Rate limit
300 requests per 15 minutes per IP/Token. Use X-RateLimit-* headers to monitor usage.
Authentication
Every request must include your API key in the X-API-Key request header (or standard Authorization: Bearer <token>). You can generate and view your API key in the Telegram bot under Кабинет Реселлера (Reseller Cabinet).
Header format
X-API-Key: tsr_live_xxxxxxxxxxxxxxxxxxxxxxxx
# curl check balance curl -H "X-API-Key: YOUR_API_KEY" https://api.tsr-store.live/v1/balance
Error Handling
All errors return a JSON object with an error message and a standard HTTP status code.
// Error response shape { "error": "Insufficient balance", "ok": false }
| Code | Meaning |
|---|---|
| 401 | API key missing, invalid, or disabled |
| 400 | Bad request — missing or invalid parameter |
| 402 | Insufficient balance |
| 404 | Resource not found |
| 409 | Conflict — e.g., out of stock |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Endpoints
Returns all active products available for purchase. price is the actual wholesale unit price your API key will be charged at POST /v1/orders (already includes your personal discount). publicPrice is the standard listed retail price for reference.
| Query Parameter | Type | Description |
|---|---|---|
| in_stock_only optional | boolean | Set to true to filter only items currently in stock |
| category_id optional | number | Filter products by specific category ID |
{
"products": [
{
"id": "196",
"name": "Gemini Pro 18Months (link)",
"description": "Activation link for Google Gemini Advanced",
"price": 1.60, // what you will actually be charged
"publicPrice": 1.80, // standard listed retail price
"delivery": { "type": "instant" },
"stock": 50,
"inStock": true,
"categoryName": "Gemini Advanced",
"requiresEmailActivation": false
}
]
}
| Parameter | Type | Description |
|---|---|---|
| id * | string / number | Numeric product / tariff ID |
{
"id": "196",
"name": "Gemini Pro 18Months (link)",
"price": 1.60, // your wholesale price
"publicPrice": 1.80,
"stock": 50,
"inStock": true,
"delivery": { "type": "instant" },
"categoryName": "Gemini Advanced",
"requiresEmailActivation": false
}
Returns the balance, username, and membership status of the account linked to the API key.
{
"telegramId": 123456789,
"username": "mybot",
"balance": 50.00,
"membership": "reseller (10% off)"
}
Purchases a product and delivers the key or activation content instantly. The order amount is deducted from your balance. Your personal reseller discount is applied automatically.
Recommended: prevent duplicate charges
Send a stable, unique Idempotency-Key header for each customer checkout (maximum 100 characters). Retrying the same checkout with the same key returns the existing order without charging the balance again.
Request body
| Field | Type | Description |
|---|---|---|
| productId * | string / number | Product ID to purchase (e.g. "196") |
| quantity optional | number | Quantity (default: 1) |
| customId optional | string | Your internal order reference ID for matching |
{
"productId": "196",
"quantity": 1,
"customId": "my_client_order_9981"
}
{
"orderId": "ORD-123456",
"status": "delivered",
"product": { "id": "196", "name": "Gemini Pro 18Months (link)" },
"quantity": 1,
"amount": 1.60,
"membershipDiscount": 10,
"bulkDiscount": null,
"discountAmount": 0.20,
"deliveredKey": "https://g.co/redeem/...",
"deliveredKeys": ["https://g.co/redeem/..."],
"createdAt": "2026-10-27T00:30:00Z"
}
Returns your own order history (every order placed with this account's API key), newest first.
| Parameter | Type | Description |
|---|---|---|
| page | number | Page number, default 1 |
| limit | number | Results per page, default 50, max 200 |
| status | string | Filter by status: delivered | completed |
{
"orders": [
{
"orderId": "ORD-123456",
"status": "delivered",
"product": { "id": "196", "name": "Gemini Pro 18Months (link)" },
"quantity": 1,
"amount": 1.60,
"deliveredKey": "https://g.co/redeem/...",
"createdAt": "2026-10-27T00:30:00Z"
}
],
"pagination": { "page": 1, "limit": 50, "total": 1, "pages": 1 }
}
| Parameter | Type | Description |
|---|---|---|
| id * | string | Order ID code (e.g. ORD-123456) returned from POST /v1/orders |
{
"orderId": "ORD-123456",
"status": "delivered",
"product": { "id": "196", "name": "Gemini Pro 18Months (link)" },
"quantity": 1,
"amount": 1.60,
"deliveredKey": "https://g.co/redeem/..."
}
Code Examples
Python
import requests API_KEY = "tsr_live_YOUR_KEY_HERE" BASE_URL = "https://api.tsr-store.live/v1" HEADERS = { "X-API-Key": API_KEY, "Content-Type": "application/json" } # 1. List products products = requests.get(f"{BASE_URL}/products", headers=HEADERS).json()["products"] product = products[0] print(f"Buying: {product['name']} — ${product['price']} (Stock: {product['stock']})") # 2. Check balance balance = requests.get(f"{BASE_URL}/balance", headers=HEADERS).json()["balance"] print(f"Available balance: ${balance} USDT") # 3. Create order with instant key delivery order = requests.post( f"{BASE_URL}/orders", headers=HEADERS, json={"productId": product["id"], "quantity": 1} ).json() print(f"Delivered Key: {order.get('deliveredKey')}")
Node.js
const API_KEY = 'tsr_live_YOUR_KEY_HERE'; const BASE_URL = 'https://api.tsr-store.live/v1'; const headers = { 'X-API-Key': API_KEY, 'Content-Type': 'application/json', 'Idempotency-Key': 'checkout_' + Date.now() }; // 1. List products const { products } = await fetch(`${BASE_URL}/products`, { headers }).then(r => r.json()); // 2. Buy first product const order = await fetch(`${BASE_URL}/orders`, { method: 'POST', headers, body: JSON.stringify({ productId: products[0].id, quantity: 1 }) }).then(r => r.json()); console.log('Order ID:', order.orderId); console.log('Delivered Key:', order.deliveredKey);
Telegram Bot (python-telegram-bot / aiogram)
from telegram import Update from telegram.ext import CommandHandler, ApplicationBuilder import requests API_KEY = "tsr_live_YOUR_KEY" HEADERS = { "X-API-Key": API_KEY, "Content-Type": "application/json" } BASE = "https://api.tsr-store.live/v1" async def buy(update: Update, context): args = context.args if not args: await update.message.reply_text("Usage: /buy <productId>") return resp = requests.post(f"{BASE}/orders", headers=HEADERS, json={"productId": args[0], "quantity": 1}) order = resp.json() if "error" in order: await update.message.reply_text(f"❌ {order['error']}") else: key = order.get("deliveredKey", "(pending delivery)") await update.message.reply_text(f"✅ Order #{order['orderId'][:8]} 🔑 {key}") app = ApplicationBuilder().token("BOT_TOKEN").build() app.add_handler(CommandHandler("buy", buy)) app.run_polling()