★ For developers

Telegram Stars API

Sell Telegram Stars and Premium inside your own bot, shop or app. One HTTPS API, one balance shared with the StarKerak bot and website.

Automatic deliverymost orders in minutes
Username checkbefore you pay
Open pricessame on site and API
Public ledgerevery order gets a TxId

What the API does

  • POST /api/v1/check-username — verify a recipient and get a short-lived verification token
  • POST /api/v1/stars/buy and /api/v1/premium/buy — create orders (Idempotency-Key required)
  • GET /api/v1/order/{id} and /api/v1/orders — statuses and history
  • GET /api/v1/prices, /api/v1/account, USD wallet and USDT invoices

Authentication uses an X-API-Key header. Keys are created in the dashboard and do not expire until you revoke them.

Built for production

Every order carries your Idempotency-Key, so retries never double-charge. The recipient check prevents payments to non-existent usernames. The rate limit is 10 requests per second per key.

All orders are paid from the USD balance (currency=USD; UZS is treated as USD). Pass max_usd to cap the price you accept.

Transparency

Each completed order receives a TxId recorded on the PayStars public ledger, so you and your customers can verify delivery independently.

Fragment price, 0% (website: 5%)

API-key orders from the USD balance are priced at the live Fragment price with 0% markup (website: 5%). Get the price with POST /usd/quote and cap it with max_usd. Details on the Fragment API page.

Frequently asked questions

Is there a sandbox?

Use small real orders (50 Stars) while integrating; the idempotency key makes retries safe.

Which languages are supported?

Any language with HTTPS. See the Python, Node.js and PHP quickstarts.

Do API keys expire?

No. Keys stay valid until you revoke them in the dashboard.

Can I pay in USD?

Yes — top up the USD balance with USDT (TON, BEP20 or TRC20) and send currency=USD.

Ready to order?

Sign in with Telegram — your StarKerak balance works on the site, in the WebApp and through the API.