Check a recipient
Changed onResolve a @username and check whether they can receive the requested item, before you create an order. Read-only: nothing is created or reserved.
When eligibility cannot be verified. If the check runs but cannot reach a verdict in time (a transient upstream problem), it answers a retryable 503 unavailable — retry shortly. Only when no check can run at all does it answer eligible: true with indeterminate: true: treat that as "unknown", not as "yes". Either way POST /v1/orders runs its own live check before it creates an order.
resolved is always true; a handle Telegram does not know is eligible: false with reason: not_found.
Why type is required. The check runs against the very product you intend to order, so it must know which one. Pass type: stars to resolve a Stars recipient, or type: premium to resolve a Premium-gift recipient (the Premium path also takes months — 3, 6 or 12). Always check with the same type you'll use in POST /v1/orders: a Stars check does not prove a Premium gift will be accepted, and vice-versa.
Checking the order itself (since 2.3.0). Fragment refuses some orders only once the order is opened, and only for some quantities or currencies (for example "You can buy a minimum of 12,500 stars"). A lookup of the recipient alone does not see that. Send the order you intend to place — quantity on a Stars check, payment_currency on a Premium check (with months) — and the check also opens that order at Fragment (no payment link, nothing signed) and drops it. Such a refusal comes back as eligible: false with Fragment's text in telegram_message. Nothing is created or reserved on our side either way. Check with the same quantity (or months) and payment_currency you will order with: POST /v1/orders runs this same check for the order it creates.
⚠️ A recipient who already has an active Premium subscription cannot be gifted Premium. Telegram blocks gifting a Premium subscription to anyone whose subscription is still active (for example, an annual plan that has not expired yet) — this is Telegram's restriction, not ours. The check surfaces it as eligible: false with reason: "already_subscribed" and Telegram's verbatim wording in telegram_message. The same recipient also makes POST /v1/orders fail with 422 recipient_ineligible: no order is created and you are not charged. Pre-flighting Premium recipients here is the cheapest way to tell your user before they pay.
A refusal here does not count toward the daily budget of ineligible-recipient refusals that POST /v1/orders keeps per tenant.
Rate limit: this endpoint carries a tighter per-tenant cap of 60 requests/min (in addition to the standard per-tenant budget), because each call performs a live upstream lookup. If you exceed this, you receive a 429 and should back off for the remainder of the minute.
Request
- Base URLhttps://api.mystars.tg
- AuthAPI key in header X-Api-Key
Request body
Example request
{
"recipient": {
"username": "durov"
}
}Response
Resolution + eligibility result.
Changes
- info
added the new optional request property
payment_currency - info
added the new optional request property
quantity
- info
- warning
added the new
antibot_enforce_unavailableenum value to theerror/coderesponse property for the response status
129 more changes in this revision
- warning