All API requests require an API key obtained from the bot (menu → 🔑 API KEY). Include it in the Authorization header.
Returns available, locked, and total balance.
| Status | Error | Description |
|---|---|---|
| 401 | missing_api_key | Authorization header missing |
| 401 | invalid_api_key | API key is invalid or inactive |
| 429 | rate_limit_exceeded | Too many requests (max 10/sec) |
| 404 | user_not_found | User record not found |
Purchase Telegram Stars for a target username. Optionally wait for completion with ?wait=true.
| Status | Error | Description |
|---|---|---|
| 400 | username_required | Missing target username |
| 400 | amount must be int... | Invalid star amount |
| 400 | insufficient_balance | Not enough funds in wallet |
| 400 | reservation_failed | Fund reservation error |
| 500 | order_creation_failed | Internal order creation error |
| 408 | timeout | Order did not finish within 90s |
Purchase Telegram Premium subscription (3, 6, or 12 months). Supports ?wait=true.
| Status | Error | Description |
|---|---|---|
| 400 | duration must be 3, 6, or 12 | Invalid duration value |
| 400 | insufficient_balance | Not enough funds |
| 400 | reservation_failed | Fund reservation error |
| 500 | order_creation_failed | Internal order creation error |
Check the status of a stars order by its ID.
| Status | Error | Description |
|---|---|---|
| 404 | order_not_found | Order does not exist or doesn't belong to you |
Check the status of a premium order by its ID.
| Status | Error | Description |
|---|---|---|
| 404 | order_not_found | Order does not exist or doesn't belong to you |
| Code | Meaning | Typical Cause |
|---|---|---|
| 400 | Bad Request | Invalid JSON, missing fields, insufficient balance |
| 401 | Unauthorized | Missing or invalid API key |
| 404 | Not Found | Order or user not found |
| 408 | Timeout | Order did not complete within 90 seconds (wait mode) |
| 429 | Too Many Requests | Rate limit exceeded (10 req/s per key) |
| 500 | Internal Server Error | Unexpected server failure |