API pipeline: Top up your balance with Telegram Stars, TON, USDT on TON or BTC

Goal: add money to your Cabi.Chat balance with Telegram Stars (in the Cabi.Chat bot) or in crypto (TON, USDT on TON or BTC) and see your transactions. The balance is kept in USDT; Pro and plans are paid from it, and AI usage is shown in AI spend: API pipeline: See your AI spend

Telegram Stars: in the bot, not through the API

The simplest way for Telegram users. There is no API call for a Stars top-up: the payment happens in Telegram, and the balance is credited without any call from you.

  1. Have a Cabi.Chat account and be signed in with Telegram first: API pipeline: Sign in to Cabi.Chat with Telegram
  2. In Telegram, open https://t.me/CabiChatBot and send /deposit.
  3. Pick a package; the invoice shows how much it adds to your balance. Pay it with Stars.
  4. The bot confirms the amount credited and your new balance. Through the API you see it in the balance (step 5) and as a deposit in your transactions (step 6).

Crypto: TON, USDT on TON or BTC

1. Your deposit addresses.

GET /v0/my/funds/wallets
→ {"ton": {"chain": "ton", "address": "UQExampleTonAddress…", "link": "<payment link>", "qr": "data:image/png;base64,…"},
   "btc": {"chain": "btc", "address": "bc1qexampleaddress…", "link": "<payment link>", "qr": "data:image/png;base64,…"}}

Your TON address takes both TON and USDT on TON. First time: open https://t.me/CabiChatBot and send /start; your addresses then appear.

2. Rates (optional). GET /v0/my/funds/crypto-prices → {"ton": 3.1, "btc": 61000.0, "usdt": 1.0} (USD).

3. Send TON or USDT to your TON address, or BTC to your BTC address, from any wallet. Send USDT over the TON network only.

4. Credit it. TON and USDT on TON are both checked by the ton call:

POST /v0/my/funds/sync-deposit/ton
→ {"deposit_detected": true, "credited_count": 2, "credited_amount": "10", "credited_usd": "56.00",
   "usdt_amount": "25", "usdt_ok": true, "network": "TON"}

Balance and transactions (any method)

5. Balance. GET /v0/my/funds/check-balance → {"balance": "56.00", "currency": "USDT"}.

6. Transactions. GET /v0/my/funds/transactions?limit=20&offset=0 → {"transactions": [{"nonce", "created_at", "transaction_type", "amount", "currency", "status", "description"}], "total"}; type= filters by transaction_type.

Behind

Rules

API surface

Endpoint Purpose FE AI / oracle
GET /v0/my/funds/wallets Deposit addresses + QR yes yes
GET /v0/my/funds/crypto-prices Rates no yes
POST /v0/my/funds/sync-deposit/{network} Credit new deposits yes yes
GET /v0/my/funds/check-balance Balance yes yes
GET /v0/my/funds/transactions Ledger yes yes

Index: API pipelines — index

Mentioned