Skip to content
/ stars-payment Public template

Connecting Telegram Stars payment using aiogram 3.x with the possibility of a refund.

Notifications You must be signed in to change notification settings

bohd4nx/stars-payment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Stars Payment Bot Logo

Telegram Stars Payment Bot

Process Telegram Stars payments, issue refunds, and monitor bot balance with localized error handling.

Report Bug · Request Feature · Contact Author


Features

  • 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)

Screenshot / Example

Example Stars Payment Flow

Quick Start

1. Clone & Install

git clone https://github.com/bohd4nx/stars-payment.git
cd stars-payment
pip install -r requirements.txt

2. Configuration

Edit config.py:

API_TOKEN = "your_bot_token_here"  # Obtain at @BotFather

3. Run

python main.py

Commands

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!

About

Connecting Telegram Stars payment using aiogram 3.x with the possibility of a refund.

Topics

Resources

Stars

Watchers

Forks