MyStars FaaS · Developer API

The Telegram Stars & Premium API

A production Fragment API for developers. Create an order and MyStars delivers Telegram Stars or Premium to any @username, settled on-chain in GRAM or USDT. No KYC, non-custodial — your keys never leave your process.

Only 5% marginMyStars' 5% margin is already included in every quote — the pricing endpoint returns the all-in GRAM or USDT amount before you charge anyone.

What you can build

Sell Stars in your bot or Mini App

Add a Stars top-up flow to any Telegram bot or Mini App. Your users pay you; you deliver Stars to their @username through one endpoint.

Resell Telegram Premium

Offer 3-, 6-, and 12-month Premium subscriptions as a product. Create the order, take payment on-chain, and MyStars activates it on the recipient's account.

Automate rewards and giveaways

Pay creators, reward players, or run giveaways in Stars programmatically — every order is idempotent, so a retry never double-delivers.

Accept crypto for digital goods

Settle in GRAM or USDT with no card processor and no chargebacks. The API quotes an all-in price before you charge anyone.

How it works

  1. Get an API key

    Open the MyStars bot and tap API access to issue a key. Send it as the X-Api-Key header on every request.

  2. Quote the price

    Ask the pricing endpoint for an all-in quote in GRAM or USDT before you charge anyone — no hidden add-ons at settlement.

  3. Check the recipient

    Confirm the @username can receive the order first, so you never take a payment you cannot fulfil.

  4. Create the order

    POST the order with a stable idempotency key (your own order id). A retry with the same key returns the same order, never a second one.

  5. Pay and get a signed webhook

    Pay the order on-chain — non-custodial, your keys stay in your process — and receive a signature-verified webhook the moment delivery completes.

Official SDKs

Typed clients for TypeScript/JavaScript and Python, with retries, idempotency, typed errors, webhook verification, and non-custodial payment builders. Every endpoint is also a plain HTTPS call with the X-Api-Key header, so any language works today.

npm install @mystars-tg/faas-sdk

npm · @mystars-tg/faas-sdk

pip install mystars-faas

PyPI · mystars-faas

Full quickstarts and package details are on the SDKs page.

Built for production

Official TypeScript & Python SDKs

Typed clients on npm (@mystars-tg/faas-sdk) and PyPI (mystars-faas), with retries, typed errors, pagination, and payment builders baked in.

Full OpenAPI reference

Every endpoint and schema is published as OpenAPI 3, served at /openapi.json and /openapi.yaml and browsable in the interactive reference.

Signed webhooks

Delivery and refund events arrive as signature-verified webhooks with a documented verification routine and an at-least-once retry schedule.

Idempotency keys

Stripe-style idempotency on order creation — retry any request safely and never deliver an order twice.

Non-custodial by design

MyStars never holds your keys. The optional TON wallet SDK is self-custody: the signing key stays in your own process.

GRAM & USDT settlement

Charge and settle on-chain in GRAM or USDT. No card processor, no KYC on your integration, no chargebacks.

Frequently asked questions

What is the MyStars API?

A B2B HTTPS API that delivers Telegram Stars and Premium to any @username. You create an order, pay on-chain in GRAM or USDT, and MyStars fulfils it through Fragment and confirms delivery with a signed webhook.

Do I need KYC to use the API?

No. Issuing an API key and integrating requires no identity verification. Payment is on-chain in GRAM or USDT.

Which languages have an SDK?

Official TypeScript/JavaScript and Python SDKs ship today (npm @mystars-tg/faas-sdk and PyPI mystars-faas). Every endpoint is a plain HTTPS call with an X-Api-Key header, so any language works right now, and PHP and Go SDKs are on the roadmap.

Is it a Fragment API?

Yes — MyStars fulfils orders directly on Fragment with local TON signing, and exposes that as a stable, documented API so you never have to script Fragment yourself.

How do webhooks and idempotency work?

Every delivery and refund fires a signature-verified webhook you verify with the SDK. Order creation takes an idempotency key, so a retried request returns the original order instead of creating a duplicate.

How is the API priced?

Usage-based and quoted up front. MyStars adds a flat 5% margin, already included in the all-in GRAM or USDT amount the pricing endpoint returns before you charge anyone. There are no setup fees and no monthly minimums.

Is it non-custodial?

Yes. MyStars never holds your keys. The optional TON wallet SDK is self-custody — the signing key stays in your own process and never reaches MyStars.