Fragment API for Telegram Stars & Premium

Add Telegram Stars purchases and Premium gifts to your app with a production REST API, funded developer balances, idempotent orders, and signed delivery webhooks.

REST + JSONTON or USDTAsync webhooksNo monthly fee
Purchased
10:00
user@alexdevbought500 Stars
payment viaTONamount4.99 TON
Premium Gift
10:00
from@john_cryptogifted3 months Premium
to@anna_design

One API for the complete purchase flow

Search the recipient before charging, reserve the correct developer balance once, and follow every order to a final state.

Telegram Stars API

Validate a recipient, create a Stars order from 50 to 1,000,000 Stars, and track delivery without maintaining your own Fragment automation.

Telegram Premium API

Gift supported 3, 6, or 12 month Premium packages after a recipient eligibility check.

TON and USDT balances

Fund and monitor separate TON or official USDT-on-TON balances from one developer dashboard.

Safe retries

Idempotency keys prevent duplicate wallet reservations when your application retries a request.

Webhooks and polling

Receive signed completion or failure events and use order polling as a reliable fallback.

Operational dashboard

Manage API keys, balances, deposits, orders, and webhook endpoints from fragmentapi.com.

A direct, server-side REST integration

Authenticate with an API-Key header. Search first to get the provider recipient hash, then create an order with a unique idempotency key. The production base URL is stable and documented.

POST /orders/starbash
curl -X POST "https://v1.fragmentapi.com/api/v1/partner/orders/star" \
  -H "API-Key: $FRAGMENT_API_KEY" \
  -H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "alexdev",
    "recipient_hash": "hash_from_recipient_search",
    "quantity": 100,
    "wallet_type": "TON"
  }'

Learn the product before you integrate

From API key to delivered order

  1. 01

    Create and fund your account

    Generate a server-side API key and deposit TON or official USDT on the TON network.

  2. 02

    Resolve the Telegram recipient

    Use the Stars or Premium search endpoint to validate eligibility and receive the required recipient hash.

  3. 03

    Create one idempotent order

    Send the purchase payload with a unique Idempotency-Key so retries cannot reserve funds twice.

  4. 04

    Confirm the final state

    Handle signed webhooks and poll the order endpoint until the order is completed or failed.

Clear pricing and recoverable failures

API access has no setup fee or monthly subscription. Each order is charged at the live provider amount plus a 5% service margin. A definitively failed order returns the full reserved amount to the same developer balance.

Read pricing, VAT, and refund details

5%

Service margin

Applied to the live provider amount

2

Settlement balances

TON or USDT on the TON network

100%

Failed-order return

Full reserved amount when failure is final

Fragment API FAQ

Direct answers for developers comparing Telegram Stars and Premium integration options.

What is Fragment API?

Fragment API is a developer platform for buying or gifting Telegram Stars and Telegram Premium from a backend application. It includes REST endpoints, API keys, funded TON and USDT balances, order tracking, webhooks, and a dashboard.

Can I buy Telegram Stars through an API?

Yes. Search for the Telegram recipient, create an idempotent Stars order, and track it until completion by webhook or order-status polling. Star quantities range from 50 to 1,000,000 per supported order.

Does the API support Telegram Premium gifts?

Yes. Fragment API supports Premium gift orders for the available 3, 6, and 12 month packages after recipient validation.

How does pricing work?

The charged order total is the live provider amount plus a 5% service margin. There is no setup fee or monthly subscription. Your dashboard shows separate TON and USDT balances on the TON network.

How are failed orders handled?

When an order definitively fails before successful blockchain settlement, the full reserved order amount is returned to the same developer balance and recorded as a separate wallet transaction.

Build your first order against the sandbox

Create your API key, fund a test balance, and follow the quickstart from recipient validation to final delivery.

Open the dashboard