Automate Telegram Stars and Premium sales with an API

Send Stars and Premium to any Telegram user from your bot or web service — StarsAPI handles the rest.

  1. Create an account
  2. Connect a cashier and wallet
  3. Send a test request

Your first 20 orders are fee-free. After that, 1.5% — only on completed orders.

Order flow

From customer to result

From sending the request to the API response — about 1 second.

—Total API requests
—Successful orders
—Stars delivered
—Typical response time
System status
Dashboard

Every order in plain sight

How many orders the balance covers, success rate, failure reasons and a daily chart — on one screen.

With sample data
Features

Stars, Premium and payment control in one API

Create a cashier, connect a wallet, send a request. Every order shows up in the dashboard.

Stars and Premium

One key, one response format. Gas is always paid in TON.

★Telegram Stars50 – 100 000
Premium3 · 6 · 12 mo
PaymentGram (TON) · USDT

A separate cashier per project

Its own key, wallet and order history. No limit on cashiers.

Store botsk_…a41
Mini Appsk_…c9e
Testsk_…02f

Price: 1.5%, only on completed orders

—
Fragment price—
Service fee—
100,000+ Stars a week1%
First 20 orders per accountfree
Failed orderno fee
Monthly or setup feenone
Network gasfrom the wallet, in TON

A completed blockchain transaction can't be reversed. If an order fails, the money goes back to the cashier.

Order log

Status and failure reason for every order. CSV export.

K7Q2MX+100 ★SUCCESS
P3LZ0APremium 3 moSUCCESS
Q9XW2E+50 ★FAILED

Retry protection

A double click or a resent request never makes a second purchase. It works automatically.

Request 1: K7Q2MX · successRequest 2: K7Q2MX · duplicate: true
Integration

Every endpoint: request and response

The key goes in the X-API-Key header; responses are always JSON.

curl -X POST https://starsapi.uz/stars/buy \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "durov", "amount": 100}'
import requests

r = requests.post(
    "https://starsapi.uz/stars/buy",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"username": "durov", "amount": 100},
)
print(r.json())
const r = await fetch("https://starsapi.uz/stars/buy", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"username": "durov", "amount": 100})
});
console.log(await r.json());
<?php
$ch = curl_init('https://starsapi.uz/stars/buy');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['X-API-Key: YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode(['username' => "durov", 'amount' => 100]),
]);
$res = json_decode(curl_exec($ch), true);
200 OKapplication/json
{
  "success": true,
  "ton_amount": 1.1186,
  "data": {
    "transaction_id": "78f6a…",
    "order_id": "K7Q2MX",
    "username": "durov",
    "amount": 100
  }
}
curl -X POST https://starsapi.uz/premium/buy \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "durov", "months": 3}'
import requests

r = requests.post(
    "https://starsapi.uz/premium/buy",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"username": "durov", "months": 3},
)
print(r.json())
const r = await fetch("https://starsapi.uz/premium/buy", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"username": "durov", "months": 3})
});
console.log(await r.json());
<?php
$ch = curl_init('https://starsapi.uz/premium/buy');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['X-API-Key: YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode(['username' => "durov", 'months' => 3]),
]);
$res = json_decode(curl_exec($ch), true);
200 OKapplication/json
{
  "success": true,
  "ton_amount": 3.4875,
  "data": {
    "transaction_id": "b43a7…",
    "order_id": "P3LZ0A",
    "username": "durov",
    "months": 3
  }
}
curl -X POST https://starsapi.uz/stars/pricing \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount": 100}'
import requests

r = requests.post(
    "https://starsapi.uz/stars/pricing",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={"amount": 100},
)
print(r.json())
const r = await fetch("https://starsapi.uz/stars/pricing", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"amount": 100})
});
console.log(await r.json());
<?php
$ch = curl_init('https://starsapi.uz/stars/pricing');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['X-API-Key: YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode(['amount' => 100]),
]);
$res = json_decode(curl_exec($ch), true);
200 OKapplication/json
{
  "ok": true,
  "result": {
    "amount": 100,
    "currency": "ton",
    "price": {
      "ton": "1.1186",
      "usd": "1.50",
      "selected": "1.1186"
    },
    "fee_percent": 1.5,
    "total": {
      "ton": "1.1409",
      "usd": "1.53",
      "selected": "1.1409"
    }
  }
}
curl -X POST "https://starsapi.uz/searchUser?username=monk" \
  -H "X-API-Key: YOUR_API_KEY"
import requests

r = requests.post(
    "https://starsapi.uz/searchUser",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"username": "monk"},
)
print(r.json())
const r = await fetch("https://starsapi.uz/searchUser?username=monk", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY" }
});
console.log(await r.json());
<?php
$ch = curl_init('https://starsapi.uz/searchUser?username=monk');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['X-API-Key: YOUR_API_KEY'],
]);
$res = json_decode(curl_exec($ch), true);
200 OKapplication/json
{
  "ok": true,
  "message": "Telegram foydalanuvchi topildi.",
  "result": {
    "username": "durov",
    "name": "Pavel Durov",
    "is_premium": false,
    "myself": false
  }
}
curl -X POST https://starsapi.uz/wallet/balance \
  -H "X-API-Key: YOUR_API_KEY"
import requests

r = requests.post(
    "https://starsapi.uz/wallet/balance",
    headers={"X-API-Key": "YOUR_API_KEY"},
)
print(r.json())
const r = await fetch("https://starsapi.uz/wallet/balance", {
  method: "POST",
  headers: { "X-API-Key": "YOUR_API_KEY" }
});
console.log(await r.json());
<?php
$ch = curl_init('https://starsapi.uz/wallet/balance');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['X-API-Key: YOUR_API_KEY'],
]);
$res = json_decode(curl_exec($ch), true);
200 OKapplication/json
{
  "ok": true,
  "message": "Kassa hamyoni balansi olindi.",
  "result": {
    "cashier": "Do'kon boti",
    "currency": "ton",
    "address": "UQBx3f…k9Pq",
    "balance_ton": "12.5507",
    "balance_usdt": "4.200000",
    "gas_ok": true,
    "wallet_version": "V5R1",
    "network": "TON Mainnet"
  }
}

If the same order arrives twice in a row, the second one buys nothing — protection is automatic, nothing to add.

FAQ

Frequently asked questions

Have another question? Message us on Telegram.

Is StarsAPI secure?

Wallet seed phrases are stored encrypted in the database and are never returned in API responses. Each cashier has its own API key: you can regenerate it at any time and allow access only from your server's IP addresses. Keep only the amount you need for operations in the cashier wallet.

How fast are orders completed?

About 1 second: as soon as the payment is broadcast, the API returns success. Stars usually reach the user within a few seconds.

How much is the service fee?

A 1.5% service fee is charged on every successful order, added on top of the Fragment price. If your account sold 100,000+ Stars in the last 7 days, the fee automatically drops to 1%. The first 20 orders on each account are free, and there is no monthly fee.

Do I need a TON wallet and how do I connect it?

Yes, each cashier is linked to one TON wallet and purchases are paid from it. In the panel you can create a new wallet or connect your own with a 12 or 24-word seed phrase. One wallet can be linked to only one cashier.

Can I pay in USDT?

Yes. Set the cashier currency to USDT and purchases are paid from the USDT in the wallet. Network gas is still paid in TON, so keep ~0.2 TON in a USDT cashier's wallet. A TON cashier needs a 0.05 TON reserve.

What happens to the money if an order fails?

If it fails before payment (username not found, low balance), nothing leaves the wallet. If the payment is rejected after sending, the TON or USDT is returned to the cashier automatically and the order becomes FAILED. Failed orders are never charged a fee.