Version 0.1.3 · Registry installation commands use exact versions.
Buy and gift Telegram Stars through the API
POST buy-stars form fields, mnemonic and cookie headers, TON/USDT payment options, and duplicate-payment prevention.
Purchase requests transmit your wallet mnemonic and Fragment session/cookie to the API operator.
Send POST /buy-stars/ as application/x-www-form-urlencoded, not JSON. Required form fields are username and amount: an integer from 50 to 1,000,000. payment_method is usdt_ton by default; ton is also supported.
Cookie and Mnemonic are required headers. Mnemonic accepts 12, 18, or 24 words. Optional headers: Wallet-Version (auto, v5r1, v4r2, v3r2), Wallet-Address, Proxy, User-Agent, and TonConsole Api-Key. Proxy is an upstream Fragment proxy, not service authentication.
HTTP 200 and ok=true indicate the returned success state. HTTP 400 may include info, unconfirmed, tx_hash, transient, insufficient, or price_guard. Do not discard them or repeat a purchase merely because a response is ambiguous.
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
Telegram Stars API: send Stars to a username · How to send Telegram Stars to a username · Payment timeout: prevent duplicate Telegram Stars purchases