Fragment Donor SDKSource

Version 0.1.3 · Registry installation commands use exact versions.

Integrate Telegram Premium gifts into your backend

A practical Premium-gift flow: validate recipient, select 3/6/12 months, perform one purchase, and reconcile ambiguous responses.

Purchase requests transmit your wallet mnemonic and Fragment session/cookie to the API operator.

First check the username with get-user-info and inspect is_premium. Collect an explicit duration of 3, 6, or 12 months. Configure wallet version/address to match the wallet connected to Fragment.

Perform exactly one buy-premium call. Record your own internal intent and its outcome without writing the mnemonic to application logs. If the call times out, stop and reconcile; a second POST is a new purchase.

Use mocked transports for integration tests. No real Stars or Premium purchase is needed to verify form mapping, rate-limit handling, or error behavior.

Example

POST /buy-premium/
Content-Type: application/x-www-form-urlencoded

username=durov&duration=3&payment_method=usdt_ton

Continue reading

Handle Telegram Stars API 429, Retry-After, and flood wait · Protect wallet credentials in API integrations · Fragment Donor API and SDK FAQ

OpenAPI 3.0 · Postman collection