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.

Base URL https://api.tsr-store.live/v1

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

Example request
# 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
}
CodeMeaning
401API key missing, invalid, or disabled
400Bad request — missing or invalid parameter
402Insufficient balance
404Resource not found
409Conflict — e.g., out of stock
429Rate limit exceeded
500Internal server error

Endpoints

GET /v1/products List all active products

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 ParameterTypeDescription
in_stock_only optionalbooleanSet to true to filter only items currently in stock
category_id optionalnumberFilter products by specific category ID
Response
{
  "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
    }
  ]
}
GET /v1/products/:id Get product details
ParameterTypeDescription
id *string / numberNumeric product / tariff ID
Response
{
  "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
}
GET /v1/balance Get your current balance

Returns the balance, username, and membership status of the account linked to the API key.

Response
{
  "telegramId": 123456789,
  "username":   "mybot",
  "balance":    50.00,
  "membership": "reseller (10% off)"
}
POST /v1/orders Create an order (deducts balance)

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

FieldTypeDescription
productId *string / numberProduct ID to purchase (e.g. "196")
quantity optionalnumberQuantity (default: 1)
customId optionalstringYour internal order reference ID for matching
Request
{
  "productId": "196",
  "quantity":  1,
  "customId":  "my_client_order_9981"
}
Response (instant delivery)
{
  "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"
}
GET /v1/orders List your orders

Returns your own order history (every order placed with this account's API key), newest first.

ParameterTypeDescription
pagenumberPage number, default 1
limitnumberResults per page, default 50, max 200
statusstringFilter by status: delivered | completed
Response
{
  "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 }
}
GET /v1/orders/:id Get order status
ParameterTypeDescription
id *stringOrder ID code (e.g. ORD-123456) returned from POST /v1/orders
Response
{
  "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

Python — buy a product
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

Node.js — buy a product
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)

Python — Telegram bot handler
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()