Process Telegram Stars payments, issue refunds, and monitor bot balance with localized error handling.
- Create Stars payment invoice via
/start - Alternative: generate payment link (commented example in
payment.py) - Perform refunds with
/refund <user_id> <transaction_id> - View bot Stars balance using
/balance - Clear, structured refund error messages (Telegram charge status aware)
git clone https://github.com/bohd4nx/stars-payment.git
cd stars-payment
pip install -r requirements.txtEdit config.py:
API_TOKEN = "your_bot_token_here" # Obtain at @BotFatherpython main.py| Command | Description |
|---|---|
/start |
Send a Stars payment invoice |
/refund <user_id> <transaction_id> |
Attempt refund of a prior Stars payment |
/balance |
Show current Stars balance of the bot |
Made with ❤️ by @bohd4nx
Star ⭐ this repo if it helps your Telegram payments!
