Request example
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}'Response:
{
"success": true,
"data": {
"transaction_id": "78f6a...",
"order_id": "K7Q2MX"
}
}Integration flow
- Check the price
POST /premium/pricing - Check the username
POST /searchUser - Buy
POST /premium/buy - Track the status
GET /order/{order_id}
Parameters
| Field | Type | Description |
|---|---|---|
X-API-Key | header | The cashier's API key. Required. |
username | string | Recipient's Telegram username. Required. |
months | integer | Duration: 3, 6 or 12. Required. |
currency | string | ton or usdt. Defaults to the cashier setting. |
Idempotency-Key | header | Optional. Not required: if the same order arrives twice in a row, the server drops the repeat itself. With a key, protection lasts 30 days. |
Pricing
The Premium price comes from Fragment, plus a 1.5% service fee (1% for accounts selling 100 000+ Stars a week). The first 20 orders on each account are free. POST /premium/pricing returns the current price.
Use cases
- A Premium catalog with automatic delivery in Telegram bots.
- Premium as a new product in online stores.
- Rewards in promotions and loyalty programs.
Frequently asked questions
Can I buy Premium for someone else?
Yes, Premium is sent as a gift to any username.
What if the user already has Premium?
Fragment may refuse the purchase — the API returns a clear error code and no fee is charged.
Minutes to your first order
Signing up and getting an API key is free. The first 20 orders on each account carry no service fee.