Version 0.1.3 · Registry installation commands use exact versions.
Telegram Stars API: send Stars to a username
Use a server-side API and seven SDKs to validate a Telegram username and send 50–1,000,000 Stars with TON or USDT.
Purchase requests transmit your wallet mnemonic and Fragment session/cookie to the API operator.
This API is for gifting Telegram Stars to a recipient username. It is different from accepting Stars as payment for digital goods inside a bot or Mini App through the Telegram Bot Payments API.
A backend first checks the recipient with GET /get-user-info/, then sends one form-urlencoded POST /buy-stars/ request. The amount must be an integer from 50 to 1,000,000; payment_method is usdt_ton or ton.
Purchase calls require the operator-facing wallet mnemonic and Fragment session cookie. Keep both on the server, never in browser code. A timeout does not prove failure, so do not automatically repeat the POST.
Choose the SDK for your existing backend: Python, Node.js/TypeScript, PHP, .NET, Go, Rust, or Ruby. All seven preserve unknown fields, decimal balance strings, retry hints, and uncertain purchase outcomes.
Example
curl -X POST https://fragment.donor.uz/buy-stars/ \
-H "Cookie: $FRAGMENT_COOKIE" -H "Mnemonic: $WALLET_MNEMONIC" \
--data-urlencode "username=durov" --data "amount=100" \
--data "payment_method=usdt_ton"Continue reading
Buy Telegram Stars for a username with an API · How to send Telegram Stars to a username · Telegram Stars API vs Bot Payments API