FRAGMENT API DOCUMENTATION
From first request to working integration.
Choose your language and product. Test without funds, then connect your own bot or shop with a recoverable order flow.
https://api-stars.duckdns.orgNo API key. 0% API fee. Purchase and network fees still apply.
Configure your integration →Connect to Fragment API
Make your first free API request, choose a wallet flow, and add Telegram Stars or Premium to your backend.
Integration guideTelegram Stars API for Python
Use the Fragment Python SDK to check a recipient, buy Telegram Stars, and recover orders without duplicate payments.
Integration guideTelegram Premium API integration
Gift 3, 6, or 12 months of Telegram Premium from your bot or shop using Python or REST and GRAM or USDT.
Integration guideBuy Telegram Stars with USDT through API
Configure USDT-on-TON purchases, understand GRAM network fees, and request exact price strings for Telegram Stars.
Integration guideAdd Telegram Stars API to an aiogram bot
Start an aiogram 3 integration with async API calls, persistent orders, safe retries, and local mock scenarios.
ReferenceChoose the right wallet for API payments
Understand 24-word and 12-word wallet inputs, wallet_address, account_index, and client-signed checkout.
ReferencePurchase status, idempotency, and recovery
Handle accepted orders, terminal results, timeouts, rate limits, and uncertain payments without duplicate purchases.
Developer toolsTest your integration without spending funds
Exercise successful orders, failures, timeouts, rate limits, and reconciliation with a local mock API.
ReferenceClient-signed Fragment checkout API
Create Stars or Premium invoices and approve payments in your own wallet without sending a seed to the API.
Project exampleHow the Fragment demo shop uses the API
A first-party example of live prices, recipient checks, wallet approval, and delivery tracking for Stars and Premium.
ReferenceAPI and SDK changelog
Public changes to Fragment API integration guides, async SDK support, starters, and client-signed checkout.
Optional integration statistics
Documentation analytics is off by default. If you enable it on the API page, we count fixed events such as example copies and demo requests. No cookie, visitor ID, wallet address, username, request body, or referrer is included. Counts measure interactions, not unique customers.
SDK callers may explicitly set a UUID integration_id to help measure their integration. The default client sends no identifier. This is optional and is not an API key.