Quick start
Your first Telegram Stars order through the iFragment API in 5 minutes.
iFragment is a platform for delivering Telegram Stars and Premium. You create an order through the REST API, the platform fulfils it through isolated Supplier Accounts and reports the result with a webhook.
1. Get a key
Keys are issued per Project, an integration inside your account (for example, separate ones for a "bot" and a "website"). Keys are issued in the developer portal: sign in with Google or Telegram, fill in the connection form (project, where it runs, region, email) - the company and its first Project are created right away - and issue a key in it. The key is shown only once:
ifk_48aa52d67c0fef6d_lVlZSWKN43sgb2vfEpFbqtzQ0ePNZya6yZrDetails: Authentication.
2. Check the recipient
curl "https://api.ifragment.com/v1/recipients/lookup?username=durov&product=STARS" \
-H "X-API-Key: $IFRAGMENT_KEY"{
"success": true,
"data": { "username": "durov", "found": true, "name": "Pavel Durov", "photoUrl": "https://…", "eligible": true },
"meta": { "requestId": "…", "timestamp": "…", "processingTimeMs": 12 }
}3. Create an order
curl -X POST https://api.ifragment.com/v1/orders \
-H "X-API-Key: $IFRAGMENT_KEY" \
-H "Idempotency-Key: order-1042" \
-H "Content-Type: application/json" \
-d '{ "product": "STARS", "quantity": 500, "username": "durov", "externalId": "1042" }'{
"success": true,
"data": {
"id": "0199a1b2-6f00-7abc-9def-112233445566",
"externalId": "1042",
"product": "STARS",
"quantity": 500,
"months": null,
"username": "durov",
"recipientName": "Pavel Durov",
"status": "QUEUED",
"price": "8.25",
"currency": "USD",
"failure": null,
"createdAt": "2026-09-26T10:15:30.000Z",
"sentAt": null,
"completedAt": null
},
"meta": { "requestId": "…", "timestamp": "…", "processingTimeMs": 48 }
}A 201 response means the order is QUEUED and its price is already held on your balance. externalId is the order id in your system: you can look the order up by it, and a second order with the same externalId is never created.
4. Wait for the result
The best option is the order.succeeded / order.failed webhook. For simple integrations, polling GET /v1/orders/{id} every few seconds until a final status (SUCCEEDED or FAILED) also works.
Developer portal: keys, webhook, balance
Orders and statuses
Webhooks and signatures
Example: a Telegram shop bot
API reference
Basics
- Base URL:
https://api.ifragment.com, version in the path:/v1. - Every response is JSON in a
{ success, data, meta }envelope; errors use{ success: false, error, meta }, see Errors. - The language of error messages is set by the
Accept-Language: uz | ru | enheader. - Amounts are strings in US dollars (
"1.65","0.0165") so no precision is lost; do not convert them to floats for calculations. - Times are ISO 8601 in UTC.