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.

SDK 1.4.0 Verified View source on GitHub

API endpointhttps://api-stars.duckdns.org

No API key. 0% API fee. Purchase and network fees still apply.

Configure your integration →
Start here

Connect to Fragment API

Make your first free API request, choose a wallet flow, and add Telegram Stars or Premium to your backend.

Integration guide

Telegram Stars API for Python

Use the Fragment Python SDK to check a recipient, buy Telegram Stars, and recover orders without duplicate payments.

Integration guide

Telegram 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 guide

Buy Telegram Stars with USDT through API

Configure USDT-on-TON purchases, understand GRAM network fees, and request exact price strings for Telegram Stars.

Integration guide

Add Telegram Stars API to an aiogram bot

Start an aiogram 3 integration with async API calls, persistent orders, safe retries, and local mock scenarios.

Reference

Choose the right wallet for API payments

Understand 24-word and 12-word wallet inputs, wallet_address, account_index, and client-signed checkout.

Reference

Purchase status, idempotency, and recovery

Handle accepted orders, terminal results, timeouts, rate limits, and uncertain payments without duplicate purchases.

Developer tools

Test your integration without spending funds

Exercise successful orders, failures, timeouts, rate limits, and reconciliation with a local mock API.

Reference

Client-signed Fragment checkout API

Create Stars or Premium invoices and approve payments in your own wallet without sending a seed to the API.

Project example

How 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.

Reference

API 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.