Reseller & Buyer Automation API

Main bot wallet API, version 1.0.0. Safe for reseller websites, Telegram bots, and automated scripts with real-time wallet & custom reseller pricing.

Quick Links

Base URL: https://premiumone.tech

Full Documentation: https://premiumone.tech/api/docs

Swagger UI (Interactive Tester): https://premiumone.tech/api/swagger

OpenAPI JSON: https://premiumone.tech/openapi.json

Give this page URL to any developer or AI coding agent (ChatGPT, Claude, Cursor) and it can wire the API into your website or bot automatically.

API Source Setup

Use this exact Base URL in your website, bot, or reseller panel:

https://premiumone.tech
ActionEndpoint
List Products & PricingGET /api/public/v1/products
Place Instant OrderPOST /api/public/v1/order
Check Order by IDGET /api/public/v1/order?order_id=...
Check Wallet BalanceGET /api/public/v1/balance

Note: Short aliases /api/v1/products, /api/v1/order, and /api/v1/balance are also supported. CORS is enabled for all routes.

How It Works

  1. Open the Telegram Bot and send /api to access your API panel.
  2. Copy your private API key (sk_live_...).
  3. Add balance to your bot wallet first (API purchases deduct directly from your bot balance).
  4. Call products, balance, and order endpoints using your API key.
  5. If the admin configured a custom Reseller Price for your account, the API automatically charges your discounted price!

Allowed Product browse, own wallet balance check, instant automated purchases, own order lookup.

Protected Exact stock counts, admin data, and other users' orders are strictly hidden.

Authentication

Pass your API key using any of the following methods:

MethodExample
Bearer Header (Recommended)Authorization: Bearer YOUR_API_KEY
Custom HeaderX-API-Key: YOUR_API_KEY
Query Parameter?api_key=YOUR_API_KEY or ?key=YOUR_API_KEY

Keep your API key private. If it ever leaks, tap Rotate API Key in the Telegram bot — your old key stops working immediately.

Endpoints Reference

1) List Products & Your Pricing

GET /api/public/v1/products

Returns all active products, their package duration, regular price, your effective price (your_price), availability (in_stock: true/false), and credential fields.

2) Check Wallet Balance

GET /api/public/v1/balance

Returns your current shared bot wallet balance (BDT), reseller status, and total API order statistics.

3) Place Instant Order

POST /api/public/v1/order

Atomically deducts wallet balance and returns delivered account credentials immediately in the JSON response.

JSON Body FieldRequiredTypeDescription
product_idYesstringProduct ID or name from the /products endpoint (e.g. VPN Name (7 Days)).
quantityNointegerNumber of accounts/units to purchase (default 1, max 20 per request).
client_order_idNostringOptional unique order reference from your website to prevent duplicate purchases on network retries.

4) Get Order Details / Order History

GET /api/public/v1/order?order_id=ORD-...  or  GET /api/public/v1/orders

Fetches a specific order's delivered items by order_id, or lists your most recent API orders.

Python Example

import requests

BASE_URL = "https://premiumone.tech"
API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1. Check Wallet Balance
bal = requests.get(f"{BASE_URL}/api/public/v1/balance", headers=HEADERS, timeout=15).json()
print("Balance:", bal)

# 2. List Products
products = requests.get(f"{BASE_URL}/api/public/v1/products", headers=HEADERS, timeout=15).json()
print("Products:", products)

# 3. Buy Product Instantly
order = requests.post(
    f"{BASE_URL}/api/public/v1/order",
    headers=HEADERS,
    json={
        "product_id": "VPN Name (7 Days)",
        "quantity": 1,
        "client_order_id": "web-1001"
    },
    timeout=25
).json()
print("Delivered Items:", order.get("items"))

JavaScript / Node.js Example

const BASE_URL = "https://premiumone.tech";
const API_KEY = "YOUR_API_KEY";
const headers = {
  "Authorization": `Bearer ${API_KEY}`,
  "Content-Type": "application/json"
};

// 1. Fetch Products
const products = await fetch(`${BASE_URL}/api/public/v1/products`, { headers })
  .then(r => r.json());

// 2. Place Instant Order
const order = await fetch(`${BASE_URL}/api/public/v1/order`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    product_id: "VPN Name (7 Days)",
    quantity: 1,
    client_order_id: "web-order-1001"
  })
}).then(r => r.json());

console.log("Delivered Accounts:", order.items);

PHP / WordPress Example

<?php
$baseUrl = "https://premiumone.tech";
$apiKey  = "YOUR_API_KEY";

$payload = json_encode([
    "product_id" => "VPN Name (7 Days)",
    "quantity" => 1,
    "client_order_id" => "wp-1001"
]);

$ch = curl_init("$baseUrl/api/public/v1/order");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer $apiKey",
    "Content-Type: application/json"
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
print_r($data["items"]);
?>

cURL Example

# Check Balance
curl -X GET "https://premiumone.tech/api/public/v1/balance" \
  -H "Authorization: Bearer YOUR_API_KEY"

# List Products
curl -X GET "https://premiumone.tech/api/public/v1/products" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Place Order
curl -X POST "https://premiumone.tech/api/public/v1/order" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id": "VPN Name (7 Days)", "quantity": 1}'

# Lookup Order by ID
curl -X GET "https://premiumone.tech/api/public/v1/order?order_id=ORD-173000-ABC" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Models

Purchase Success (200 OK):

{
  "status": "success",
  "order_id": "ORD-1731234567-A1B2C3",
  "client_order_id": "web-1001",
  "product_id": "VPN Name (7 Days)",
  "product_name": "Express VPN 30D",
  "quantity": 1,
  "unit_price": 35.0,
  "total_price": 35.0,
  "balance_before": 500.0,
  "balance_after": 465.0,
  "currency": "BDT",
  "items": [
    {
      "gmail": "user@example.com",
      "password": "secretPassword123"
    }
  ],
  "timestamp": "2026-11-10 14:00:00"
}

Error Response (400 / 401 / 402 / 403 / 404):

{
  "status": "error",
  "error_code": "INSUFFICIENT_BALANCE",
  "message": "Insufficient balance. Required: 35 BDT, Available: 10.00 BDT.",
  "current_balance": 10.0,
  "required_amount": 35.0,
  "currency": "BDT"
}

HTTP Status Codes

CodeMeaning
200Success — request completed
400Invalid parameters or product out of stock (OUT_OF_STOCK)
401Missing or invalid API key (INVALID_API_KEY)
402Insufficient wallet balance (INSUFFICIENT_BALANCE)
403Blocked user or disabled API key (API_KEY_DISABLED)
404Product or order ID not found (PRODUCT_NOT_FOUND)
429Rate limit exceeded (60 requests/min)
503API temporarily disabled by administrator

FAQ & Best Practices

How do I get a lower reseller price on the API?

Contact the admin with your Telegram User ID. Once the admin sets a custom Reseller Price for your account in the bot, GET /api/public/v1/products and POST /api/public/v1/order automatically apply your discounted price.

Do I need to add balance before ordering via API?

Yes. Deposit balance in the Telegram bot using bKash, Nagad, Binance Pay, Bangla QR, or USDT. Your bot balance is shared in real time with the API.

What if my API key is leaked?

Open the Telegram bot, tap 🔑 API Access, and tap Rotate API Key. Your old key is revoked immediately and a new key is issued.