Telegram Stars is sold separately on onlinepokerscript.com. This page is its technical reference; installing and configuring the plugin is covered in the Telegram Stars operator guide.
Telegram Stars support is delivered as the telegram_stars payment provider plugin, sold separately. It accepts deposits through Telegram Bot API invoices using XTR currency, credits local chips through the normal payment webhook settlement path, and exposes admin-only refund and reconciliation routes.
Configuration
Install or activate the plugin on Extensions › Plugins, then create or edit the Telegram Stars payment system in Money › Payment Providers.
Required fields:
botToken: Telegram bot token used forcreateInvoiceLink,answerPreCheckoutQuery,refundStarPayment, andgetStarTransactions.webhookSecretToken: Secret Telegram sends inX-Telegram-Bot-Api-Secret-Token. Webhooks are rejected before claim persistence if it is missing or invalid.
Important optional fields:
webhookBaseUrl: Public application base URL. If omitted, the plugin usesPUBLIC_URLorAPP_URL.starsPerChipRate: Number of Stars charged per local chip. Defaults to1.minDepositStars/maxDepositStars: Invoice bounds in integer Stars.invoiceTitle/invoiceDescription: Telegram invoice copy.
The plugin auto-creates the payment system disabled by default on server:ready; operators must enable deposits after configuration is complete. Withdrawals are intentionally hidden for this provider.
Deposit Flow
- The cashier calls the normal
POST /api/v1/cashier/depositendpoint with methodtelegram_stars. - The provider creates a pending local deposit and then calls Telegram
createInvoiceLinkwith currencyXTR. - The pending transaction ID is used as Telegram
invoice_payload. - The client opens the returned invoice URL with Telegram WebApp
openInvoicewhen available, otherwise it falls back to the allowlistedhttps://t.meredirect. - Telegram sends a
pre_checkout_query; the plugin validates:- secret header,
- pending transaction exists,
- currency is
XTR, - amount matches
starsPerChipRate, - user is not blocked or frozen,
- payer Telegram ID matches the user’s linked Telegram account.
- Telegram sends
successful_payment; the plugin routes it throughprocessPaymentWebhook. - The webhook claim key is Telegram
telegram_payment_charge_id; the transaction is also lookupable by the original invoice payload for first settlement. - On successful settlement, the local transaction
externalIdis updated to the Telegram charge ID for refunds and reconciliation.
Refunds
Refunds are for super admins whose group holds finance:transactions, in an admin session (anyone else gets 403), and use:
POST /api/v1/plugins/telegram_stars/refunds/:transactionId
Body:
{ "reason": "Customer request" }
The refund route:
- verifies the transaction is a completed Telegram Stars deposit,
- resolves the linked Telegram account for the local user,
- checks the credited chip balance can be reversed,
- calls Telegram
refundStarPayment, - records a refund marker in plugin settings,
- creates and approves a local withdrawal reversal with idempotency key
telegram-stars-refund:<chargeId>.
If Telegram accepts the refund but the local reversal fails, retrying the same route skips the external refund call because the marker is already recorded, then retries the local reversal.
Reconciliation
Reconciliation needs an admin (a or a1) in an admin session whose group holds finance:view (anyone else gets 403), and uses:
POST /api/v1/plugins/telegram_stars/reconcile
Optional body:
{
"from": "2026-06-18T00:00:00.000Z",
"to": "2026-06-19T00:00:00.000Z",
"offset": 0,
"limit": 100
}
The route compares Telegram getStarTransactions output with local completed Telegram Stars deposits and reports:
missingLocal: remote charge IDs not found locally,missingTelegram: local completed deposits not present remotely,amountMismatches: local chip amounts converted back to Stars that differ from Telegram.
Verification
Core webhook and cashier checks:
npx vitest run src/services/payment-webhook.service.test.ts
npx vitest run src/api/routes/cashier.routes.test.ts src/api/routes/cashier-methods.test.ts
Client checks:
../node_modules/.bin/vitest run src/pages/cashier/CashierPage.test.tsx src/lib/telegram.test.ts
from client/.