Developers · API v1

API for Telegram Stars, Premium and Steam

Deliver Telegram Stars, Premium and GRAM by @username and top up Steam by account login — straight from your shop, bot or CRM. One POST request and the customer has it. Wholesale prices, sandbox, webhooks and protection against double charges.

Request
POST /v1/orders
Authorization: Bearer sk_live_…

{
  "type": "stars",
  "qty": 100,
  "username": "@john",
  "orderId": "order-123"
}
200 OK
{
  "ok": true,
  "orderId": "order-123",
  "status": "completed",
  "qty": 100,
  "price": 0.121
}
  • 2–3 second delivery
  • Idempotency by orderId
  • Zero-cost sandbox
  • HMAC-signed webhooks

Quick start

curl -X POST https://api.krab.gg/v1/orders \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"type":"stars","qty":100,"username":"@john","orderId":"order-123"}'

Field names are also accepted in their "technical" form (recipient, externalId / idempotencyKey, product, quantity) — if you copy an example from another doc, no renaming needed.

Who it's for

Telegram shops and bots

Selling Stars and Premium in your bot or on your site? Take payment however you like and delegate delivery to the API — by @username, instantly.

Resellers

Buy wholesale from a USDT balance and resell at your own markup. The price is locked before the order via /price — predictable margin.

CRM and automation

Embed Stars and Premium delivery into your funnel: an order from your CRM → POST /orders → the customer gets it, no manual work.

Services and SaaS

Add Telegram top-ups as a feature of your product — no inventory, no manual fulfilment, one HTTP call.

What the API does

Stars, Premium and GRAM

Deliver Telegram Stars (50 to 1,000,000 per order), Premium for 3, 6 or 12 months and GRAM for Telegram Ads — by recipient @username, no password or wallet.

Steam top-ups

Top up a Steam wallet by account login: set the amount in dollars, cents allowed (10.5). Same POST /orders, same USDT balance.

2–3 second delivery

Orders are fulfilled synchronously: call POST /orders and the customer gets the stars. Long cases finish in the background; status via API or webhook.

Idempotency by orderId

Your own order id on every request. Repeating the same orderId never creates a duplicate or double-charges — safe on retries.

Sandbox

A test key sk_test_ or dryRun: true — everything is calculated, but no balance is charged and nothing is delivered. Debug with zero cost.

Signed webhooks

order.completed / order.failed are pushed to your URL with an HMAC-SHA256 signature — no need to poll.

Single USDT balance

One USDT balance, topped up with crypto (USDT on TON). GET /price returns the exact order price before any charge.

Core endpoints

  • GET/v1/priceQuote a price (Stars, Premium, GRAM, Steam) before ordering
  • GET/v1/checkValidate a recipient: @username on Telegram, login on Steam
  • POST/v1/ordersCreate and fulfil an order (idempotent by orderId)
  • GET/v1/orders/:idOrder status: recipient, quantity, state
  • GET/v1/balanceAvailable USDT balance
  • GET/v1/depositUSDT top-up details (address + memo)
  • GET/v1/webhookCurrent webhook and signing secret
  • POST/v1/webhookSet the push-notification URL (+ signing secret)

Getting started

  1. 01

    Get a key

    Open @apistarsbot: we issue sk_test_ instantly — the sandbox works from minute one. The live sk_live_ key follows approval.

  2. 02

    Top up the balance

    Send USDT on TON to your address with the given memo. Crediting takes seconds.

  3. 03

    Fulfil orders

    Call POST /v1/orders: the recipient is an @username for Stars, Premium and GRAM, or an account login for Steam.

FAQ

What can I deliver through the API?

+

Telegram Stars (50 to 1,000,000 per order), Telegram Premium for 3, 6 or 12 months and GRAM for Telegram Ads — by @username, no password or wallet. Plus Steam wallet top-ups: the recipient is an account login and the amount is in dollars.

How is it priced?

+

Prices are wholesale, settled from a single USDT balance. GET /v1/price returns the exact amount for a given order before you create it, so there are no rate surprises.

What prevents double charges?

+

Idempotency by your orderId: repeating a request with the same orderId returns the already-created order and does not charge again — safe on retries and flaky networks.

Is there a test environment?

+

Yes. A test key sk_test_ or dryRun: true — the order is fully calculated, but no balance is charged and nothing is delivered. Integrate with zero cost.

How do I know an order is done?

+

Two ways: poll GET /v1/orders/:id, or use a webhook — we POST to your URL with an HMAC signature on completion (order.completed / order.failed).

What if an order fails?

+

You get status: failed with reason (why) and retryable (whether a retry makes sense). The settlement field shows what happened to the money: charged (taken), refunded (back on your balance) or fail_hold (held pending an operator decision).

How is the API different from buying on the site?

+

The API is for shops, bots and CRMs: wholesale prices, programmatic delivery by @username, a single balance and idempotency. Buying on the site is for end customers.

Can I resell Stars and Premium at a markup?

+

Yes. You buy at the wholesale price from a USDT balance and set your own retail price — the margin is yours. The API just delivers the product to the recipient by @username.

Is the API suitable for a Telegram bot or shop?

+

Yes, that's the main use case: you take payment on your side and deliver Stars or Premium with a single POST /v1/orders. Idempotency by orderId prevents double delivery.

How do I get access?

+

In the @apistarsbot cabinet bot: we issue sk_test_ instantly — integrate against the sandbox; sk_live_ follows approval. For volume terms — message support.

Need access?

Create a connection in the @apistarsbot cabinet bot and issue your key — sk_live_ and sk_test_ for testing. Need help with integration or volume terms — message support @heIIo_stars.

API Partner Terms