feat(payments): Telegram Stars payment rail #226
Reference in New Issue
Block a user
Delete Branch "feature/payment-intake-tg-stars"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Third money-intake rail: Telegram Stars (XTR), alongside Robokassa (direct) and VK Votes. Merges into
development; PR into master stays test-only.Only the bot reaches Telegram, so the rail funnels through the reverse mTLS bot-link:
CreateInvoicecommand (botcreateInvoiceLink, XTR; link →WebApp.openInvoice);pre_checkout_queryvia a newValidatePreCheckoutunary — order exists, still creditable, not already paid (reusable-link double-pay guard); decline reason localised to the account language;successful_payment→ durable pure-Go SQLite outbox →ForwardPaymentunary → sameFund(source=telegram, idempotent ontelegram_payment_charge_id, honours an expired order); re-driven on restart + every 30 s.Wired by
TELEGRAM_STARS_OUTBOX_DIR(default/data) but inert until a chip pack carries an XTR price — seeding a Stars price in the admin is the go-live.Tests: backend integration (order→forward→credit once, duplicate, pre_checkout gate: pending/already_paid/gone/price_changed), bot outbox unit (idempotent + restart re-drive), executor createInvoice. Local: all Go modules build+vet+test, UI check+unit, full payments integration suite, gofmt.
Post-merge (owner): seed two contour Stars packs — 50 chips = 40★, 100 chips = 80★ (SQL to follow) — then the live contour Stars test. Schema-free (no migration, no contour wipe).