Version 0.1.3 · Registry installation commands use exact versions.
Gift Telegram Premium through the API
Telegram Premium gift API: 3, 6, or 12 months, form-urlencoded requests, wallet headers, and safe error handling.
Purchase requests transmit your wallet mnemonic and Fragment session/cookie to the API operator.
POST /buy-premium/ takes username and duration in form data. Supported durations are exactly 3, 6, or 12 months. payment_method is usdt_ton or ton. Purchase headers are the same as buy-stars.
A recipient already marked Premium is rejected by the inspected backend. Validate this state before offering a purchase. The SDK preserves the server response and never silently chooses a different duration.
This call spends wallet funds. On timeout, transport failure, or uncertain response, reconcile the wallet and recipient state before a human starts another purchase. There is no documented Idempotency-Key guarantee.
Example
curl -X POST https://fragment.donor.uz/buy-premium/ \
-H "Cookie: $FRAGMENT_COOKIE" -H "Mnemonic: $WALLET_MNEMONIC" \
--data-urlencode "username=durov" --data "duration=3"Continue reading
Telegram Premium Gift API for a username · Integrate Telegram Premium gifts into your backend · Payment timeout: prevent duplicate Telegram Stars purchases